Add sanity checks for weird SnapshotPolicyArgs configurations#1903
Open
fraser-iohk wants to merge 12 commits intoamesgen/predictable-snapshotsfrom
Open
Add sanity checks for weird SnapshotPolicyArgs configurations#1903fraser-iohk wants to merge 12 commits intoamesgen/predictable-snapshotsfrom
fraser-iohk wants to merge 12 commits intoamesgen/predictable-snapshotsfrom
Conversation
6258cef to
74d1d62
Compare
096896d to
7be6ea5
Compare
Superseded by the rework of the snapshot policy for predictable snapshots, with dedicated new tests LedgerDB: implement predictable snapshotting
It is no longer needed by the predictable snapshotting logic.
7be6ea5 to
f6f2731
Compare
- tryTakeSnapshot: now accepts a `Time` argument. The argument specifies the time at which the snapshot should be taken - LedgerDBEnv: rename ldbLastSnapshotWrite to ldbLastSnapshotRequestedAt. Track the request time rather than the time a snapshot actually finished. - implTryTakeSnapshot: add a `delay` argument. How long should we block before actually taking the snapshot after determining the slots to snapshot - add `cdbSnapshotDelayRNG` and use this to determine how long we should wait before taking a snapshot - add orphan `NoThunks` `StdGen` instance - add `cdbsSnapshotDelayRNG to `ChainDbSpecificArgs` - add `onDiskSnapshotDelayRange` to `SnapshotPolicy` to allow configuration of the delay between a snapshot being requested and being taken - add LedgerDB snapshot delay trace events. Use these events in the test suite to ensure we don't add blocks while snapshots are occurring (and therefore make an accurate number of snapshots). - add a test ensuring that blocks can be added while a snapshot is enqueued - ledgerDbMaintenaceThread -> ledgerDbMaintenanceThread
This commit brings back the fix from #1814, which synchronises the process of taking a ledger state snapshot and copying of blocks into the immutable DB.
ed82f15 to
eb8f8ce
Compare
eb8f8ce to
cbda1fb
Compare
c6d09eb to
b1e2b2b
Compare
671f2d9 to
b2395be
Compare
d181bb5 to
6c2bc63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #1853, we want node operators to be warned if they configure their node in a way that is likely to be broken i.e. if they disable the snapshot rate limiting, or set the number of on-disk snapshots to 0, or set a snapshot interval that isn't a clean divisor of the epoch length (which is required for Mithril). This PR implements sanity checks similar to the existing ones for the
SnapshotPolicyArgsand traces warnings to the user if these guidelines are ignored.