[SharovBot] rpc: fix eth_simulateV1 blockHashOverrides propagation and EIP-7825 gas check (release/3.4)#21091
Open
erigon-copilot[bot] wants to merge 1 commit intorelease/3.4from
Open
Conversation
…d disable EIP-7825 gas check Cherry-pick of main commit c128fdd to release/3.4. Two fixes: 1. blockHashOverrides is now accumulated across simulated blocks (not reset per-block). This allows BLOCKHASH opcodes in later simulated blocks to correctly resolve hashes of earlier simulated blocks in the same multi-block simulation. 2. msg.SetCheckGas(false) replaces msg.SetCheckGas(s.validation). EIP-7825 gas cap does not apply to simulated calls (matches Geth SkipTransactionChecks). This fixes eth_simulateV1 test_24 (validation=true) failing with gas-related errors. Also disables eth_simulateV1/test_201.json which is flaky. Fixes 4 failing mainnet-rpc-integ-tests (test_19, test_24, test_26, test_27) on release/3.4. Co-authored-by: Giulio Rebuffo <giulio.rebuffo@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.
[SharovBot]
Summary
Cherry-pick of main commit
c128fdd3(PR #20818) torelease/3.4.Fixes 4 consistently failing
mainnet-rpc-integ-testsonrelease/3.4(tests 19, 24, 26, 27).Root Causes & Fixes
Fix 1: blockHashOverrides not propagated across simulated blocks
Before: Each call to
simulateBlock()created a freshblockHashOverrides := ethapi.BlockHashOverrides{}, so in a multi-block simulation, earlier simulated blocks' hashes were unavailable to later blocks' BLOCKHASH opcode.After:
blockHashOverridesis created once inSimulateV1()and accumulated across iterations, with each completed block's hash inserted before the next block runs.Fix 2: EIP-7825 gas cap applied to simulated calls
Before:
msg.SetCheckGas(s.validation)— whenvalidation=true(test_24), the EIP-7825 gas cap was enforced on simulated calls, causing gas-related failures that shouldn't apply to simulations.After:
msg.SetCheckGas(false)— matches Geth'sSkipTransactionChecksbehavior. EIP-7825 gas cap is never applied to simulated calls regardless ofvalidationmode.Bonus: Disable flaky test_201
Adds
eth_simulateV1/test_201.jsonto the disabled list (flaky, non-deterministic failure).Failing Tests Fixed
Evidence
402e9f2canddd89464a(2 of 10 most recent release/3.4 commits checked)c128fdd3(merged 2026-05-06 via PR QA : extend test on eth_simulateV1 with test on historical and latest #20818)