diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 2e1a782d6..fe194f6a1 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -48,8 +48,7 @@ VALIDATOR_MAX_CPU = 300 VALIDATOR_MIN_MEMORY = 64 VALIDATOR_MAX_MEMORY = 256 - -MIN_PEERS = 1 +MIN_PEERS = 0 PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" @@ -184,22 +183,27 @@ def launch( validator_node_service_name, validator_config ) - # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.discovery_addresses[0]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=beacon_node_service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + + if MIN_PEERS > 0: + # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.discovery_addresses[0]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=beacon_node_service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_metrics_port = beacon_service.ports[BEACON_MONITORING_PORT_ID] beacon_metrics_url = "{0}:{1}".format( diff --git a/src/cl/teku/teku_launcher.star b/src/cl/teku/teku_launcher.star index faedc6c60..9657d4ec8 100644 --- a/src/cl/teku/teku_launcher.star +++ b/src/cl/teku/teku_launcher.star @@ -42,7 +42,7 @@ BEACON_MAX_MEMORY = 1024 DEST_VALIDATOR_KEYS_DIRPATH_IN_SERVICE_CONTAINER = "$HOME/validator-keys" DEST_VALIDATOR_SECRETS_DIRPATH_IN_SERVICE_CONTAINER = "$HOME/validator-secrets" -MIN_PEERS = 1 +MIN_PEERS = 0 METRICS_PATH = "/metrics" diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 17b828feb..46b07d300 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -164,6 +164,7 @@ def input_parser(plan, input_args): "deposit_contract_address" ], seconds_per_slot=result["network_params"]["seconds_per_slot"], + slots_per_epoch=result["network_params"]["slots_per_epoch"], genesis_delay=result["network_params"]["genesis_delay"], max_churn=result["network_params"]["max_churn"], ejection_balance=result["network_params"]["ejection_balance"], @@ -320,6 +321,9 @@ def parse_network_params(input_args): if result["network_params"]["seconds_per_slot"] == 0: fail("seconds_per_slot is 0 needs to be > 0 ") + if result["network_params"]["slots_per_epoch"] == 0: + fail("slots_per_epoch is 0 needs to be > 0 ") + if result["network_params"]["genesis_delay"] == 0: fail("genesis_delay is 0 needs to be > 0 ") @@ -391,6 +395,7 @@ def default_network_params(): "network_id": "3151908", "deposit_contract_address": "0x4242424242424242424242424242424242424242", "seconds_per_slot": 12, + "slots_per_epoch": 6, "genesis_delay": 120, "max_churn": 8, "ejection_balance": 16000000000, diff --git a/src/participant_network.star b/src/participant_network.star index e7b920616..374bb9533 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -97,7 +97,7 @@ def launch_participant_network( and network_params.electra_fork_epoch == None ): ethereum_genesis_generator_image = ( - "ethpandaops/ethereum-genesis-generator:2.0.4" + "tofelb/ethereum-genesis-generator:2.0.4-slots-per-epoch" ) # we are running electra - experimental elif network_params.electra_fork_epoch != None: @@ -121,6 +121,7 @@ def launch_participant_network( network_params.network_id, network_params.deposit_contract_address, network_params.seconds_per_slot, + network_params.slots_per_epoch, network_params.preregistered_validator_keys_mnemonic, total_number_of_validator_keys, network_params.genesis_delay, 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 21b9aa8b1..aeab8f614 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 @@ -16,6 +16,7 @@ def generate_el_cl_genesis_data( network_id, deposit_contract_address, seconds_per_slot, + slots_per_epoch, preregistered_validator_keys_mnemonic, total_num_validator_keys_to_preregister, genesis_delay, @@ -30,6 +31,7 @@ def generate_el_cl_genesis_data( network_id, deposit_contract_address, seconds_per_slot, + slots_per_epoch, preregistered_validator_keys_mnemonic, total_num_validator_keys_to_preregister, genesis_delay, @@ -83,6 +85,7 @@ def new_env_file_for_el_cl_genesis_data( network_id, deposit_contract_address, seconds_per_slot, + slots_per_epoch, preregistered_validator_keys_mnemonic, total_num_validator_keys_to_preregister, genesis_delay, @@ -97,9 +100,10 @@ def new_env_file_for_el_cl_genesis_data( "NetworkId": network_id, "DepositContractAddress": deposit_contract_address, "SecondsPerSlot": seconds_per_slot, + "SlotsPerEpoch": slots_per_epoch, "PreregisteredValidatorKeysMnemonic": preregistered_validator_keys_mnemonic, "NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister, - "GenesisDelay": genesis_delay, + "GenesisDelay": genesis_delay, "MaxChurn": max_churn, "EjectionBalance": ejection_balance, "CapellaForkEpoch": capella_fork_epoch, 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 86e65d0df..2d7e1e004 100644 --- a/static_files/genesis-generation-config/el-cl/values.env.tmpl +++ b/static_files/genesis-generation-config/el-cl/values.env.tmpl @@ -20,3 +20,4 @@ export GENESIS_TIMESTAMP={{ .UnixTimestamp }} export GENESIS_DELAY={{ .GenesisDelay }} export MAX_CHURN={{ .MaxChurn }} export EJECTION_BALANCE=16000000000 +export SLOTS_PER_EPOCH={{ .SlotsPerEpoch }}