diff --git a/simulators/ethereum/engine/suites/engine/fork_id.go b/simulators/ethereum/engine/suites/engine/fork_id.go index 1606caf9a4..1cb92acde4 100644 --- a/simulators/ethereum/engine/suites/engine/fork_id.go +++ b/simulators/ethereum/engine/suites/engine/fork_id.go @@ -5,6 +5,7 @@ import ( "strings" "time" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/hive/simulators/ethereum/engine/clmock" "github.com/ethereum/hive/simulators/ethereum/engine/config" "github.com/ethereum/hive/simulators/ethereum/engine/devp2p" @@ -34,6 +35,19 @@ func (ft ForkIDSpec) GetName() string { return strings.Join(name, ", ") } +func (s ForkIDSpec) GetForkConfig() *config.ForkConfig { + forkConfig := s.BaseSpec.GetForkConfig() + if forkConfig == nil { + return nil + } + // Merge fork happen at block 0 + mainFork := s.GetMainFork() + if mainFork == config.Paris { + forkConfig.ParisNumber = common.Big0 + } + return forkConfig +} + func (ft ForkIDSpec) Execute(t *test.Env) { // Wait until TTD is reached by this client t.CLMock.WaitForTTD() diff --git a/simulators/ethereum/engine/suites/engine/invalid_ancestor.go b/simulators/ethereum/engine/suites/engine/invalid_ancestor.go index ca39d251d7..fb8882cfb5 100644 --- a/simulators/ethereum/engine/suites/engine/invalid_ancestor.go +++ b/simulators/ethereum/engine/suites/engine/invalid_ancestor.go @@ -359,6 +359,12 @@ func (tc InvalidMissingAncestorReOrgSyncTest) Execute(t *test.Env) { } }, }) + + if !tc.ReOrgFromCanonical { + // Add back the original client before side chain production + t.CLMock.AddEngineClient(t.Engine) + } + t.Log("INFO: Starting side chain production") t.CLMock.ProduceSingleBlock(clmock.BlockProcessCallbacks{ // Note: We perform the test in the middle of payload creation by the CL Mock, in order to be able to