fix(evmtool): use excessBlobGas from test environment in state-test#9545
Merged
macfarla merged 6 commits intobesu-eth:mainfrom Dec 11, 2025
Merged
Conversation
The state-test command was hardcoding BlobGas.ZERO when calculating blob gas price, ignoring the currentExcessBlobGas from the test environment. This caused incorrect BLOBBASEFEE opcode results and state root divergence with geth. With excessBlobGas=0x240000 and Cancun blob fee fraction: - Before: BLOBBASEFEE returns 1 (using zero) - After: BLOBBASEFEE returns 2 (using actual value) Signed-off-by: Bhargava Shastry <bhargava.shastry@ethereum.org> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
macfarla
approved these changes
Dec 8, 2025
Contributor
|
Thanks for the fix @bshastry - there is one EvmToolSpecTests failing - |
…cTests The excess-blob-gas.json file was in raw state test format but placed in the state-test/ directory which is scanned by EvmToolSpecTests. This caused a NullPointerException because EvmToolSpecTests expects a spec wrapper format with cli, stdin, stdout fields. - Convert state-test/excess-blob-gas.json to spec wrapper format - Create separate excess-blob-gas.json in parent directory for StateTestSubCommandTest - Update StateTestSubCommandTest to reference the new file location 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Bhargava Shastry <bhargava.shastry@ethereum.org>
55942c6 to
49dee27
Compare
Contributor
Author
I fixed it in the later commit. Hopefully, this should pass all checks 🙏 |
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
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.
Summary
Fix evmtool
state-testcommand to correctly usecurrentExcessBlobGasfrom the test environment when calculating blob gas price, instead of always using zero.Fixed Issue(s)
N/A - This fix addresses a consensus divergence (only via the statetest interface) discovered during differential fuzzing with goevmlab.
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 :ethereum:evmtool:test --tests StateTestSubCommandTest./gradlew acceptanceTest(not required for evmtool changes)./gradlew integrationTest(not required for evmtool changes)./gradlew ethereum:referenceTests:referenceTests(not applicable)Description
The
StateTestSubCommandwas hardcodingBlobGas.ZEROwhen calculating blob gas price for EIP-4844 transaction validation:This caused the
BLOBBASEFEEopcode (0x4a) to always return 1 (minimum blob gas price) regardless of whatcurrentExcessBlobGaswas specified in the test environment.Impact
With
excessBlobGas=0x240000(2,359,296) and Cancun's blob fee update fraction (3,338,477):This affects:
currentExcessBlobGasTest Plan
shouldUseExcessBlobGasFromEnvironmentthat verifies correct blob gas price calculationcurrentExcessBlobGas=0x240000Notes
GeneralStateReferenceTestToolscorrectly handles excess blob gas