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

BFT ignore withdrawals #7115

Merged
merged 4 commits into from
May 16, 2024
Merged

Conversation

matthew1001
Copy link
Contributor

PR description

Short version:

Skips validation of withdrawals when importing BFT blocks since withdrawals don't apply to BFT chains

Long version:

Unfortunately the original shanghai PR #6353 which was included in 24.3.0 had a bug that caused block withdrawals to be set incorrectly for new shanghai blocks. Withdrawals are not applicable to BFT chains, but the block header still has a withdrawals field which is validated whenever a block is imported.

I fixed the issue in PR #6765 which was released in 24.5.1. However, any chain with shanghai enabled in 24.3.0 will have already created incorrect blocks, which 24.5.1 will now fail to import as the validation is now correct - but the created blocks are not.

Without requiring users to restore to a point before 24.3.0 blocks were produced, I think the most pragmatic approach is to disable withdrawal validation on BFT blocks.

Fixed Issue(s)

Fixes #7036

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
@matthew1001 matthew1001 changed the title Qbft ignore withdrawals BFT ignore withdrawals May 16, 2024
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

neat

@macfarla macfarla enabled auto-merge (squash) May 16, 2024 23:15
@macfarla macfarla merged commit bdec4b9 into hyperledger:main May 16, 2024
42 checks passed
jflo pushed a commit to jflo/besu that referenced this pull request May 28, 2024
* Don't perform validation of withdrawals in BFT chains

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Spotless

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Remove withdrawal unit test - not applicable any more

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

---------

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
matthew1001 added a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
* Don't perform validation of withdrawals in BFT chains

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Spotless

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Remove withdrawal unit test - not applicable any more

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

---------

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Jun 10, 2024
* Don't perform validation of withdrawals in BFT chains

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Spotless

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Remove withdrawal unit test - not applicable any more

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

---------

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
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.

BAD Block in private QBFT chain
2 participants