From e36027b91de0ae8943012ffd6ba776142d2e2d78 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 22 Jan 2024 15:09:00 +0100 Subject: [PATCH] fix: add CL genesis delay to final genesis time (#469) --- README.md | 2 +- network_params.yaml | 2 +- src/package_io/input_parser.star | 2 +- src/participant_network.star | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3645ae7f0..c9ccd9977 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ 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 # How long you want the network to wait before starting up - genesis_delay: 120 + genesis_delay: 20 # Max churn rate for the network introduced by # EIP-7514 https:#eips.ethereum.org/EIPS/eip-7514 diff --git a/network_params.yaml b/network_params.yaml index 984ecf931..8f533ac35 100644 --- a/network_params.yaml +++ b/network_params.yaml @@ -44,7 +44,7 @@ network_params: question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete" preregistered_validator_count: 0 - genesis_delay: 120 + genesis_delay: 20 max_churn: 8 ejection_balance: 16000000000 capella_fork_epoch: 0 diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index b3852d532..b55d9fbd5 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -479,7 +479,7 @@ def default_network_params(): "network_id": "3151908", "deposit_contract_address": "0x4242424242424242424242424242424242424242", "seconds_per_slot": 12, - "genesis_delay": 120, + "genesis_delay": 20, "max_churn": 8, "ejection_balance": 16000000000, "eth1_follow_distance": 2048, diff --git a/src/participant_network.star b/src/participant_network.star index 329dfba22..c52410ab9 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -91,7 +91,9 @@ def launch_participant_network( # We need to send the same genesis time to both the EL and the CL to ensure that timestamp based forking works as expected final_genesis_timestamp = get_final_genesis_timestamp( plan, - CL_GENESIS_DATA_GENERATION_TIME + num_participants * CL_NODE_STARTUP_TIME, + network_params.genesis_delay + + CL_GENESIS_DATA_GENERATION_TIME + + num_participants * CL_NODE_STARTUP_TIME, ) # if preregistered validator count is 0 (default) then calculate the total number of validators from the participants