Skip to content

Commit

Permalink
add logic to be able to handle verkle and verkle-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Nov 30, 2023
1 parent 71d2322 commit 087cbb1
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 24 deletions.
10 changes: 0 additions & 10 deletions .github/tests/petra.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/tests/verkle-gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fc8f4b9
cl_client_type: lighthouse
cl_client_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fc8f4b9
cl_client_type: lodestar
cl_client_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
electra_fork_epoch: 0
additional_services:
- el_forkmon
- tx_spammer
- dora
snooper_enabled: true
17 changes: 17 additions & 0 deletions .github/tests/verkle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-refactor-transition-post-genesis-0da3cd3
cl_client_type: lighthouse
cl_client_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-refactor-transition-post-genesis-0da3cd3
cl_client_type: lodestar
cl_client_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
electra_fork_epoch: 1
additional_services:
- el_forkmon
- tx_spammer
- dora
snooper_enabled: true
17 changes: 17 additions & 0 deletions examples/verkle-gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fc8f4b9
cl_client_type: lighthouse
cl_client_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2
- el_client_type: geth
el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fc8f4b9
cl_client_type: lodestar
cl_client_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
electra_fork_epoch: 0
additional_services:
- el_forkmon
- tx_spammer
- dora
snooper_enabled: true
10 changes: 3 additions & 7 deletions examples/verkle.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
mev_type: null
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:transition-post-genesis-21cebf0
el_client_image: ethpandaops/geth:gballet-refactor-transition-post-genesis-0da3cd3
cl_client_type: lighthouse
cl_client_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2
- el_client_type: geth
el_client_image: ethpandaops/geth:transition-post-genesis-21cebf0
el_client_image: ethpandaops/geth:gballet-refactor-transition-post-genesis-0da3cd3
cl_client_type: lodestar
cl_client_image: ethpandaops/lodestar:g11tech-verge-c713167
cl_client_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
deneb_fork_epoch: 500
electra_fork_epoch: 1
genesis_delay: 100
launch_additional_services: true
additional_services:
- el_forkmon
- tx_spammer
Expand Down
21 changes: 17 additions & 4 deletions src/el/geth/geth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,17 @@ def get_config(
):
# TODO: Remove this once electra fork has path based storage scheme implemented
if electra_fork_epoch != None:
init_datadir_cmd_str = "geth init --cache.preimages --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
if electra_fork_epoch == 0: # verkle-gen
init_datadir_cmd_str = "geth --datadir={0} --cache.preimages --override.prague={1} init {2}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
final_genesis_timestamp,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
else: # verkle
init_datadir_cmd_str = "geth --datadir={0} --cache.preimages init {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
elif "--builder" in extra_params or capella_fork_epoch != 0:
init_datadir_cmd_str = "geth init --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
Expand All @@ -186,6 +193,12 @@ def get_config(
),
# Override prague fork timestamp for electra fork
"{0}".format("--cache.preimages" if electra_fork_epoch != None else ""),
# Override prague fork timestamp if electra_fork_epoch == 0
"{0}".format(
"--override.prague=" + final_genesis_timestamp
if electra_fork_epoch == 0
else ""
),
"--verbosity=" + verbosity_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--networkid=" + network_id,
Expand Down
11 changes: 8 additions & 3 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ def launch_participant_network(
)
# we are running electra - experimental
elif network_params.electra_fork_epoch != None:
ethereum_genesis_generator_image = (
"ethpandaops/ethereum-genesis-generator:3.0.0-rc.16"
)
if network_params.electra_fork_epoch == 0:
ethereum_genesis_generator_image = (
"ethpandaops/ethereum-genesis-generator:3.0.0-rc.14"
)
else:
ethereum_genesis_generator_image = (
"ethpandaops/ethereum-genesis-generator:3.0.0-rc.16"
)
else:
fail(
"Unsupported fork epoch configuration, need to define either capella_fork_epoch, deneb_fork_epoch or electra_fork_epoch"
Expand Down

0 comments on commit 087cbb1

Please sign in to comment.