-
Notifications
You must be signed in to change notification settings - Fork 992
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
Namada rollback #1187
Namada rollback #1187
Conversation
let key = Key::from(metadata_key.to_owned().to_db_key()); | ||
let previous_key = | ||
Key::from(format!("pred/{}", metadata_key).to_db_key()); | ||
let previous_value = self.read_subspace_val(&previous_key)?.expect( |
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.
Does this keep track of whether the key was changed in the last block; ie we need to make certain that we only revert to the pred
key if it was actually different on block n-1
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.
As far as I understood these three keys are updated with every block
let tendermint_dir = tendermint_dir.as_ref().to_string_lossy(); | ||
|
||
// Rollback tendermint state | ||
std::process::Command::new(tendermint_path) |
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.
Are there docs we can link to that explain how Tendermint rollback behaves?
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.
I wasn't able to find proper documentation for this. We could link this file which contains the help message, or simply include it in the help message of the Namada command
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.
let's include the link to the code at least
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.
tested the command, lgtm
1ce3276
to
b553461
Compare
* grarco/rollback: changelog: add 1187 Improves rollback command description Parallel rollback Improves logging in rollback Managing missing keys in rollback Fixes `rollback` iterators Improves rollback docs Adds `rollback` command to cli Improves rollback comments Rollback deletes height-prepended keys Wip Namada rollback
Implements a
rollback
command for Namada.The command first calls the
rollback
command of Tendermint and then proceeds to reverting the state of the application by:subspace
keys to their previous value based on the diff key of the last height (if any)