Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions simulators/ethereum/engine/suites/engine/fork_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 6 additions & 0 deletions simulators/ethereum/engine/suites/engine/invalid_ancestor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down