-
Notifications
You must be signed in to change notification settings - Fork 897
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
candidate fix for missing parent worldstate #4094
candidate fix for missing parent worldstate #4094
Conversation
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
worldStateBlockHash = blockHeader.getHash(); | ||
worldStateRootHash = newWorldStateRootHash; | ||
} finally { | ||
stateUpdater.commit(); |
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.
Should this be up at line 47/50 instead? Do we want to commit the state updater if persistTrieLog throws an 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.
Yes you right. Good catch
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.
done thanks
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
🚢 |
* candidate fix for missing parent worldstate * add rollback if failure * fix persist trie log issue * add trielog manager * fix inmemory issue for bonsai Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: garyschulte <garyschulte@gmail.com> Co-authored-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Karim TAAM karim.t2am@gmail.com
PR description
when we remember block after the merge we must persist the trielog. because if we lose the trielog in the memory (ex restart besu) we can end up in a case where the block is saved but not the trielog. this can prevent the rollback or the rollforward to work because besu will consider that it can do it as the block is present but it will failed because trielog is missing.
may be one of the reasons for the problem found on a ropsten test node
A possible edgecase description :
now we have
if we restart before the reorg trielog 6 is missing
this PR also fix an issue related to an invalid implementation of BonsaiInmemoryWorldstate
Fixed Issue(s)
#4084
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog