-
Notifications
You must be signed in to change notification settings - Fork 5
feat(state): Reth height replay when lagging behind #154
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
base: main
Are you sure you want to change the base?
Conversation
…n/height-replay-on-crash
Right now we don't have a proper automated testing framework so the way to test it is to manually reproduce it. How to do that:
|
| debug!("🌈 Got block validator set: {:?}", block_validator_set); | ||
| state.set_validator_set(start_height, block_validator_set); | ||
|
|
||
| // Consensus will start at the next height, so we set the validator set for that height |
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.
@jmalicevic I also fixed the code here. The validator set from the latest accepted block was stored for the wrong height (current instead of next), causing the code to fail later since the validator set for the next height is requested.
|
Height replay is working. Reth successfully updates, and the node syncs eventually. From logs: |
Closes #126.
This is an attempt to replay heights in reth at initialization when needed.
I have not yet tested the correctness of the implementation. We would need to have an integration test framework, or can we test that more easily?