Skip to content
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

Bugfix potential chain head and worldstate inconsistency #4862

Merged

Conversation

garyschulte
Copy link
Contributor

PR description

Ensure we do not leave the bonsai database in an inconsistent state where chain head and worldstate are at different block hashes

Fixed Issue(s)

relates to #4784

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@garyschulte garyschulte requested a review from matkt December 23, 2022 16:23
@garyschulte garyschulte marked this pull request as ready for review December 23, 2022 16:31
… worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte force-pushed the bugfix/mergecoordinator-head-move branch from b723d20 to 856440e Compare December 23, 2022 17:28
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@garyschulte garyschulte merged commit 642d477 into hyperledger:main Dec 23, 2022
@AegeanDad
Copy link

When do you expect to release this patch to stakers? As it stands, I am down.

@garyschulte garyschulte deleted the bugfix/mergecoordinator-head-move branch December 23, 2022 22:56
@garyschulte
Copy link
Contributor Author

garyschulte commented Dec 23, 2022

When do you expect to release this patch to stakers? As it stands, I am down.

This PR does not purport to fix the underlying cause of #4784, but just mitigates the database damage from a failed fork-choice update if/when it occurs. For now the only recourse if you encounter the defect in 4784 is to resync besu.

The next release which will have this PR included will be 23.1.0-beta on Dec 28th

@AegeanDad
Copy link

Given that this data issue pertains to a specific block (0x3bc82334b7902026f2e9ed64122ccf224899f014dc25823a8b30568e588f20cd, block 16243159) in my case, would you be able to recommend a quicker data fix that targets the specific block in the database?

@garyschulte
Copy link
Contributor Author

Given that this data issue pertains to a specific block (0x3bc82334b7902026f2e9ed64122ccf224899f014dc25823a8b30568e588f20cd, block 16243159) in my case, would you be able to recommend a quicker data fix that targets the specific block in the database?

sent a private DM on discord. It is non-trivial to recover a database from this state.

macfarla pushed a commit to jflo/besu that referenced this pull request Jan 10, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte added a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
garyschulte added a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
garyschulte added a commit to garyschulte/besu that referenced this pull request Jan 14, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
garyschulte added a commit that referenced this pull request Jan 14, 2023
* Use safe block as pivot block suring snapsync (#4819)
* Bugfix snapshot transaction segfaults after storage truncation (#4786)
* Bugfix potential chain head and worldstate inconsistency (#4862)
* Peering - disconnect worst peer (#4888)
* Attempt to fix CPU spikes issue (#4867)
* not block subscribe when the worldstate storage is open (#4912)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
fab-10 pushed a commit to fab-10/besu that referenced this pull request Jan 18, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…#4862)

* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants