From f465688357be7ec5ea55e62b9d1959db078fdbb5 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Mon, 6 Jul 2026 11:28:28 +0800 Subject: [PATCH] tests: fixes --- tests/gen_stenv.go | 6 ++++++ tests/state_test.go | 6 ++---- tests/state_test_util.go | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/gen_stenv.go b/tests/gen_stenv.go index a5bd0d5fcb..89d533f9d6 100644 --- a/tests/gen_stenv.go +++ b/tests/gen_stenv.go @@ -24,6 +24,7 @@ func (s stEnv) MarshalJSON() ([]byte, error) { Timestamp math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` BaseFee *math.HexOrDecimal256 `json:"currentBaseFee" gencodec:"optional"` ExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas" gencodec:"optional"` + SlotNumber *math.HexOrDecimal64 `json:"slotNumber" gencodec:"optional"` } var enc stEnv enc.Coinbase = common.UnprefixedAddress(s.Coinbase) @@ -34,6 +35,7 @@ func (s stEnv) MarshalJSON() ([]byte, error) { enc.Timestamp = math.HexOrDecimal64(s.Timestamp) enc.BaseFee = (*math.HexOrDecimal256)(s.BaseFee) enc.ExcessBlobGas = (*math.HexOrDecimal64)(s.ExcessBlobGas) + enc.SlotNumber = (*math.HexOrDecimal64)(s.SlotNumber) return json.Marshal(&enc) } @@ -48,6 +50,7 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { Timestamp *math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` BaseFee *math.HexOrDecimal256 `json:"currentBaseFee" gencodec:"optional"` ExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas" gencodec:"optional"` + SlotNumber *math.HexOrDecimal64 `json:"slotNumber" gencodec:"optional"` } var dec stEnv if err := json.Unmarshal(input, &dec); err != nil { @@ -81,5 +84,8 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { if dec.ExcessBlobGas != nil { s.ExcessBlobGas = (*uint64)(dec.ExcessBlobGas) } + if dec.SlotNumber != nil { + s.SlotNumber = (*uint64)(dec.SlotNumber) + } return nil } diff --git a/tests/state_test.go b/tests/state_test.go index 09c5cad40e..9b8aa61bc6 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -97,10 +97,8 @@ func TestExecutionSpecState(t *testing.T) { st := new(testMatcher) // Broken tests - st.skipLoad(`RevertInCreateInInit`) - st.skipLoad(`InitCollisionParis`) - st.skipLoad(`dynamicAccountOverwriteEmpty_Paris`) - st.skipLoad(`create2collisionStorageParis`) + st.skipLoad(`.*eip7610_create_collision/initcollision/.*`) + st.skipLoad(`.*eip7610_create_collision/revert_in_create/.*`) st.walk(t, executionSpecStateTestDir, func(t *testing.T, name string, test *StateTest) { execStateTest(t, st, test) diff --git a/tests/state_test_util.go b/tests/state_test_util.go index e33e15fc8c..c41e680463 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -95,6 +95,7 @@ type stEnv struct { Timestamp uint64 `json:"currentTimestamp" gencodec:"required"` BaseFee *big.Int `json:"currentBaseFee" gencodec:"optional"` ExcessBlobGas *uint64 `json:"currentExcessBlobGas" gencodec:"optional"` + SlotNumber *uint64 `json:"slotNumber" gencodec:"optional"` } type stEnvMarshaling struct { @@ -106,6 +107,7 @@ type stEnvMarshaling struct { Timestamp math.HexOrDecimal64 BaseFee *math.HexOrDecimal256 ExcessBlobGas *math.HexOrDecimal64 + SlotNumber *math.HexOrDecimal64 } //go:generate go run github.com/fjl/gencodec -type stTransaction -field-override stTransactionMarshaling -out gen_sttransaction.go @@ -378,6 +380,7 @@ func (t *StateTest) genesis(config *params.ChainConfig) *core.Genesis { GasLimit: t.json.Env.GasLimit, Number: t.json.Env.Number, Timestamp: t.json.Env.Timestamp, + SlotNumber: t.json.Env.SlotNumber, Alloc: t.json.Pre, } if t.json.Env.Random != nil {