e2e: automatically prune old app snapshots (#7034)

This PR tackles the case of using the e2e application in a long lived testnet. The application continually saves snapshots (usually every 100 blocks) which after a while bloats the size of the application. This PR prunes older snapshots so that only the most recent 10 snapshots remain.
This commit is contained in:
Callum Waters
2021-10-05 18:19:12 +00:00
committed by GitHub
parent 03ad7d6f20
commit 5703ae2fb3
3 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ var (
e2e.StateSyncRPC: 45,
}
nodePersistIntervals = uniformChoice{0, 1, 5}
nodeSnapshotIntervals = uniformChoice{0, 3}
nodeSnapshotIntervals = uniformChoice{0, 5}
nodeRetainBlocks = uniformChoice{0, 2 * int(e2e.EvidenceAgeHeight), 4 * int(e2e.EvidenceAgeHeight)}
nodePerturbations = probSetChoice{
"disconnect": 0.1,