hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.44k stars 765 forks source link

BFT ignore withdrawals #7115

Closed matthew1001 closed 2 months ago

matthew1001 commented 2 months ago

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 https://github.com/hyperledger/besu/pull/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 https://github.com/hyperledger/besu/pull/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 https://github.com/hyperledger/besu/issues/7036