-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ledger checkpoint, rewinding, and height action #104
Conversation
…oint apply command
#[cfg(feature = "write")] | ||
pub enum CheckpointContentError { | ||
#[error("error opening storage: {0}")] | ||
OpenLedger(#[source] anyhow::Error), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be fair the write
feature is only available when running snarkos nodes which uses anyhow anyway
// step 3 - if the last time is outside the duration of the current rule, reject it | ||
match curr_rule.duration.as_delta() { | ||
Some(duration) if last_delta > duration => { | ||
/* println!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these printlns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they'll probably be useful for debugging in a few days
Signed-off-by: Zander Franks <[email protected]>
Signed-off-by: Zander Franks <[email protected]>
03c5c40
to
ddc500c
Compare
automatically create checkpoints given retention policies in a format similar to duplicati's
this mechanism works by providing Rules formatted like
1W:1D
, aka for a 1 week time period, keep backups 1 day apart.The following is the default policy
This policy will be applied to the replay command when enabled, and the running node.
Adds
aot ledger checkpoint
commands:Changes
truncate --replay
intoaot ledger replay
with an optional--checkpoint
flag to generate checkpoints, andaot ledger rewind <checkpoint>
to rewind a ledger given a checkpoint file