Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .github/tests/custom-mnemonics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
participants:
- el_type: geth
cl_type: teku
- el_type: nethermind
cl_type: prysm
- el_type: erigon
cl_type: nimbus
- el_type: besu
cl_type: lighthouse
- el_type: reth
cl_type: lodestar
- el_type: ethrex
cl_type: teku
network_params:
network: kurtosis
num_validator_keys_per_node: 128
additional_mnemonics:
- mnemonic: "estate dog switch misery manage room million bleak wrap distance always insane usage busy chicken limit already duck feature unhappy dial emotion expire please"
count: 10
status: 1 # exited
- mnemonic: "bachelor goose intact globe grab observe youth kit castle purchase ranch safe wire planet portion artist soon captain before cute dinner arrange cat churn"
count: 10
status: 2 # slashed & exited
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,35 @@ network_params:
# The number of pre-registered validators for genesis. If 0 or not specified then the value will be calculated from the participants
preregistered_validator_count: 0

# Additional mnemonics to generate validators from
# These validators will be included in genesis but won't have keystores generated
# Useful for pre-registering validators with custom withdrawal credentials or states
# Default: []
additional_mnemonics:
- # The mnemonic to derive validator keys from
mnemonic: "estate dog switch misery manage room million bleak wrap distance always insane usage busy chicken limit already duck feature unhappy dial emotion expire please"
# The validator index to start deriving keys from
# Defaults to 0
start: 0
# The number of validators to generate from this mnemonic
count: 10
# The withdrawal address for these validators
# Only used when wd_prefix is 0x01 or 0x02 (execution layer withdrawal credentials)
wd_address: 0x000000000000000000000000000000000000dEaD
# The withdrawal credentials prefix
# 0x00: BLS withdrawal credentials (default)
# 0x01: Execution layer withdrawal credentials (uses wd_address)
# 0x02: Compounding withdrawal credentials (uses wd_address)
wd_prefix: 0x01
# The validator balance in gwei
# Defaults to 32000000000 (32 ETH)
balance: 32000000000
# The initial validator status
# 0: active (default)
# 1: slashed
# 2: exited
status: 1

# How long you want the network to wait before starting up
genesis_delay: 20

Expand Down Expand Up @@ -1265,7 +1294,7 @@ spamoor_params:
# Ethereum genesis generator params
ethereum_genesis_generator_params:
# The image to use for ethereum genesis generator
image: ethpandaops/ethereum-genesis-generator:5.2.0
image: ethpandaops/ethereum-genesis-generator:5.2.2
# Pass custom environment variables to the genesis generator (e.g. MY_VAR: my_value)
extra_env: {}

Expand Down
3 changes: 2 additions & 1 deletion network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ network_params:
question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy
very lucky have athlete"
preregistered_validator_count: 0
additional_mnemonics: []
genesis_delay: 20
genesis_time: 0
genesis_gaslimit: 60000000
Expand Down Expand Up @@ -236,7 +237,7 @@ keymanager_enabled: false
checkpoint_sync_enabled: false
checkpoint_sync_url: ""
ethereum_genesis_generator_params:
image: ethpandaops/ethereum-genesis-generator:5.2.0
image: ethpandaops/ethereum-genesis-generator:5.2.2
extra_env: {}
port_publisher:
nat_exit_ip: KURTOSIS_IP_ADDR_PLACEHOLDER
Expand Down
2 changes: 1 addition & 1 deletion src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ DEFAULT_ASSERTOOR_IMAGE = "ethpandaops/assertoor:latest"
DEFAULT_SNOOPER_IMAGE = "ethpandaops/rpc-snooper:latest"
DEFAULT_BOOTNODOOR_IMAGE = "ethpandaops/bootnodoor:latest"
DEFAULT_ETHEREUM_GENESIS_GENERATOR_IMAGE = (
"ethpandaops/ethereum-genesis-generator:5.2.0"
"ethpandaops/ethereum-genesis-generator:5.2.2"
)
DEFAULT_YQ_IMAGE = "linuxserver/yq"
DEFAULT_FLASHBOTS_RELAY_IMAGE = "ethpandaops/mev-boost-relay:main"
Expand Down
3 changes: 3 additions & 0 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def input_parser(plan, input_args):
additional_preloaded_contracts=result["network_params"][
"additional_preloaded_contracts"
],
additional_mnemonics=result["network_params"]["additional_mnemonics"],
devnet_repo=result["network_params"]["devnet_repo"],
prefunded_accounts=result["network_params"]["prefunded_accounts"],
max_payload_size=result["network_params"]["max_payload_size"],
Expand Down Expand Up @@ -1326,6 +1327,7 @@ def default_network_params():
"base_fee_update_fraction_electra": 5007716,
"preset": "mainnet",
"additional_preloaded_contracts": {},
"additional_mnemonics": [],
"devnet_repo": "ethpandaops",
"prefunded_accounts": {},
"max_payload_size": 10485760,
Expand Down Expand Up @@ -1408,6 +1410,7 @@ def default_minimal_network_params():
"base_fee_update_fraction_electra": 5007716,
"preset": "minimal",
"additional_preloaded_contracts": {},
"additional_mnemonics": [],
"devnet_repo": "ethpandaops",
"prefunded_accounts": {},
"max_payload_size": 10485760,
Expand Down
1 change: 1 addition & 0 deletions src/package_io/sanity_check.star
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ SUBCATEGORY_PARAMS = {
"base_fee_update_fraction_electra",
"preset",
"additional_preloaded_contracts",
"additional_mnemonics",
"devnet_repo",
"prefunded_accounts",
"max_payload_size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def new_env_file_for_el_cl_genesis_data(
"Eip7805ForkVersion": constants.EIP7805_FORK_VERSION,
"Eip7441ForkVersion": constants.EIP7441_FORK_VERSION,
"ShadowForkFile": shadowfork_file,
"AdditionalValidatorMnemonics": get_additional_mnemonics_json(network_params),
"MinValidatorWithdrawabilityDelay": network_params.min_validator_withdrawability_delay,
"ShardCommitteePeriod": network_params.shard_committee_period,
"AttestationDueBpsGloas": network_params.attestation_due_bps_gloas,
Expand Down Expand Up @@ -237,3 +238,16 @@ def new_additionsl_contracts_file_for_el_cl_genesis_data(
return {
"AdditionalPreloadedContracts": additional_contracts_json,
}


def get_additional_mnemonics_json(
network_params,
):
additional_mnemonics_json = network_params.additional_mnemonics
if type(additional_mnemonics_json) == "string":
# re-encode json to trim whitespaces and newlines
additional_mnemonics_json = json.decode(additional_mnemonics_json)

additional_mnemonics_json = json.encode(json.encode(additional_mnemonics_json))

return additional_mnemonics_json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export MAX_REQUEST_BLOCKS_DENEB={{ .MaxRequestBlocksDeneb }}
export MAX_REQUEST_BLOB_SIDECARS_ELECTRA={{ .MaxRequestBlobSidecarsElectra }}
export BASEFEE_UPDATE_FRACTION_ELECTRA={{ .BaseFeeUpdateFractionElectra }}
export ADDITIONAL_PRELOADED_CONTRACTS={{ .AdditionalPreloadedContractsFile }}
export ADDITIONAL_VALIDATOR_MNEMONICS={{ .AdditionalValidatorMnemonics }}
export EL_PREMINE_ADDRS={{ .PrefundedAccounts }}
export MAX_PAYLOAD_SIZE={{ .MaxPayloadSize }}
export BPO_1_EPOCH="{{ .Bpo1Epoch }}"
Expand Down