Commit 60a75293 authored by Parithosh Jayanthi's avatar Parithosh Jayanthi Committed by GitHub

feat: Allow verkle to be at genesis or post genesis

Co-authored-by: default avatarBarnabas Busa <busa.barnabas@gmail.com>
parent 82ec85e8
participants: participants:
- el_client_type: geth - el_client_type: geth
el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-a45a9f2 el_client_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fc8f4b9
cl_client_type: lodestar cl_client_type: lighthouse
cl_client_image: ethpandaops/lodestar:g11tech-verge cl_client_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2 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: network_params:
electra_fork_epoch: 0 electra_fork_epoch: 0
deneb_fork_epoch: 1000 additional_services:
additional_services: [] - el_forkmon
- tx_spammer
- dora
snooper_enabled: true
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:transition-post-genesis-1d80ebd
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-1d80ebd
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
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
participants:
- el_client_type: geth
el_client_image: ethpandaops/geth:transition-post-genesis-1d80ebd
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-1d80ebd
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
...@@ -275,6 +275,7 @@ def run(plan, args={}): ...@@ -275,6 +275,7 @@ def run(plan, args={}):
genesis_constants.PRE_FUNDED_ACCOUNTS, genesis_constants.PRE_FUNDED_ACCOUNTS,
fuzz_target, fuzz_target,
tx_spammer_params, tx_spammer_params,
network_params.electra_fork_epoch,
) )
plan.print("Successfully launched transaction spammer") plan.print("Successfully launched transaction spammer")
elif additional_service == "blob_spammer": elif additional_service == "blob_spammer":
......
...@@ -160,11 +160,19 @@ def get_config( ...@@ -160,11 +160,19 @@ def get_config(
): ):
# TODO: Remove this once electra fork has path based storage scheme implemented # TODO: Remove this once electra fork has path based storage scheme implemented
if electra_fork_epoch != None: if electra_fork_epoch != None:
init_datadir_cmd_str = "geth init --cache.preimages --override.prague={0} --datadir={1} {2}".format( if electra_fork_epoch == 0: # verkle-gen
final_genesis_timestamp, init_datadir_cmd_str = "geth --datadir={0} --cache.preimages --override.prague={1} init {2}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", 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: elif "--builder" in extra_params or capella_fork_epoch != 0:
init_datadir_cmd_str = "geth init --datadir={0} {1}".format( init_datadir_cmd_str = "geth init --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
...@@ -190,10 +198,10 @@ def get_config( ...@@ -190,10 +198,10 @@ def get_config(
), ),
# Override prague fork timestamp for electra fork # Override prague fork timestamp for electra fork
"{0}".format("--cache.preimages" if electra_fork_epoch != None else ""), "{0}".format("--cache.preimages" if electra_fork_epoch != None else ""),
# Override prague fork timestamp for electra fork # Override prague fork timestamp if electra_fork_epoch == 0
"{0}".format( "{0}".format(
"--override.prague=" + final_genesis_timestamp "--override.prague=" + final_genesis_timestamp
if electra_fork_epoch != None if electra_fork_epoch == 0
else "" else ""
), ),
"--verbosity=" + verbosity_level, "--verbosity=" + verbosity_level,
......
...@@ -332,9 +332,6 @@ def parse_network_params(input_args): ...@@ -332,9 +332,6 @@ def parse_network_params(input_args):
if result["network_params"]["electra_fork_epoch"] != None: if result["network_params"]["electra_fork_epoch"] != None:
# if electra is defined, then deneb needs to be set very high # if electra is defined, then deneb needs to be set very high
result["network_params"]["deneb_fork_epoch"] = HIGH_DENEB_VALUE_FORK_VERKLE result["network_params"]["deneb_fork_epoch"] = HIGH_DENEB_VALUE_FORK_VERKLE
# TODO: remove once transition is complete
if result["network_params"]["electra_fork_epoch"] != 0:
fail("electra_fork_epoch can only be 0 or None")
if ( if (
result["network_params"]["capella_fork_epoch"] > 0 result["network_params"]["capella_fork_epoch"] > 0
......
...@@ -101,9 +101,14 @@ def launch_participant_network( ...@@ -101,9 +101,14 @@ def launch_participant_network(
) )
# we are running electra - experimental # we are running electra - experimental
elif network_params.electra_fork_epoch != None: elif network_params.electra_fork_epoch != None:
ethereum_genesis_generator_image = ( if network_params.electra_fork_epoch == 0:
"ethpandaops/ethereum-genesis-generator:3.0.0-rc.14" 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: else:
fail( fail(
"Unsupported fork epoch configuration, need to define either capella_fork_epoch, deneb_fork_epoch or electra_fork_epoch" "Unsupported fork epoch configuration, need to define either capella_fork_epoch, deneb_fork_epoch or electra_fork_epoch"
......
IMAGE_NAME = "ethpandaops/tx-fuzz:master" shared_utils = import_module("../shared_utils/shared_utils.star")
SERVICE_NAME = "transaction-spammer" SERVICE_NAME = "transaction-spammer"
def launch_transaction_spammer(plan, prefunded_addresses, el_uri, tx_spammer_params): def launch_transaction_spammer(
plan, prefunded_addresses, el_uri, tx_spammer_params, electra_fork_epoch
):
config = get_config( config = get_config(
prefunded_addresses, el_uri, tx_spammer_params.tx_spammer_extra_args prefunded_addresses,
el_uri,
tx_spammer_params.tx_spammer_extra_args,
electra_fork_epoch,
) )
plan.add_service(SERVICE_NAME, config) plan.add_service(SERVICE_NAME, config)
def get_config(prefunded_addresses, el_uri, tx_spammer_extra_args): def get_config(prefunded_addresses, el_uri, tx_spammer_extra_args, electra_fork_epoch):
# Temp hack to use the old tx-fuzz image until we can get the new one working
if electra_fork_epoch != None:
tx_spammer_image = "ethpandaops/tx-fuzz:kaustinen-281adbc"
else:
tx_spammer_image = "ethpandaops/tx-fuzz:master"
return ServiceConfig( return ServiceConfig(
image=IMAGE_NAME, image=tx_spammer_image,
cmd=[ cmd=[
"spam", "spam",
"--rpc={}".format(el_uri), "--rpc={}".format(el_uri),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment