Commit a4ba9a65 authored by Ji Hwan KIM's avatar Ji Hwan KIM Committed by GitHub

feat: add genesis_gaslimit param configuration (#726)

This PR adds `genesis_gas_limit` parameter within `network_params.yaml`
to make the parameter configurable using Kurtosis.

It seems like
[ethereum-genesis-generator](https://github.com/ethpandaops/ethereum-genesis-generator),
which is being used in this package already has the capability to change
`genesis_gas_limit` by changing `export
GENESIS_GASLIMIT="${GENESIS_GASLIMIT:-30000000}"` within
[defaults.env](https://github.com/ethpandaops/ethereum-genesis-generator/blob/master/defaults/defaults.env#L27).
This feature didn't seem like it was directly transferred to the
`ehtereum-package`.

Tested locally with the `main` branch and changing the
`genesis_gas_limit` value to `50000000`.
![Screenshot from 2024-07-26
11-26-12](https://github.com/user-attachments/assets/c3ad1dd9-edd6-461c-bb81-a79de1593833)

---------
Signed-off-by: default avatarJi Hwan <jkim@polygon.technology>
Co-authored-by: default avatarBarnabas Busa <busa.barnabas@gmail.com>
parent a94caf02
...@@ -464,6 +464,9 @@ network_params: ...@@ -464,6 +464,9 @@ network_params:
# How long you want the network to wait before starting up # How long you want the network to wait before starting up
genesis_delay: 20 genesis_delay: 20
# The gas limit of the network set at genesis
genesis_gaslimit: 30000000
# Max churn rate for the network introduced by # Max churn rate for the network introduced by
# EIP-7514 https://eips.ethereum.org/EIPS/eip-7514 # EIP-7514 https://eips.ethereum.org/EIPS/eip-7514
# Defaults to 8 # Defaults to 8
......
...@@ -66,6 +66,7 @@ network_params: ...@@ -66,6 +66,7 @@ network_params:
very lucky have athlete" very lucky have athlete"
preregistered_validator_count: 0 preregistered_validator_count: 0
genesis_delay: 20 genesis_delay: 20
genesis_gaslimit: 30000000
max_per_epoch_activation_churn_limit: 8 max_per_epoch_activation_churn_limit: 8
churn_limit_quotient: 65536 churn_limit_quotient: 65536
ejection_balance: 16000000000 ejection_balance: 16000000000
......
...@@ -259,6 +259,7 @@ def input_parser(plan, input_args): ...@@ -259,6 +259,7 @@ def input_parser(plan, input_args):
], ],
seconds_per_slot=result["network_params"]["seconds_per_slot"], seconds_per_slot=result["network_params"]["seconds_per_slot"],
genesis_delay=result["network_params"]["genesis_delay"], genesis_delay=result["network_params"]["genesis_delay"],
genesis_gaslimit=result["network_params"]["genesis_gaslimit"],
max_per_epoch_activation_churn_limit=result["network_params"][ max_per_epoch_activation_churn_limit=result["network_params"][
"max_per_epoch_activation_churn_limit" "max_per_epoch_activation_churn_limit"
], ],
...@@ -781,6 +782,7 @@ def default_network_params(): ...@@ -781,6 +782,7 @@ def default_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC, "preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0, "preregistered_validator_count": 0,
"genesis_delay": 20, "genesis_delay": 20,
"genesis_gaslimit": 30000000,
"max_per_epoch_activation_churn_limit": 8, "max_per_epoch_activation_churn_limit": 8,
"churn_limit_quotient": 65536, "churn_limit_quotient": 65536,
"ejection_balance": 16000000000, "ejection_balance": 16000000000,
...@@ -813,6 +815,7 @@ def default_minimal_network_params(): ...@@ -813,6 +815,7 @@ def default_minimal_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC, "preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0, "preregistered_validator_count": 0,
"genesis_delay": 20, "genesis_delay": 20,
"genesis_gaslimit": 30000000,
"max_per_epoch_activation_churn_limit": 4, "max_per_epoch_activation_churn_limit": 4,
"churn_limit_quotient": 32, "churn_limit_quotient": 32,
"ejection_balance": 16000000000, "ejection_balance": 16000000000,
......
...@@ -122,6 +122,7 @@ SUBCATEGORY_PARAMS = { ...@@ -122,6 +122,7 @@ SUBCATEGORY_PARAMS = {
"preregistered_validator_keys_mnemonic", "preregistered_validator_keys_mnemonic",
"preregistered_validator_count", "preregistered_validator_count",
"genesis_delay", "genesis_delay",
"genesis_gaslimit",
"max_per_epoch_activation_churn_limit", "max_per_epoch_activation_churn_limit",
"churn_limit_quotient", "churn_limit_quotient",
"ejection_balance", "ejection_balance",
......
...@@ -103,6 +103,7 @@ def new_env_file_for_el_cl_genesis_data( ...@@ -103,6 +103,7 @@ def new_env_file_for_el_cl_genesis_data(
"PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic, "PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic,
"NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister, "NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister,
"GenesisDelay": network_params.genesis_delay, "GenesisDelay": network_params.genesis_delay,
"GenesisGasLimit": network_params.genesis_gaslimit,
"MaxPerEpochActivationChurnLimit": network_params.max_per_epoch_activation_churn_limit, "MaxPerEpochActivationChurnLimit": network_params.max_per_epoch_activation_churn_limit,
"ChurnLimitQuotient": network_params.churn_limit_quotient, "ChurnLimitQuotient": network_params.churn_limit_quotient,
"EjectionBalance": network_params.ejection_balance, "EjectionBalance": network_params.ejection_balance,
......
...@@ -21,6 +21,7 @@ export WITHDRAWAL_TYPE="0x00" ...@@ -21,6 +21,7 @@ export WITHDRAWAL_TYPE="0x00"
export WITHDRAWAL_ADDRESS=0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134 export WITHDRAWAL_ADDRESS=0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134
export GENESIS_TIMESTAMP={{ .UnixTimestamp }} export GENESIS_TIMESTAMP={{ .UnixTimestamp }}
export GENESIS_DELAY={{ .GenesisDelay }} export GENESIS_DELAY={{ .GenesisDelay }}
export GENESIS_GASLIMIT={{ .GenesisGasLimit }}
export MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT={{ .MaxPerEpochActivationChurnLimit }} export MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT={{ .MaxPerEpochActivationChurnLimit }}
export CHURN_LIMIT_QUOTIENT={{ .ChurnLimitQuotient }} export CHURN_LIMIT_QUOTIENT={{ .ChurnLimitQuotient }}
export EJECTION_BALANCE={{ .EjectionBalance }} export EJECTION_BALANCE={{ .EjectionBalance }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment