-
Notifications
You must be signed in to change notification settings - Fork 835
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
Add worldstate heal mechanism #5059
Conversation
Signed-off-by: Karim TAAM <[email protected]>
Initial PR is here #4972 |
return firstHeader -> | ||
blockchain.contains(firstHeader.getParentHash()) | ||
&& blockchain.getChainHeadBlockNumber() + 1 >= firstHeader.getNumber(); |
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.
@matkt This appears to be different from the other PR: https://github.com/hyperledger/besu/pull/4972/files#diff-0361d2ff12cd43f507bf88a3cb4d781a537ca765329e0811f60a9507527cbe13R47
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 fine though, I will assume it's an extra safety check.
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.
...ah just caught up with the new comments from the old PR :)
#4972 (comment)
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.
It's fine . It's a fix
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 be an accurate recreation of #4972 except for the minor change I mentioned in the comment
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.
LGTM as someone with not much in-depth bonsai knowledge. Ideally someone else with more experience in this area will approve :)
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.
LGTM (but I am also no bonsai expert)
Needs a changelog entry
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.
LGTM
Signed-off-by: Karim TAAM <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Karim TAAM <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Karim TAAM <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Karim TAAM [email protected]
PR description
This PR add a heal mechanism fo the worldtstate in case of inconsistency (unable to trie node). To fix this, we start a quick heal of the worldstate automatically and once the fix is done we restart the block import.
After the detection of an invalid path
This feature can also heal a node that has been inconsistent for a long time, but it will take longer because there will be more nodes to heal. With this PR the healing will be done as soon as the problem is detected so there will not a lot to heal and it will be fast
Performed tests
Fixed Issue(s)
#4379
#4785
#4768
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog