From de63562dda9f0bc3a2cfd490909748991e625eea Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Fri, 3 Jul 2026 14:59:48 +0100 Subject: [PATCH] core, tests: drop requests contract code check in favor of test skips --- core/blockchain_test.go | 10 ++-------- core/state_processor.go | 8 -------- tests/block_test.go | 10 ++++------ 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index b493b117e7..4530895b9d 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -4127,8 +4127,6 @@ func TestEIP7702(t *testing.T) { Nonce: 0, Balance: big.NewInt(0), }, - params.WithdrawalQueueAddress: {Code: params.WithdrawalQueueCode}, - params.ConsolidationQueueAddress: {Code: params.ConsolidationQueueCode}, }, } @@ -4433,12 +4431,8 @@ func TestGetCanonicalReceipt(t *testing.T) { address = crypto.PubkeyToAddress(key.PublicKey) funds = big.NewInt(1000000000000000000) gspec = &Genesis{ - Config: params.MergedTestChainConfig, - Alloc: types.GenesisAlloc{ - address: {Balance: funds}, - params.WithdrawalQueueAddress: {Code: params.WithdrawalQueueCode}, - params.ConsolidationQueueAddress: {Code: params.ConsolidationQueueCode}, - }, + Config: params.MergedTestChainConfig, + Alloc: types.GenesisAlloc{address: {Balance: funds}}, BaseFee: big.NewInt(params.InitialBaseFee), } signer = types.LatestSigner(gspec.Config) diff --git a/core/state_processor.go b/core/state_processor.go index 1cd2eeb2f9..bc565db6f9 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -188,14 +188,6 @@ func PostExecution(ctx context.Context, config *params.ChainConfig, number *big. rules := config.Rules(number, true, time) // IsMerge is always true // Read requests if Prague is enabled. if config.IsPrague(number, time) { - // EIP-7002, EIP-7251: the block is invalid if either requests - // contract has no code, as an empty system call result is - // indistinguishable from a successful call returning no requests. - for _, addr := range []common.Address{params.WithdrawalQueueAddress, params.ConsolidationQueueAddress} { - if evm.StateDB.GetCodeSize(addr) == 0 { - return nil, nil, fmt.Errorf("requests contract %v has no code", addr) - } - } requests = [][]byte{} // EIP-6110 if err := ParseDepositLogs(&requests, allLogs, config); err != nil { diff --git a/tests/block_test.go b/tests/block_test.go index 0f087967bb..a054e59e0f 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -88,14 +88,12 @@ func TestExecutionSpecBlocktests(t *testing.T) { bt := new(testMatcher) // These tests require us to handle scenarios where a system contract is not deployed at a fork - bt.skipLoad(".*prague/eip7251_consolidations/test_system_contract_deployment.json") - bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/test_system_contract_deployment.json") + bt.skipLoad(`.*eip7251_consolidations/contract_deployment/system_contract_deployment\.json`) + bt.skipLoad(`.*eip7002_el_triggerable_withdrawals/contract_deployment/system_contract_deployment\.json`) // Broken tests - bt.skipLoad(`RevertInCreateInInit`) - bt.skipLoad(`InitCollisionParis`) - bt.skipLoad(`dynamicAccountOverwriteEmpty_Paris`) - bt.skipLoad(`create2collisionStorageParis`) + bt.skipLoad(`.*eip7610_create_collision/initcollision/.*`) + bt.skipLoad(`.*eip7610_create_collision/revert_in_create/.*`) bt.walk(t, executionSpecBlockchainTestDir, func(t *testing.T, name string, test *BlockTest) { execBlockTest(t, bt, test)