From 77e58a997b2c9e8f1a5ff3838dcd3679ea9e2139 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 4 Dec 2024 14:12:26 +0100 Subject: [PATCH 01/11] feat: add support for older forks --- .github/tests/altair.yaml | 23 +++++++++++++++++++ .github/tests/bellatrix.yaml | 23 +++++++++++++++++++ .github/tests/capella.yaml | 23 +++++++++++++++++++ .github/tests/deneb.yaml | 23 +++++++++++++++++++ .github/tests/electra.yaml | 23 +++++++++++++++++++ README.md | 21 ++++++++++++++++- src/network_launcher/kurtosis.star | 23 ++++--------------- src/package_io/constants.star | 5 ++-- src/package_io/input_parser.star | 9 ++++++++ src/package_io/sanity_check.star | 3 +++ .../el_cl_genesis_generator.star | 4 ++++ .../el-cl/values.env.tmpl | 5 +++- 12 files changed, 162 insertions(+), 23 deletions(-) create mode 100644 .github/tests/altair.yaml create mode 100644 .github/tests/bellatrix.yaml create mode 100644 .github/tests/capella.yaml create mode 100644 .github/tests/deneb.yaml create mode 100644 .github/tests/electra.yaml diff --git a/.github/tests/altair.yaml b/.github/tests/altair.yaml new file mode 100644 index 000000000..6e9b50a58 --- /dev/null +++ b/.github/tests/altair.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: geth + cl_type: nimbus + - el_type: geth + cl_type: lighthouse + - el_type: geth + cl_type: lodestar + - el_type: geth + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 1 + bellatrix_fork_epoch: 2 + capella_fork_epoch: 3 + deneb_fork_epoch: 4 + electra_fork_epoch: 5 + fulu_fork_epoch: 6 + preset: minimal diff --git a/.github/tests/bellatrix.yaml b/.github/tests/bellatrix.yaml new file mode 100644 index 000000000..bded07f30 --- /dev/null +++ b/.github/tests/bellatrix.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: geth + cl_type: nimbus + - el_type: geth + cl_type: lighthouse + - el_type: geth + cl_type: lodestar + - el_type: geth + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 1 + capella_fork_epoch: 2 + deneb_fork_epoch: 3 + electra_fork_epoch: 4 + fulu_fork_epoch: 5 + preset: minimal diff --git a/.github/tests/capella.yaml b/.github/tests/capella.yaml new file mode 100644 index 000000000..ed7f9194c --- /dev/null +++ b/.github/tests/capella.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: geth + cl_type: nimbus + - el_type: geth + cl_type: lighthouse + - el_type: geth + cl_type: lodestar + - el_type: geth + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 0 + capella_fork_epoch: 1 + deneb_fork_epoch: 2 + electra_fork_epoch: 3 + fulu_fork_epoch: 4 + preset: minimal diff --git a/.github/tests/deneb.yaml b/.github/tests/deneb.yaml new file mode 100644 index 000000000..c4493e2b2 --- /dev/null +++ b/.github/tests/deneb.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: geth + cl_type: nimbus + - el_type: geth + cl_type: lighthouse + - el_type: geth + cl_type: lodestar + - el_type: geth + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 0 + capella_fork_epoch: 0 + deneb_fork_epoch: 1 + electra_fork_epoch: 2 + fulu_fork_epoch: 3 + preset: minimal diff --git a/.github/tests/electra.yaml b/.github/tests/electra.yaml new file mode 100644 index 000000000..402c05280 --- /dev/null +++ b/.github/tests/electra.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: geth + cl_type: nimbus + - el_type: geth + cl_type: lighthouse + - el_type: geth + cl_type: lodestar + - el_type: geth + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 0 + capella_fork_epoch: 0 + deneb_fork_epoch: 0 + electra_fork_epoch: 1 + fulu_fork_epoch: 2 + preset: minimal diff --git a/README.md b/README.md index 1a6c29b3b..f82e14bc7 100644 --- a/README.md +++ b/README.md @@ -536,14 +536,33 @@ network_params: # The epoch at which the deneb/electra/eip7594(peerdas) forks are set to occur. Note: PeerDAS and Electra clients are currently # working on forks. So set either one of the below forks. + # Altair fork epoch + # Defaults to 0 + altair_fork_epoch: 0 + + # Bellatrix fork epoch + # Defaults to 0 + bellatrix_fork_epoch: 0 + + # Capella fork epoch + # Defaults to 0 + capella_fork_epoch: 0 + + # Deneb fork epoch + # Defaults to 0 deneb_fork_epoch: 0 + # Electra fork epoch + # Defaults to 100000000 electra_fork_epoch: 100000000 + # Fulu fork epoch + # Defaults to 100000001 fulu_fork_epoch: 100000001 + # Eip7594 fork epoch + # Defaults to 100000002 eip7594_fork_epoch: 100000002 - # The fork version to set if the eip7594 fork is active eip7594_fork_version: "0x60000038" diff --git a/src/network_launcher/kurtosis.star b/src/network_launcher/kurtosis.star index 2a5e45884..252868747 100644 --- a/src/network_launcher/kurtosis.star +++ b/src/network_launcher/kurtosis.star @@ -57,30 +57,17 @@ def launch( plan.print("Generating EL CL data") - # we are running capella genesis - deprecated - if network_params.deneb_fork_epoch > 0: - ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc( - args_with_right_defaults.docker_cache_params, - constants.ETHEREUM_GENESIS_GENERATOR.capella_genesis, - ) - # we are running deneb genesis - default behavior - elif network_params.deneb_fork_epoch == 0: - ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc( - args_with_right_defaults.docker_cache_params, - constants.ETHEREUM_GENESIS_GENERATOR.deneb_genesis, - ) + ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc( + args_with_right_defaults.docker_cache_params, + constants.ETHEREUM_GENESIS_GENERATOR.default_genesis_generator_image, + ) # we are running electra - experimental - elif network_params.electra_fork_epoch != None: + if network_params.electra_fork_epoch != None: if network_params.electra_fork_epoch == 0: ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc( args_with_right_defaults.docker_cache_params, constants.ETHEREUM_GENESIS_GENERATOR.verkle_genesis, ) - else: - ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc( - args_with_right_defaults.docker_cache_params, - constants.ETHEREUM_GENESIS_GENERATOR.verkle_support_genesis, - ) else: fail( "Unsupported fork epoch configuration, need to define either deneb_fork_epoch or electra_fork_epoch" diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 5f692b002..8850e7f4c 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -103,6 +103,7 @@ DEFAULT_MNEMONIC = "giant issue aisle success illegal bike spike question tent b PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" GENESIS_FORK_VERSION = "0x10000038" +ALTAIR_FORK_VERSION = "0x20000038" BELLATRIX_FORK_VERSION = "0x30000038" CAPELLA_FORK_VERSION = "0x40000038" DENEB_FORK_VERSION = "0x50000038" @@ -123,9 +124,7 @@ CONTAINER_REGISTRY = struct( ETHEREUM_GENESIS_GENERATOR = struct( - capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated (no support for minimal config) - deneb_genesis="ethpandaops/ethereum-genesis-generator:3.4.1", # Default - verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis, waiting for rebase + default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:fix-default-issue-66a93b6", # Default verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0", ) diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index a3ed80186..1779bba55 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -313,6 +313,9 @@ def input_parser(plan, input_args): churn_limit_quotient=result["network_params"]["churn_limit_quotient"], ejection_balance=result["network_params"]["ejection_balance"], eth1_follow_distance=result["network_params"]["eth1_follow_distance"], + altair_fork_epoch=result["network_params"]["altair_fork_epoch"], + bellatrix_fork_epoch=result["network_params"]["bellatrix_fork_epoch"], + capella_fork_epoch=result["network_params"]["capella_fork_epoch"], deneb_fork_epoch=result["network_params"]["deneb_fork_epoch"], electra_fork_epoch=result["network_params"]["electra_fork_epoch"], fulu_fork_epoch=result["network_params"]["fulu_fork_epoch"], @@ -865,6 +868,9 @@ def default_network_params(): "eth1_follow_distance": 2048, "min_validator_withdrawability_delay": 256, "shard_committee_period": 256, + "altair_fork_epoch": 0, + "bellatrix_fork_epoch": 0, + "capella_fork_epoch": 0, "deneb_fork_epoch": 0, "electra_fork_epoch": constants.ELECTRA_FORK_EPOCH, "fulu_fork_epoch": constants.FULU_FORK_EPOCH, @@ -899,6 +905,9 @@ def default_minimal_network_params(): "eth1_follow_distance": 16, "min_validator_withdrawability_delay": 256, "shard_committee_period": 64, + "altair_fork_epoch": 0, + "bellatrix_fork_epoch": 0, + "capella_fork_epoch": 0, "deneb_fork_epoch": 0, "electra_fork_epoch": constants.ELECTRA_FORK_EPOCH, "fulu_fork_epoch": constants.FULU_FORK_EPOCH, diff --git a/src/package_io/sanity_check.star b/src/package_io/sanity_check.star index b79e4e464..72a403526 100644 --- a/src/package_io/sanity_check.star +++ b/src/package_io/sanity_check.star @@ -153,6 +153,9 @@ SUBCATEGORY_PARAMS = { "eth1_follow_distance", "min_validator_withdrawability_delay", "shard_committee_period", + "altair_fork_epoch", + "bellatrix_fork_epoch", + "capella_fork_epoch", "deneb_fork_epoch", "electra_fork_epoch", "fulu_fork_epoch", diff --git a/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star b/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star index fbbeb8196..e5ee97d76 100644 --- a/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star +++ b/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star @@ -107,12 +107,16 @@ def new_env_file_for_el_cl_genesis_data( "ChurnLimitQuotient": network_params.churn_limit_quotient, "EjectionBalance": network_params.ejection_balance, "Eth1FollowDistance": network_params.eth1_follow_distance, + "AltairForkEpoch": network_params.altair_fork_epoch, + "BellatrixForkEpoch": network_params.bellatrix_fork_epoch, + "CapellaForkEpoch": network_params.capella_fork_epoch, "DenebForkEpoch": network_params.deneb_fork_epoch, "ElectraForkEpoch": network_params.electra_fork_epoch, "FuluForkEpoch": network_params.fulu_fork_epoch, "EIP7594ForkEpoch": network_params.eip7594_fork_epoch, "EIP7594ForkVersion": network_params.eip7594_fork_version, "GenesisForkVersion": constants.GENESIS_FORK_VERSION, + "AltairForkVersion": constants.ALTAIR_FORK_VERSION, "BellatrixForkVersion": constants.BELLATRIX_FORK_VERSION, "CapellaForkVersion": constants.CAPELLA_FORK_VERSION, "DenebForkVersion": constants.DENEB_FORK_VERSION, diff --git a/static_files/genesis-generation-config/el-cl/values.env.tmpl b/static_files/genesis-generation-config/el-cl/values.env.tmpl index 9eb01b2ea..d593ba1ee 100644 --- a/static_files/genesis-generation-config/el-cl/values.env.tmpl +++ b/static_files/genesis-generation-config/el-cl/values.env.tmpl @@ -7,9 +7,12 @@ export SLOT_DURATION_IN_SECONDS={{ .SecondsPerSlot }} export DEPOSIT_CONTRACT_BLOCK="0x0000000000000000000000000000000000000000000000000000000000000000" export NUMBER_OF_VALIDATORS={{ .NumValidatorKeysToPreregister }} export GENESIS_FORK_VERSION="{{ .GenesisForkVersion }}" -export ALTAIR_FORK_VERSION="0x20000038" +export ALTAIR_FORK_VERSION="{{ .AltairForkVersion }}" +export ALTAIR_FORK_EPOCH="{{ .AltairForkEpoch }}" export BELLATRIX_FORK_VERSION="{{ .BellatrixForkVersion }}" +export BELLATRIX_FORK_EPOCH="{{ .BellatrixForkEpoch }}" export CAPELLA_FORK_VERSION="{{ .CapellaForkVersion }}" +export CAPELLA_FORK_EPOCH="{{ .CapellaForkEpoch }}" export DENEB_FORK_VERSION="{{ .DenebForkVersion }}" export DENEB_FORK_EPOCH="{{ .DenebForkEpoch }}" export ELECTRA_FORK_VERSION="{{ .ElectraForkVersion }}" From 10550368f588ffac50b2d0931435723cc2557710 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 4 Dec 2024 14:16:07 +0100 Subject: [PATCH 02/11] remove false check --- .github/tests/altair.yaml | 10 +++++----- .github/tests/bellatrix.yaml | 10 +++++----- .github/tests/capella.yaml | 10 +++++----- .github/tests/deneb.yaml | 10 +++++----- .github/tests/electra.yaml | 10 +++++----- .github/tests/fulu.yaml | 23 +++++++++++++++++++++++ src/package_io/input_parser.star | 4 ---- 7 files changed, 48 insertions(+), 29 deletions(-) create mode 100644 .github/tests/fulu.yaml diff --git a/.github/tests/altair.yaml b/.github/tests/altair.yaml index 6e9b50a58..b0efc1c79 100644 --- a/.github/tests/altair.yaml +++ b/.github/tests/altair.yaml @@ -1,15 +1,15 @@ participants: - el_type: geth cl_type: teku - - el_type: geth + - el_type: reth cl_type: prysm - - el_type: geth + - el_type: nethermind cl_type: nimbus - - el_type: geth + - el_type: besu cl_type: lighthouse - - el_type: geth + - el_type: nimbus cl_type: lodestar - - el_type: geth + - el_type: erigon cl_type: grandine additional_services: - dora diff --git a/.github/tests/bellatrix.yaml b/.github/tests/bellatrix.yaml index bded07f30..e3c15a347 100644 --- a/.github/tests/bellatrix.yaml +++ b/.github/tests/bellatrix.yaml @@ -1,15 +1,15 @@ participants: - el_type: geth cl_type: teku - - el_type: geth + - el_type: reth cl_type: prysm - - el_type: geth + - el_type: nethermind cl_type: nimbus - - el_type: geth + - el_type: besu cl_type: lighthouse - - el_type: geth + - el_type: nimbus cl_type: lodestar - - el_type: geth + - el_type: erigon cl_type: grandine additional_services: - dora diff --git a/.github/tests/capella.yaml b/.github/tests/capella.yaml index ed7f9194c..718d96147 100644 --- a/.github/tests/capella.yaml +++ b/.github/tests/capella.yaml @@ -1,15 +1,15 @@ participants: - el_type: geth cl_type: teku - - el_type: geth + - el_type: reth cl_type: prysm - - el_type: geth + - el_type: nethermind cl_type: nimbus - - el_type: geth + - el_type: besu cl_type: lighthouse - - el_type: geth + - el_type: nimbus cl_type: lodestar - - el_type: geth + - el_type: erigon cl_type: grandine additional_services: - dora diff --git a/.github/tests/deneb.yaml b/.github/tests/deneb.yaml index c4493e2b2..a58daf8b5 100644 --- a/.github/tests/deneb.yaml +++ b/.github/tests/deneb.yaml @@ -1,15 +1,15 @@ participants: - el_type: geth cl_type: teku - - el_type: geth + - el_type: reth cl_type: prysm - - el_type: geth + - el_type: nethermind cl_type: nimbus - - el_type: geth + - el_type: besu cl_type: lighthouse - - el_type: geth + - el_type: nimbus cl_type: lodestar - - el_type: geth + - el_type: erigon cl_type: grandine additional_services: - dora diff --git a/.github/tests/electra.yaml b/.github/tests/electra.yaml index 402c05280..78017bba0 100644 --- a/.github/tests/electra.yaml +++ b/.github/tests/electra.yaml @@ -1,15 +1,15 @@ participants: - el_type: geth cl_type: teku - - el_type: geth + - el_type: reth cl_type: prysm - - el_type: geth + - el_type: nethermind cl_type: nimbus - - el_type: geth + - el_type: besu cl_type: lighthouse - - el_type: geth + - el_type: nimbus cl_type: lodestar - - el_type: geth + - el_type: erigon cl_type: grandine additional_services: - dora diff --git a/.github/tests/fulu.yaml b/.github/tests/fulu.yaml new file mode 100644 index 000000000..76c651fad --- /dev/null +++ b/.github/tests/fulu.yaml @@ -0,0 +1,23 @@ +participants: + - el_type: geth + cl_type: teku + - el_type: reth + cl_type: prysm + - el_type: nethermind + cl_type: nimbus + - el_type: besu + cl_type: lighthouse + - el_type: nimbus + cl_type: lodestar + - el_type: erigon + cl_type: grandine +additional_services: + - dora +network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 0 + capella_fork_epoch: 0 + deneb_fork_epoch: 0 + electra_fork_epoch: 0 + fulu_fork_epoch: 1 + preset: minimal diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 1779bba55..2f2956324 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -747,10 +747,6 @@ def parse_network_params(plan, input_args): + " is not supported, it can only be mainnet or minimal" ) - if result["network_params"]["preset"] == "minimal": - if result["network_params"]["deneb_fork_epoch"] > 0: - fail("minimal preset only supports deneb genesis fork epoch") - return result From cfa462b0c4590739ac59a0afcc4dcad9314b6478 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 4 Dec 2024 15:22:09 +0100 Subject: [PATCH 03/11] add parsed files to network --- .../el_cl_genesis/el_cl_genesis_generator.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star b/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star index e5ee97d76..1fe188365 100644 --- a/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star +++ b/src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star @@ -49,7 +49,7 @@ def generate_el_cl_genesis_data( genesis = plan.run_sh( name="run-generate-genesis", description="Creating genesis", - run="cp /opt/values.env /config/values.env && ./entrypoint.sh all && mkdir /network-configs && mv /data/metadata/* /network-configs/", + run="cp /opt/values.env /config/values.env && ./entrypoint.sh all && mkdir /network-configs && mv /data/metadata/* /network-configs/ && mv /data/parsed /network-configs/parsed", image=image, files=files, store=[ From c9dcf67da1e73893b04b3ede4b747356f8234f33 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 4 Dec 2024 15:28:23 +0100 Subject: [PATCH 04/11] add test files --- .github/tests/altair.yaml | 2 +- .github/tests/capella.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/tests/altair.yaml b/.github/tests/altair.yaml index b0efc1c79..be9c05ea9 100644 --- a/.github/tests/altair.yaml +++ b/.github/tests/altair.yaml @@ -20,4 +20,4 @@ network_params: deneb_fork_epoch: 4 electra_fork_epoch: 5 fulu_fork_epoch: 6 - preset: minimal + genesis_delay: 120 diff --git a/.github/tests/capella.yaml b/.github/tests/capella.yaml index 718d96147..2611e0e37 100644 --- a/.github/tests/capella.yaml +++ b/.github/tests/capella.yaml @@ -20,4 +20,5 @@ network_params: deneb_fork_epoch: 2 electra_fork_epoch: 3 fulu_fork_epoch: 4 - preset: minimal + genesis_delay: 120 +snooper_enabled: true From 331004f0609b04c8d6f5e0846672e474ec710091 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 12:02:28 +0100 Subject: [PATCH 05/11] bump test files and egg --- .github/tests/{bellatrix.yaml => altair-genesis.yaml} | 3 ++- .github/tests/{capella.yaml => bellatrix-genesis.yaml} | 1 - .github/tests/{electra.yaml => capella-genesis.yaml} | 8 ++++---- .github/tests/{dencun-genesis.yaml => deneb-genesis.yaml} | 6 ++++++ .github/tests/{altair.yaml => phase0-genesis.yaml} | 0 src/package_io/constants.star | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) rename .github/tests/{bellatrix.yaml => altair-genesis.yaml} (95%) rename .github/tests/{capella.yaml => bellatrix-genesis.yaml} (95%) rename .github/tests/{electra.yaml => capella-genesis.yaml} (81%) rename .github/tests/{dencun-genesis.yaml => deneb-genesis.yaml} (67%) rename .github/tests/{altair.yaml => phase0-genesis.yaml} (100%) diff --git a/.github/tests/bellatrix.yaml b/.github/tests/altair-genesis.yaml similarity index 95% rename from .github/tests/bellatrix.yaml rename to .github/tests/altair-genesis.yaml index e3c15a347..848ec4253 100644 --- a/.github/tests/bellatrix.yaml +++ b/.github/tests/altair-genesis.yaml @@ -20,4 +20,5 @@ network_params: deneb_fork_epoch: 3 electra_fork_epoch: 4 fulu_fork_epoch: 5 - preset: minimal + genesis_delay: 120 + diff --git a/.github/tests/capella.yaml b/.github/tests/bellatrix-genesis.yaml similarity index 95% rename from .github/tests/capella.yaml rename to .github/tests/bellatrix-genesis.yaml index 2611e0e37..a3251507c 100644 --- a/.github/tests/capella.yaml +++ b/.github/tests/bellatrix-genesis.yaml @@ -21,4 +21,3 @@ network_params: electra_fork_epoch: 3 fulu_fork_epoch: 4 genesis_delay: 120 -snooper_enabled: true diff --git a/.github/tests/electra.yaml b/.github/tests/capella-genesis.yaml similarity index 81% rename from .github/tests/electra.yaml rename to .github/tests/capella-genesis.yaml index 78017bba0..ac3c320bb 100644 --- a/.github/tests/electra.yaml +++ b/.github/tests/capella-genesis.yaml @@ -17,7 +17,7 @@ network_params: altair_fork_epoch: 0 bellatrix_fork_epoch: 0 capella_fork_epoch: 0 - deneb_fork_epoch: 0 - electra_fork_epoch: 1 - fulu_fork_epoch: 2 - preset: minimal + deneb_fork_epoch: 1 + electra_fork_epoch: 2 + fulu_fork_epoch: 3 + genesis_delay: 120 diff --git a/.github/tests/dencun-genesis.yaml b/.github/tests/deneb-genesis.yaml similarity index 67% rename from .github/tests/dencun-genesis.yaml rename to .github/tests/deneb-genesis.yaml index e4ba69438..61f9d6b70 100644 --- a/.github/tests/dencun-genesis.yaml +++ b/.github/tests/deneb-genesis.yaml @@ -12,4 +12,10 @@ participants: - el_type: ethereumjs cl_type: teku network_params: + altair_fork_epoch: 0 + bellatrix_fork_epoch: 0 + capella_fork_epoch: 0 deneb_fork_epoch: 0 + electra_fork_epoch: 1 + fulu_fork_epoch: 2 + genesis_delay: 120 diff --git a/.github/tests/altair.yaml b/.github/tests/phase0-genesis.yaml similarity index 100% rename from .github/tests/altair.yaml rename to .github/tests/phase0-genesis.yaml diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 8850e7f4c..85dea648a 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -124,7 +124,7 @@ CONTAINER_REGISTRY = struct( ETHEREUM_GENESIS_GENERATOR = struct( - default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:fix-default-issue-66a93b6", # Default + default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:v3.4.3", # Default verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0", ) From 68f8132a60fc6206d8242d08256924448a00f9d3 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 12:04:31 +0100 Subject: [PATCH 06/11] change tag name --- src/package_io/constants.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 85dea648a..4100f455f 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -124,7 +124,7 @@ CONTAINER_REGISTRY = struct( ETHEREUM_GENESIS_GENERATOR = struct( - default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:v3.4.3", # Default + default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:3.4.3", # Default verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0", ) From f715eedc7c0379957755567acebbd8c63f7a9c67 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 16:13:39 +0100 Subject: [PATCH 07/11] feat: add spamoor --- .github/tests/minimal.yaml | 16 ++----- .github/tests/mix-with-tools-mev.yaml | 1 + .github/tests/mix-with-tools-minimal.yaml | 1 + .github/tests/mix-with-tools.yaml | 1 + README.md | 14 ++++++ main.star | 10 +++++ src/package_io/input_parser.star | 25 +++++++++++ src/package_io/sanity_check.star | 8 ++++ src/spamoor/spamoor.star | 55 +++++++++++++++++++++++ 9 files changed, 119 insertions(+), 12 deletions(-) create mode 100644 src/spamoor/spamoor.star diff --git a/.github/tests/minimal.yaml b/.github/tests/minimal.yaml index aea361d67..d7931d32b 100644 --- a/.github/tests/minimal.yaml +++ b/.github/tests/minimal.yaml @@ -1,15 +1,7 @@ participants: - - el_type: geth - cl_type: teku - - el_type: geth - cl_type: prysm - - el_type: erigon - cl_type: nimbus - - el_type: besu - cl_type: lighthouse - - el_type: reth - cl_type: lodestar - - el_type: geth - cl_type: grandine + - cl_type: prysm + cl_image: ethpandaops/prysm-beacon-chain:develop-bazel-minimal-30a136f # bazel built just now works + - cl_type: prysm + cl_image: ethpandaops/prysm-beacon-chain:develop-go-fixv2-minimal-linux-arm64-30a136f # built with go, not working network_params: preset: minimal diff --git a/.github/tests/mix-with-tools-mev.yaml b/.github/tests/mix-with-tools-mev.yaml index 728fb31a5..ae82f9943 100644 --- a/.github/tests/mix-with-tools-mev.yaml +++ b/.github/tests/mix-with-tools-mev.yaml @@ -26,6 +26,7 @@ additional_services: - blutgang - apache - tracoor + - spamoor ethereum_metrics_exporter_enabled: true snooper_enabled: true mev_type: flashbots diff --git a/.github/tests/mix-with-tools-minimal.yaml b/.github/tests/mix-with-tools-minimal.yaml index 8ec08e1c0..744789604 100644 --- a/.github/tests/mix-with-tools-minimal.yaml +++ b/.github/tests/mix-with-tools-minimal.yaml @@ -28,6 +28,7 @@ additional_services: - blutgang - apache - tracoor + - spamoor ethereum_metrics_exporter_enabled: true snooper_enabled: true keymanager_enabled: true diff --git a/.github/tests/mix-with-tools.yaml b/.github/tests/mix-with-tools.yaml index ed4fc57e5..bc9317ff6 100644 --- a/.github/tests/mix-with-tools.yaml +++ b/.github/tests/mix-with-tools.yaml @@ -28,6 +28,7 @@ additional_services: - blutgang - apache - tracoor + - spamoor ethereum_metrics_exporter_enabled: true snooper_enabled: true keymanager_enabled: true diff --git a/README.md b/README.md index f82e14bc7..e11c3e23b 100644 --- a/README.md +++ b/README.md @@ -927,6 +927,19 @@ checkpoint_sync_enabled: false # Global flag to set checkpoint sync url checkpoint_sync_url: "" +# Spamoor params +spamoor_params: + # The image to use for spamoor + image: ethpandaops/spamoor:latest + # Throughput of spamoor + throughput: 1000 + # Max pending transactions for spamoor + max_pending: 1000 + # Max wallets for spamoor + max_wallets: 1000 + # Extra parameters to send to spamoor + spamoor_extra_args: [] + # Global paarameter to set the exit ip address of services and public ports port_publisher: # if you have a service that you want to expose on a specific interfact; set that IP here @@ -1166,6 +1179,7 @@ Here's a table of where the keys are used | 8 | assertoor | ✅ | ✅ | As the funding for tests | | 11 | mev_custom_flood | ✅ | | As the sender of balance | | 12 | l2_contracts | ✅ | | Contract deployer address | +| 13 | spamoor | ✅ | | Spams transactions | ## Developing On This Package diff --git a/main.star b/main.star index 87302cb83..1f39d5f6d 100644 --- a/main.star +++ b/main.star @@ -61,6 +61,7 @@ assertoor = import_module("./src/assertoor/assertoor_launcher.star") get_prefunded_accounts = import_module( "./src/prefunded_accounts/get_prefunded_accounts.star" ) +spamoor = import_module("./src/spamoor/spamoor.star") GRAFANA_USER = "admin" GRAFANA_PASSWORD = "admin" @@ -686,6 +687,15 @@ def run(plan, args={}): global_node_selectors, args_with_right_defaults.docker_cache_params, ) + elif additional_service == "spamoor": + plan.print("Launching spamoor") + spamoor.launch_spamoor( + plan, + prefunded_accounts, + all_el_contexts, + args_with_right_defaults.spamoor_params, + global_node_selectors, + ) else: fail("Invalid additional service %s" % (additional_service)) if launch_prometheus_grafana: diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 2f2956324..9895a3ebb 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -86,6 +86,7 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = ( "custom_flood_params", "xatu_sentry_params", "port_publisher", + "spamoor_params", ) @@ -119,6 +120,7 @@ def input_parser(plan, input_args): result["global_tolerations"] = [] result["global_node_selectors"] = {} result["port_publisher"] = get_port_publisher_params("default") + result["spamoor_params"] = get_default_spamoor_params() if constants.NETWORK_NAME.shadowfork in result["network_params"]["network"]: shadow_base = result["network_params"]["network"].split("-shadowfork")[0] @@ -184,6 +186,10 @@ def input_parser(plan, input_args): result["xatu_sentry_params"][sub_attr] = sub_value elif attr == "port_publisher": result["port_publisher"] = get_port_publisher_params("user", input_args) + elif attr == "spamoor_params": + for sub_attr in input_args["spamoor_params"]: + sub_value = input_args["spamoor_params"][sub_attr] + result["spamoor_params"][sub_attr] = sub_value if result.get("disable_peer_scoring"): result = enrich_disable_peer_scoring(result) @@ -430,6 +436,13 @@ def input_parser(plan, input_args): "interval_between_transactions" ], ), + spamoor_params=struct( + image=result["spamoor_params"]["image"], + throughput=result["spamoor_params"]["throughput"], + max_pending=result["spamoor_params"]["max_pending"], + max_wallets=result["spamoor_params"]["max_wallets"], + spamoor_extra_args=result["spamoor_params"]["spamoor_extra_args"], + ), additional_services=result["additional_services"], wait_for_finalization=result["wait_for_finalization"], global_log_level=result["global_log_level"], @@ -844,6 +857,7 @@ def default_input_args(input_args): "nat_exit_ip": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, "public_port_start": None, }, + "spamoor_params": get_default_spamoor_params(), } @@ -1151,6 +1165,16 @@ def get_default_xatu_sentry_params(): } +def get_default_spamoor_params(): + return { + "image": "ethpandaops/spamoor:latest", + "throughput": 1000, + "max_pending": 1000, + "max_wallets": 1000, + "spamoor_extra_args": [], + } + + def get_default_custom_flood_params(): # this is a simple script that increases the balance of the coinbase address at a cadence return {"interval_between_transactions": 1} @@ -1346,6 +1370,7 @@ def docker_cache_image_override(plan, result): "goomy_blob_params.image", "prometheus_params.image", "grafana_params.image", + "spamoor_params.image", ] if result["docker_cache_params"]["url"] == "": diff --git a/src/package_io/sanity_check.star b/src/package_io/sanity_check.star index 72a403526..db85aeb99 100644 --- a/src/package_io/sanity_check.star +++ b/src/package_io/sanity_check.star @@ -244,6 +244,13 @@ SUBCATEGORY_PARAMS = { "xatu_server_headers", "beacon_subscriptions", ], + "spamoor_params": [ + "image", + "throughput", + "max_pending", + "max_wallets", + "spamoor_extra_args", + ], "port_publisher": [ "nat_exit_ip", "el", @@ -273,6 +280,7 @@ ADDITIONAL_SERVICES_PARAMS = [ "forky", "apache", "tracoor", + "spamoor", ] ADDITIONAL_CATEGORY_PARAMS = { diff --git a/src/spamoor/spamoor.star b/src/spamoor/spamoor.star new file mode 100644 index 000000000..7a7e48368 --- /dev/null +++ b/src/spamoor/spamoor.star @@ -0,0 +1,55 @@ +shared_utils = import_module("../shared_utils/shared_utils.star") +SERVICE_NAME = "spamoor" + +# The min/max CPU/memory that spamoor can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 20 +MAX_MEMORY = 300 + + +def launch_spamoor( + plan, + prefunded_addresses, + all_el_contexts, + spamoor_params, + global_node_selectors, +): + config = get_config( + prefunded_addresses, + all_el_contexts, + spamoor_params, + global_node_selectors, + ) + plan.add_service(SERVICE_NAME, config) + + +def get_config( + prefunded_addresses, + all_el_contexts, + spamoor_params, + node_selectors, +): + cmd = [ + "eoatx", + "--privkey={}".format(prefunded_addresses[13].private_key), + "--rpchost={}".format( + ",".join([el_context.rpc_http_url for el_context in all_el_contexts]) + ), + "--throughput={}".format(spamoor_params.throughput), + "--max-pending={}".format(spamoor_params.max_pending), + "--max-wallets={}".format(spamoor_params.max_wallets), + ] + + if len(spamoor_params.spamoor_extra_args) > 0: + cmd.extend([param for param in spamoor_params.spamoor_extra_args]) + + return ServiceConfig( + image=spamoor_params.image, + cmd=cmd, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, + node_selectors=node_selectors, + ) From 0e475174ceb01185607714f5c94e86a1fcf7709f Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 16:15:11 +0100 Subject: [PATCH 08/11] revert minimal --- .github/tests/minimal.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/tests/minimal.yaml b/.github/tests/minimal.yaml index d7931d32b..aea361d67 100644 --- a/.github/tests/minimal.yaml +++ b/.github/tests/minimal.yaml @@ -1,7 +1,15 @@ participants: - - cl_type: prysm - cl_image: ethpandaops/prysm-beacon-chain:develop-bazel-minimal-30a136f # bazel built just now works - - cl_type: prysm - cl_image: ethpandaops/prysm-beacon-chain:develop-go-fixv2-minimal-linux-arm64-30a136f # built with go, not working + - el_type: geth + cl_type: teku + - el_type: geth + cl_type: prysm + - el_type: erigon + cl_type: nimbus + - el_type: besu + cl_type: lighthouse + - el_type: reth + cl_type: lodestar + - el_type: geth + cl_type: grandine network_params: preset: minimal From 219fbd1c6367d6aba1db0e4f5b34eaf6b43e0db0 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 16:28:13 +0100 Subject: [PATCH 09/11] change default to 500 --- README.md | 2 +- src/package_io/input_parser.star | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e11c3e23b..0efbb2fd4 100644 --- a/README.md +++ b/README.md @@ -936,7 +936,7 @@ spamoor_params: # Max pending transactions for spamoor max_pending: 1000 # Max wallets for spamoor - max_wallets: 1000 + max_wallets: 500 # Extra parameters to send to spamoor spamoor_extra_args: [] diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 9895a3ebb..e24250110 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -1170,7 +1170,7 @@ def get_default_spamoor_params(): "image": "ethpandaops/spamoor:latest", "throughput": 1000, "max_pending": 1000, - "max_wallets": 1000, + "max_wallets": 500, "spamoor_extra_args": [], } From 852b417f20984a6e7f52c0d1030a8699117a1353 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 16:33:57 +0100 Subject: [PATCH 10/11] add tx_type --- README.md | 8 ++++++++ src/package_io/input_parser.star | 1 + src/package_io/sanity_check.star | 1 + src/spamoor/spamoor.star | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0efbb2fd4..0a5864678 100644 --- a/README.md +++ b/README.md @@ -931,13 +931,21 @@ checkpoint_sync_url: "" spamoor_params: # The image to use for spamoor image: ethpandaops/spamoor:latest + # The type of transactions to send + # Valid values are eoatx, erctx, deploytx, depoy-destruct, blobs, gasburnertx + # Defaults to eoatx + tx_type: eoatx # Throughput of spamoor + # Defaults to 1000 throughput: 1000 # Max pending transactions for spamoor + # Defaults to 1000 max_pending: 1000 # Max wallets for spamoor + # Defaults to 500 max_wallets: 500 # Extra parameters to send to spamoor + # Defaults to empty spamoor_extra_args: [] # Global paarameter to set the exit ip address of services and public ports diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index e24250110..e19cfc328 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -1168,6 +1168,7 @@ def get_default_xatu_sentry_params(): def get_default_spamoor_params(): return { "image": "ethpandaops/spamoor:latest", + "tx_type": "eoatx", "throughput": 1000, "max_pending": 1000, "max_wallets": 500, diff --git a/src/package_io/sanity_check.star b/src/package_io/sanity_check.star index db85aeb99..82dc8f2d1 100644 --- a/src/package_io/sanity_check.star +++ b/src/package_io/sanity_check.star @@ -246,6 +246,7 @@ SUBCATEGORY_PARAMS = { ], "spamoor_params": [ "image", + "tx_type", "throughput", "max_pending", "max_wallets", diff --git a/src/spamoor/spamoor.star b/src/spamoor/spamoor.star index 7a7e48368..1f3dd2fc4 100644 --- a/src/spamoor/spamoor.star +++ b/src/spamoor/spamoor.star @@ -31,7 +31,7 @@ def get_config( node_selectors, ): cmd = [ - "eoatx", + "{}".format(spamoor_params.tx_type), "--privkey={}".format(prefunded_addresses[13].private_key), "--rpchost={}".format( ",".join([el_context.rpc_http_url for el_context in all_el_contexts]) From 58bee18cfca4b8ce2c7359bf7c3e0e27ef8d340c Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 6 Dec 2024 16:37:10 +0100 Subject: [PATCH 11/11] add tx_type --- src/package_io/input_parser.star | 1 + 1 file changed, 1 insertion(+) diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index e19cfc328..95b9b81bb 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -438,6 +438,7 @@ def input_parser(plan, input_args): ), spamoor_params=struct( image=result["spamoor_params"]["image"], + tx_type=result["spamoor_params"]["tx_type"], throughput=result["spamoor_params"]["throughput"], max_pending=result["spamoor_params"]["max_pending"], max_wallets=result["spamoor_params"]["max_wallets"],