Only apply blob schedule bpoX if bpoXTime is available as well#10166
Merged
daniellehrner merged 3 commits intobesu-eth:mainfrom Apr 7, 2026
Merged
Only apply blob schedule bpoX if bpoXTime is available as well#10166daniellehrner merged 3 commits intobesu-eth:mainfrom
daniellehrner merged 3 commits intobesu-eth:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Besu’s handling of blob schedules in genesis configs by ensuring BPO blob schedules are only applied when the corresponding fork time is present, preventing inactive blob schedules from affecting fee calculations.
Changes:
- Gate BPO1–BPO5 blob schedule application on the presence of the corresponding
bpoXTimefield. - Add a regression test to ensure inactive BPO fork blob schedules don’t override active schedules.
- Add a new test class covering Amsterdam excess-blob-gas calculation branches and default blob gas limits.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java | Only applies BPO blob schedules when the matching fork timestamp exists. |
| ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilderTest.java | Adds regression test ensuring missing bpoXTime prevents applying those blob schedules. |
| ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/AmsterdamTargetingGasLimitCalculatorTest.java | Adds Amsterdam blob gas/excess calculation tests and default gas limit assertions. |
| config/src/main/java/org/hyperledger/besu/config/BlobSchedule.java | Adds a new BPO2_DEFAULT blob schedule constant. |
config/src/main/java/org/hyperledger/besu/config/BlobSchedule.java
Outdated
Show resolved
Hide resolved
...est/java/org/hyperledger/besu/ethereum/mainnet/AmsterdamTargetingGasLimitCalculatorTest.java
Outdated
Show resolved
Hide resolved
...um/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilderTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/hyperledger/besu/ethereum/mainnet/AmsterdamTargetingGasLimitCalculatorTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/hyperledger/besu/ethereum/mainnet/AmsterdamTargetingGasLimitCalculatorTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/hyperledger/besu/ethereum/mainnet/AmsterdamTargetingGasLimitCalculatorTest.java
Outdated
Show resolved
Hide resolved
matkt
reviewed
Apr 6, 2026
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java
Outdated
Show resolved
Hide resolved
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
53f271a to
84dbf16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
In Hive tests we have a genesis config looking like this:
In this config we have bpo3 - bpo5 in the blobSchedule, but we have no bpo3Time - bpo5Time entries. Right now Besu treats blob schedules without a time entry as active at genesis. This leads to a wrong calculation of the blob fees and rejects blocks with more blobs than in the inactive bpo5 blob schedule.
This PR ignores blob schedules without time and adds regression tests to avoid such subtle bugs in the future.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests