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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,12 @@ network_params:
# How long you want the network to wait before starting up
genesis_delay: 20

# Unix timestamp for genesis. If specified (non-zero), this overrides genesis_delay.
# When set to 0 (default), the genesis time is automatically calculated based on current time and genesis_delay.
# Use this field to set a specific genesis time for the network.
# Defaults to 0
genesis_time: 0

# The gas limit of the network set at genesis
# Defaults to 60000000

Expand Down
1 change: 1 addition & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ network_params:
very lucky have athlete"
preregistered_validator_count: 0
genesis_delay: 20
genesis_time: 0
genesis_gaslimit: 60000000
max_per_epoch_activation_churn_limit: 8
churn_limit_quotient: 65536
Expand Down
15 changes: 10 additions & 5 deletions src/network_launcher/kurtosis.star
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ def launch(
plan.print(json.indent(json.encode(validator_data)))

# 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 = shared_utils.get_final_genesis_timestamp(
plan,
network_params.genesis_delay
+ CL_GENESIS_DATA_GENERATION_TIME
+ num_participants * CL_NODE_STARTUP_TIME,
# If genesis_time is specified (non-zero), use it; otherwise, derive it from genesis_delay
final_genesis_timestamp = (
str(network_params.genesis_time)
if network_params.genesis_time > 0
else shared_utils.get_final_genesis_timestamp(
plan,
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
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 @@ -418,6 +418,7 @@ def input_parser(plan, input_args):
seconds_per_slot=result["network_params"]["seconds_per_slot"],
slot_duration_ms=result["network_params"]["slot_duration_ms"],
genesis_delay=result["network_params"]["genesis_delay"],
genesis_time=result["network_params"]["genesis_time"],
genesis_gaslimit=result["network_params"]["genesis_gaslimit"],
max_per_epoch_activation_churn_limit=result["network_params"][
"max_per_epoch_activation_churn_limit"
Expand Down Expand Up @@ -1151,6 +1152,7 @@ def default_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0,
"genesis_delay": 20,
"genesis_time": 0,
"genesis_gaslimit": 60000000,
"max_per_epoch_activation_churn_limit": 8,
"churn_limit_quotient": 65536,
Expand Down Expand Up @@ -1232,6 +1234,7 @@ def default_minimal_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0,
"genesis_delay": 20,
"genesis_time": 0,
"genesis_gaslimit": 60000000,
"max_per_epoch_activation_churn_limit": 4,
"churn_limit_quotient": 32,
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 @@ -198,6 +198,7 @@ SUBCATEGORY_PARAMS = {
"preregistered_validator_keys_mnemonic",
"preregistered_validator_count",
"genesis_delay",
"genesis_time",
"genesis_gaslimit",
"max_per_epoch_activation_churn_limit",
"churn_limit_quotient",
Expand Down