From 17ceec4a5dd1aea4d147f6aa94d8d589d42df5e9 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com.> Date: Sun, 26 Apr 2026 11:30:43 +0200 Subject: [PATCH 1/5] extend test on eth_simulateV1 with test on historical and latest --- .github/workflows/scripts/run_rpc_tests_ethereum.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/run_rpc_tests_ethereum.sh b/.github/workflows/scripts/run_rpc_tests_ethereum.sh index a386ad8ac9c..629054878be 100755 --- a/.github/workflows/scripts/run_rpc_tests_ethereum.sh +++ b/.github/workflows/scripts/run_rpc_tests_ethereum.sh @@ -43,4 +43,4 @@ DISABLED_TEST_LIST=( DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}") # Call the main test runner script with the required and optional parameters -"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" +"$(dirname "$0")/run_rpc_tests.sh" mainnet extend_test_on_eth_simulateV1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" From d9c25bca9cff7746aad4b9ddee65003fb75b02ca Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com.> Date: Sun, 26 Apr 2026 15:23:42 +0200 Subject: [PATCH 2/5] update rpctest cache --- .github/workflows/qa-rpc-integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa-rpc-integration-tests.yml b/.github/workflows/qa-rpc-integration-tests.yml index 0f510821537..393a4320494 100644 --- a/.github/workflows/qa-rpc-integration-tests.yml +++ b/.github/workflows/qa-rpc-integration-tests.yml @@ -73,7 +73,7 @@ jobs: uses: actions/cache@v5 with: path: ${{ runner.workspace }}/rpc-tests - key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-v2.8.1 + key: rpc-tests-${{ runner.os }}-${{ runner.arch }}-extend_test_on_eth_simulateV1 - name: Run RPC Integration Tests id: test_step From e60e28e682d3796aab4d47b93b5067cd8ff3f5ce Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com.> Date: Sun, 26 Apr 2026 18:50:02 +0200 Subject: [PATCH 3/5] rpc/jsonrpc: fix BLOCKHASH across simulated blocks in eth_simulateV1 Move blockHashOverrides map from inside simulateBlock to the SimulateV1 loop so that BLOCKHASH instructions in a simulated block can see the hashes of previously simulated blocks. Co-Authored-By: Claude Sonnet 4.6 --- rpc/jsonrpc/eth_simulation.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpc/jsonrpc/eth_simulation.go b/rpc/jsonrpc/eth_simulation.go index 27feb7122c7..9959b6c7e95 100644 --- a/rpc/jsonrpc/eth_simulation.go +++ b/rpc/jsonrpc/eth_simulation.go @@ -173,11 +173,13 @@ func (api *APIImpl) SimulateV1(ctx context.Context, req SimulationRequest, block // Iterate over each given SimulatedBlock parent := sim.base + blockHashOverrides := ethapi.BlockHashOverrides{} for index, bsc := range simulatedBlocks { - blockResult, current, err := sim.simulateBlock(ctx, tx, sharedDomains, &bsc, headers[index], parent, headers[:index], blockNumber == latestBlockNumber) + blockResult, current, err := sim.simulateBlock(ctx, tx, sharedDomains, &bsc, headers[index], parent, headers[:index], blockNumber == latestBlockNumber, blockHashOverrides) if err != nil { return nil, err } + blockHashOverrides[current.NumberU64()] = current.Hash() simulatedBlockResults = append(simulatedBlockResults, blockResult) headers[index] = current.Header() parent = current.Header() @@ -507,6 +509,7 @@ func (s *simulator) simulateBlock( parent *types.Header, ancestors []*types.Header, latest bool, + blockHashOverrides ethapi.BlockHashOverrides, ) (SimulatedBlockResult, *types.Block, error) { header.ParentHash = parent.Hash() if s.chainConfig.IsLondon(header.Number.Uint64()) { @@ -529,7 +532,6 @@ func (s *simulator) simulateBlock( blockNumber := header.Number.Uint64() - blockHashOverrides := ethapi.BlockHashOverrides{} txnList := make([]types.Transaction, 0, len(bsc.Calls)) receiptList := make(types.Receipts, 0, len(bsc.Calls)) tracer := rpchelper.NewLogTracer(s.traceTransfers, blockNumber, common.Hash{}, common.Hash{}, 0) From 40818db7eec40565c12afb4b71f4f8196521b7d6 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com.> Date: Sun, 26 Apr 2026 19:01:18 +0200 Subject: [PATCH 4/5] update to temp branch --- .github/workflows/scripts/run_rpc_tests_ethereum_latest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/run_rpc_tests_ethereum_latest.sh b/.github/workflows/scripts/run_rpc_tests_ethereum_latest.sh index 8bf9f349ba0..e024cb1b348 100755 --- a/.github/workflows/scripts/run_rpc_tests_ethereum_latest.sh +++ b/.github/workflows/scripts/run_rpc_tests_ethereum_latest.sh @@ -34,4 +34,4 @@ DISABLED_TEST_LIST=( DISABLED_TESTS=$(IFS=,; echo "${DISABLED_TEST_LIST[*]}") # Call the main test runner script with the required and optional parameters -"$(dirname "$0")/run_rpc_tests.sh" mainnet v2.8.1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" "latest" "$REFERENCE_HOST" "do-not-compare-error-message" "$DUMP_RESPONSE" +"$(dirname "$0")/run_rpc_tests.sh" mainnet extend_test_on_eth_simulateV1 "$DISABLED_TESTS" "$WORKSPACE" "$RESULT_DIR" "latest" "$REFERENCE_HOST" "do-not-compare-error-message" "$DUMP_RESPONSE" From 32a593621c0a8be31605d28d5614970b41760867 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com.> Date: Sun, 26 Apr 2026 19:19:17 +0200 Subject: [PATCH 5/5] rpc/jsonrpc: do not apply EIP-7825 gas cap to eth_simulateV1 calls Geth always sets SkipTransactionChecks=true for eth_simulateV1, meaning the EIP-7825 MaxTxnGasLimit cap never applies to simulated calls even in validation mode. Erigon was incorrectly setting CheckGas=validation, causing calls with gas > 16,777,216 to be rejected with ErrGasLimitTooHigh. The validation flag should only control nonce checking, not protocol-level transaction caps. Co-Authored-By: Claude Sonnet 4.6 --- rpc/jsonrpc/eth_simulation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/jsonrpc/eth_simulation.go b/rpc/jsonrpc/eth_simulation.go index 9959b6c7e95..4a258134756 100644 --- a/rpc/jsonrpc/eth_simulation.go +++ b/rpc/jsonrpc/eth_simulation.go @@ -790,7 +790,7 @@ func (s *simulator) simulateCall( if err != nil { return nil, nil, nil, err } - msg.SetCheckGas(s.validation) + msg.SetCheckGas(false) // EIP-7825 gas cap does not apply to simulated calls (matches Geth SkipTransactionChecks) msg.SetCheckNonce(s.validation) txCtx := protocol.NewEVMTxContext(msg) txn, err := call.ToTransaction(s.gasPool.Gas(), &blockCtx.BaseFee)