-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Should we implement the rewind feature in tendermint? #3196
Comments
Why we'd want that? |
If we are running in a production enviroment, at a moment there is a thorny problems that happened and restart the node didnt work. Maybe its better to rewind to previous blocks to keep system up and running. Then we have enough time to fix this bug. |
Biggest reason, is we have seen the chain halt for consensus problems with App Hash. Once a node has a bad app hash, there is no simple way for it to rejoin the chain without a complete resync. This can create large downtimes. Also since tendermint isn't maintaining backwards compatibility, checkpoints of the chain have to periodically stored off chain, to even restore a node from scratch, cause you can't possible replay the chain after a tendermint upgrade. |
Interesting. I could see us supporting this from a debuggability/maintenance perspective. How would it work? |
I add two flag into
And if It is a good idea to create a new command I use |
In testcase, I will use If we revert a node from height |
What about the priv_validator_state.json? it could cause double signing. |
reset it to the following state:
|
This could still cause double signing though. I think we might want two cases. Assuming Or maybe we can make the rollback command ensure that we don't process evidence from the next height? It's a bit weird. If your app handles evidence, this could get kind of tricky. |
I'm reading the consensus code to try to solve this problem.
I only considered the situation 1&3 previously. But if we rollback 3 nodes it may casue double signing. |
It's a good idea to support two different case. Take the example above:
|
Any sample code to try out? Trying to handle this situation right now |
@mattkanwisher I had wrote some code for test and it worked well with tendermint0.27.4 Usage: Catuion: it wil directly modify data so be careful!! Wal file error could be skipped for sample. I think it will take some time to create a pull request because it is really a dangerous operation. |
@mattkanwisher |
What if we do this as an independent tool for now rather than making it available in the |
We shouldn't clutter the |
you're right. Considering of security, its better to create a independent tool. |
… (tendermint#3308) have different type. Adds `ValidatorSet#AllKeysHaveSameType`, which checks exactly that. Closes tendermint#3195 --- #### PR checklist - [ ] ~~Tests written/updated~~ - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code comments~~ - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request tendermint#3196 done by [Mergify](https://mergify.com). --------- Co-authored-by: Anton Kaliaev <[email protected]>
…endermint#3310) (tendermint#3345) Refs tendermint#3196 --- #### PR checklist - [x] Tests written/updated - [ ] ~~Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)~~ - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request tendermint#3310 done by [Mergify](https://mergify.com). --------- Co-authored-by: Anton Kaliaev <[email protected]>
I was reading the code of go-ethereum and found that it had supported the rewind feature.
Should we implement a similar feature in the tendermint?
If needed, I will write an ADR Documents based my prior work on it. Maybe it will take some time. :)
The text was updated successfully, but these errors were encountered: