-
Notifications
You must be signed in to change notification settings - Fork 995
fixes #8204 by using BadBlockManager from protocol context #8207
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
Conversation
|
did you had time to test it with a stateroot mismatch issue ? I saw on my last test that with a stateroot mismatch we are passing here https://github.com/hyperledger/besu/pull/8207/files#diff-e390f1feab110aff3f324e7e36e681b676198067f3b8932ff3abe97f0793df50R215 and in this case we are not adding the bad block |
|
This pr is stale because it has been open for 30 days with no activity. |
I'm dismissing my review pending q from matkt
69fad3c to
d9b0564
Compare
@matkt when you have a moment, pls check this commit for context: d9b0564 |
I see that you are catching a new execption for the stateroot mismatch but I don't see how it could fix the issue In my case the I had an invalid stateroot and we passed here https://github.com/hyperledger/besu/pull/8207/files#diff-e390f1feab110aff3f324e7e36e681b676198067f3b8932ff3abe97f0793df50L221. With your commit it seems to be the same or maybe I missing something 🤔 |
can you give a test case? previously bonsai stateroot mismatches were never being added as bad blocks, but were being treated as a database layer problem. This PR should address that. LMK if there is a reproducible case where a stateroot mismatch does not result in adding to the bad block manager. |
Don't have a unit test but it was pretty easy to reproduce the issue. I think if you force a stateroot mismatch by changing the gas cost of an operation and try to sync on mainnet you will be able to have it |
|
Checked and it's working, I saw that you are using public BlockProcessingResult(
final Optional<BlockProcessingOutputs> yield, final String errorMessage) {
super(errorMessage);
this.yield = yield;
this.isPartial = false;
}in case of a stateroot mismatch and not public BlockProcessingResult(
final Optional<BlockProcessingOutputs> yield, final Throwable cause) {
super(cause.getLocalizedMessage(), cause);
this.yield = yield;
this.isPartial = false;
}so it will work |
matkt
left a 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
Signed-off-by: jflo <[email protected]>
…anager (only in serial processing) Signed-off-by: garyschulte <[email protected]>
d9b0564 to
e7dc076
Compare
Signed-off-by: garyschulte <[email protected]>
fixes first part of #8204 by using BadBlockManager from protocol context