mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
core, tests: drop requests contract code check in favor of test skips
This commit is contained in:
parent
3938922ac3
commit
de63562dda
3 changed files with 6 additions and 22 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue