fix: eth_simulateV1 future blocks and validation error#9837
Merged
macfarla merged 8 commits intobesu-eth:mainfrom Feb 23, 2026
Merged
fix: eth_simulateV1 future blocks and validation error#9837macfarla merged 8 commits intobesu-eth:mainfrom
macfarla merged 8 commits intobesu-eth:mainfrom
Conversation
…rrors - Return BLOCK_NOT_FOUND error instead of null for future/unknown block numbers - Map UPFRONT_COST_EXCEEDS_BALANCE error code to -32602 (invalid params) when validation is enabled, per the execution-apis spec Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates eth_simulateV1 to align with execution-apis spec behavior for future blocks and validation-related error codes.
Changes:
- Return
BLOCK_NOT_FOUNDinstead of anullsuccess when simulating against a future/unknown block. - Map
UPFRONT_COST_EXCEEDS_BALANCE(-38014) to-32602(invalid params) when validation is enabled. - Update unit test expectations and document the behavior change in the changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1Test.java | Updates test to expect BLOCK_NOT_FOUND error for future block numbers. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java | Implements error mapping for validation and converts null-success responses to BLOCK_NOT_FOUND. |
| CHANGELOG.md | Notes the RPC behavior changes as breaking changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Show resolved
Hide resolved
fab-10
reviewed
Feb 18, 2026
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Show resolved
Hide resolved
fab-10
reviewed
Feb 18, 2026
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthSimulateV1.java
Show resolved
Hide resolved
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fab-10
approved these changes
Feb 20, 2026
...dger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterOrBlockHashMethod.java
Outdated
Show resolved
Hide resolved
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.
PR description
Fixed Issue(s)
Ref #9636
fixes #9829
Hive rpc-compat tests fixed (6)
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