-
Notifications
You must be signed in to change notification settings - Fork 712
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
incremental hash #4197
incremental hash #4197
Conversation
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.
Another thing to handle is the reset of the final state.
You should delete your prefix at two places:
FinalState::reset()
FinalState::new(), if the reset_final_state argument is set to true
You can call the .delete_prefix() function on the db to do that.
Improvement: remove the new(reset_final_state) and reset() concepts completely through #3728 => final_state is initialized from a db, and when re-attempting a bootstrap, the final_state object is just re-created. |
@Leo-Besancon the bootstrap test fails. Any idea ? |
I'd check if the helper function that inits the new hash key is called by the server. Otherwise, it's never created and the is_db_valid of the client fails. Edit: it seems to be the case: 'Client's DB is not valid after bootstrap'! |
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.
Looks like everything is taken care of.
Sidenote: We must not forget to init the execution trail hash in the db if we want to convert from a previous version (e.g. if we want to keep the testnet24 db for testnet25, or when converting the buildnet ledger)
Yes but if we unify things as we expect to do, restarting from an existing state will preserve the previous hash which is good |
thanks @Leo-Besancon for the review and corrections ! |
Todo
Checklist