Add worldstate heal mechanism #5059
Conversation
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
|
Initial PR is here #4972 |
| return firstHeader -> | ||
| blockchain.contains(firstHeader.getParentHash()) | ||
| && blockchain.getChainHeadBlockNumber() + 1 >= firstHeader.getNumber(); |
There was a problem hiding this comment.
@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.
looks fine though, I will assume it's an extra safety check.
There was a problem hiding this comment.
...ah just caught up with the new comments from the old PR :)
#4972 (comment)
There was a problem hiding this comment.
It's fine . It's a fix
siladu
left a comment
There was a problem hiding this comment.
LGTM as someone with not much in-depth bonsai knowledge. Ideally someone else with more experience in this area will approve :)
macfarla
left a comment
There was a problem hiding this comment.
LGTM (but I am also no bonsai expert)
Needs a changelog entry
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Karim TAAM karim.t2am@gmail.com
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-requiredlabel to this PR ifupdates are required.
Changelog