Skip to content

Commit

Permalink
feat: add genesis_gaslimit param configuration (#726)
Browse files Browse the repository at this point in the history
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: Ji Hwan <[email protected]>
Co-authored-by: Barnabas Busa <[email protected]>
  • Loading branch information
jhkimqd and barnabasbusa authored Jul 29, 2024
1 parent a94caf0 commit a4ba9a6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ network_params:
# How long you want the network to wait before starting up
genesis_delay: 20

# The gas limit of the network set at genesis
genesis_gaslimit: 30000000

# Max churn rate for the network introduced by
# EIP-7514 https://eips.ethereum.org/EIPS/eip-7514
# Defaults to 8
Expand Down
1 change: 1 addition & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ network_params:
very lucky have athlete"
preregistered_validator_count: 0
genesis_delay: 20
genesis_gaslimit: 30000000
max_per_epoch_activation_churn_limit: 8
churn_limit_quotient: 65536
ejection_balance: 16000000000
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 @@ -259,6 +259,7 @@ def input_parser(plan, input_args):
],
seconds_per_slot=result["network_params"]["seconds_per_slot"],
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"
],
Expand Down Expand Up @@ -781,6 +782,7 @@ def default_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0,
"genesis_delay": 20,
"genesis_gaslimit": 30000000,
"max_per_epoch_activation_churn_limit": 8,
"churn_limit_quotient": 65536,
"ejection_balance": 16000000000,
Expand Down Expand Up @@ -813,6 +815,7 @@ def default_minimal_network_params():
"preregistered_validator_keys_mnemonic": constants.DEFAULT_MNEMONIC,
"preregistered_validator_count": 0,
"genesis_delay": 20,
"genesis_gaslimit": 30000000,
"max_per_epoch_activation_churn_limit": 4,
"churn_limit_quotient": 32,
"ejection_balance": 16000000000,
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 @@ -122,6 +122,7 @@ SUBCATEGORY_PARAMS = {
"preregistered_validator_keys_mnemonic",
"preregistered_validator_count",
"genesis_delay",
"genesis_gaslimit",
"max_per_epoch_activation_churn_limit",
"churn_limit_quotient",
"ejection_balance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def new_env_file_for_el_cl_genesis_data(
"PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic,
"NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister,
"GenesisDelay": network_params.genesis_delay,
"GenesisGasLimit": network_params.genesis_gaslimit,
"MaxPerEpochActivationChurnLimit": network_params.max_per_epoch_activation_churn_limit,
"ChurnLimitQuotient": network_params.churn_limit_quotient,
"EjectionBalance": network_params.ejection_balance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export WITHDRAWAL_TYPE="0x00"
export WITHDRAWAL_ADDRESS=0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134
export GENESIS_TIMESTAMP={{ .UnixTimestamp }}
export GENESIS_DELAY={{ .GenesisDelay }}
export GENESIS_GASLIMIT={{ .GenesisGasLimit }}
export MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT={{ .MaxPerEpochActivationChurnLimit }}
export CHURN_LIMIT_QUOTIENT={{ .ChurnLimitQuotient }}
export EJECTION_BALANCE={{ .EjectionBalance }}
Expand Down

0 comments on commit a4ba9a6

Please sign in to comment.