core, tests: drop requests contract code check in favor of test skips

This commit is contained in:
spencer-tb 2026-07-03 14:59:48 +01:00 committed by Gary Rong
parent 3938922ac3
commit de63562dda
3 changed files with 6 additions and 22 deletions

View file

@ -4127,8 +4127,6 @@ func TestEIP7702(t *testing.T) {
Nonce: 0, Nonce: 0,
Balance: big.NewInt(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) address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000000000000000000) funds = big.NewInt(1000000000000000000)
gspec = &Genesis{ gspec = &Genesis{
Config: params.MergedTestChainConfig, Config: params.MergedTestChainConfig,
Alloc: types.GenesisAlloc{ Alloc: types.GenesisAlloc{address: {Balance: funds}},
address: {Balance: funds},
params.WithdrawalQueueAddress: {Code: params.WithdrawalQueueCode},
params.ConsolidationQueueAddress: {Code: params.ConsolidationQueueCode},
},
BaseFee: big.NewInt(params.InitialBaseFee), BaseFee: big.NewInt(params.InitialBaseFee),
} }
signer = types.LatestSigner(gspec.Config) signer = types.LatestSigner(gspec.Config)

View file

@ -188,14 +188,6 @@ func PostExecution(ctx context.Context, config *params.ChainConfig, number *big.
rules := config.Rules(number, true, time) // IsMerge is always true rules := config.Rules(number, true, time) // IsMerge is always true
// Read requests if Prague is enabled. // Read requests if Prague is enabled.
if config.IsPrague(number, time) { 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{} requests = [][]byte{}
// EIP-6110 // EIP-6110
if err := ParseDepositLogs(&requests, allLogs, config); err != nil { if err := ParseDepositLogs(&requests, allLogs, config); err != nil {

View file

@ -88,14 +88,12 @@ func TestExecutionSpecBlocktests(t *testing.T) {
bt := new(testMatcher) bt := new(testMatcher)
// These tests require us to handle scenarios where a system contract is not deployed at a fork // 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(`.*eip7251_consolidations/contract_deployment/system_contract_deployment\.json`)
bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/test_system_contract_deployment.json") bt.skipLoad(`.*eip7002_el_triggerable_withdrawals/contract_deployment/system_contract_deployment\.json`)
// Broken tests // Broken tests
bt.skipLoad(`RevertInCreateInInit`) bt.skipLoad(`.*eip7610_create_collision/initcollision/.*`)
bt.skipLoad(`InitCollisionParis`) bt.skipLoad(`.*eip7610_create_collision/revert_in_create/.*`)
bt.skipLoad(`dynamicAccountOverwriteEmpty_Paris`)
bt.skipLoad(`create2collisionStorageParis`)
bt.walk(t, executionSpecBlockchainTestDir, func(t *testing.T, name string, test *BlockTest) { bt.walk(t, executionSpecBlockchainTestDir, func(t *testing.T, name string, test *BlockTest) {
execBlockTest(t, bt, test) execBlockTest(t, bt, test)