Skip to content
Closed
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
5 changes: 4 additions & 1 deletion lib/docker/ethereum/ethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ type Fork string
const (
EthereumFork_Shanghai Fork = "Shanghai"
EthereumFork_Deneb Fork = "Deneb"
EthereumFork_Electra Fork = "Electra"
)

// ValidFutureForks returns the list of valid future forks for the given Ethereum fork
func (e Fork) ValidFutureForks() ([]Fork, error) {
switch e {
case EthereumFork_Shanghai:
return []Fork{EthereumFork_Deneb}, nil
return []Fork{EthereumFork_Deneb, EthereumFork_Electra}, nil
case EthereumFork_Deneb:
return []Fork{EthereumFork_Electra}, nil
case EthereumFork_Electra:
return []Fork{}, nil
default:
return []Fork{}, fmt.Errorf("unknown fork: %s", e)
Expand Down
1 change: 1 addition & 0 deletions lib/docker/ethereum/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ const (

GenesisGeneratorDenebImage = "tofelb/ethereum-genesis-generator:3.3.5-main-8a8fb99" // latest one, copy of public.ecr.aws/w0i8p0z9/ethereum-genesis-generator:main-8a8fb99
GenesisGeneratorShanghaiImage = "tofelb/ethereum-genesis-generator:2.0.5"
GenesisGeneratorElectraImage = "public.ecr.aws/w0i8p0z9/ethereum-genesis-generator:pr-b3204d7"
)
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ func startPrivateEthChainE(cmd *cobra.Command, args []string) error {
SlotsPerEpoch: 2,
SecondsPerSlot: 6,
ChainID: chainId,
HardForkEpochs: map[string]int{"Deneb": 500},
HardForkEpochs: map[string]int{"Deneb": 1, "Electra": 2,},
})


if waitForFinalization {
builder = *builder.WithWaitingForFinalization()
}
Expand Down
2 changes: 2 additions & 0 deletions lib/docker/test_env/genesis_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ import (
var generatorForkToImageMap = map[ethereum.Fork]string{
ethereum.EthereumFork_Shanghai: ethereum.GenesisGeneratorShanghaiImage,
ethereum.EthereumFork_Deneb: ethereum.GenesisGeneratorDenebImage,
ethereum.EthereumFork_Electra: ethereum.GenesisGeneratorElectraImage,
}

var generatorForkToDataDirMap = map[ethereum.Fork]string{
ethereum.EthereumFork_Shanghai: "/data/custom_config_data",
ethereum.EthereumFork_Deneb: "/data/metadata",
ethereum.EthereumFork_Electra: "/data/metadata",
}

type EthGenesisGenerator struct {
Expand Down
2 changes: 1 addition & 1 deletion lib/docker/test_env/genesis_generator_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export CAPELLA_FORK_EPOCH="0"
export DENEB_FORK_VERSION="0x50000038"
export DENEB_FORK_EPOCH="{{.HardForkEpochs.Deneb}}"
export ELECTRA_FORK_VERSION="0x60000038"
#export ELECTRA_FORK_EPOCH="{{.HardForkEpochs.Electra}}"
export ELECTRA_FORK_EPOCH="{{.HardForkEpochs.Electra}}"
export EIP7594_FORK_VERSION="0x70000000"
#export EIP7594_FORK_EPOCH="{{.HardForkEpochs.EOF}}"
export WITHDRAWAL_TYPE="0x00"
Expand Down
2 changes: 1 addition & 1 deletion lib/docker/test_env/nethermind_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (g *Nethermind) WaitUntilChainIsReady(ctx context.Context, waitTime time.Du
if g.GetEthereumVersion() == config_types.EthereumVersion_Eth1 {
return nil
}
waitForFirstBlock := tcwait.NewLogStrategy("Improved post-merge block").WithPollInterval(1 * time.Second).WithStartupTimeout(waitTime)
waitForFirstBlock := tcwait.NewLogStrategy("Received New Block").WithPollInterval(1 * time.Second).WithStartupTimeout(waitTime)
return waitForFirstBlock.WaitUntilReady(ctx, *g.GetContainer())
}

Expand Down
2 changes: 2 additions & 0 deletions lib/docker/test_env/prysm.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ const (
var beaconForkToImageMap = map[ethereum.Fork]string{
ethereum.EthereumFork_Shanghai: "gcr.io/prysmaticlabs/prysm/beacon-chain:v4.1.1",
ethereum.EthereumFork_Deneb: "gcr.io/prysmaticlabs/prysm/beacon-chain:v5.0.4",
ethereum.EthereumFork_Electra: "gcr.io/prysmaticlabs/prysm/beacon-chain:v6.0.4",
}

var validatorForkToImageMap = map[ethereum.Fork]string{
ethereum.EthereumFork_Shanghai: "gcr.io/prysmaticlabs/prysm/validator:v4.1.1",
ethereum.EthereumFork_Deneb: "gcr.io/prysmaticlabs/prysm/validator:v5.0.4",
ethereum.EthereumFork_Electra: "gcr.io/prysmaticlabs/prysm/validator:v6.0.4",
}

type PrysmBeaconChain struct {
Expand Down
Loading