Commit a8afcef6 authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

fix: take out the genesis versions as constants (#324)

parent 9342418f
......@@ -93,7 +93,6 @@ jobs:
steps:
- <<: *setup_kurtosis
- checkout
- run: kurtosis run ${PWD}
lint:
......@@ -110,17 +109,8 @@ jobs:
steps:
- <<: *setup_kurtosis
- checkout
- run: kurtosis run ${PWD}
check_latest_version:
executor: ubuntu_vm
steps:
- <<: *setup_kurtosis
- checkout
- run: kurtosis run --dry-run ${PWD}
besu-all:
executor: ubuntu_vm
resource_class: xlarge
......@@ -290,10 +280,9 @@ jobs:
- run: kurtosis run ${PWD} "$(cat ./.circleci/tests/petra.json)"
workflows:
check_latest_version:
nightly_tests:
when: << pipeline.parameters.should-enable-check-latest-version-workflow >>
jobs:
- check_latest_version
- besu-all
- erigon-all
- ethereumjs-all
......@@ -311,8 +300,13 @@ workflows:
<<: *setup_kurtosis_k3s
- mix_with_tools_k8s:
<<: *setup_kurtosis_k3s
- petra
- parallel_key_store_generation_1
- parallel_key_store_generation_2
- parallel_key_store_generation_3
- disable_peer_scoring
build:
per_pr_test:
when: << pipeline.parameters.should-enable-build-workflow >>
jobs:
# -- PR check jobs ------------------------------------------
......@@ -372,31 +366,8 @@ workflows:
ignore:
- main
- parallel_key_store_generation_1:
filters:
branches:
ignore:
- main
- parallel_key_store_generation_2:
filters:
branches:
ignore:
- main
- parallel_key_store_generation_3:
filters:
branches:
ignore:
- main
- disable_peer_scoring:
filters:
branches:
ignore:
- main
- petra:
- mix_with_tools_k8s:
<<: *setup_kurtosis_k3s
filters:
branches:
ignore:
......
redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star")
postgres_module = import_module("github.com/kurtosis-tech/postgres-package/main.star")
constants = import_module("../package_io/constants.star")
DUMMY_SECRET_KEY = "0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2"
DUMMY_PUB_KEY = "0xa55c1285d84ba83a5ad26420cd5ad3091e49c55a813eee651cd467db38a8c8e63192f47955e9376f6b42f6d190571cb5"
......@@ -44,12 +45,11 @@ def launch_mev_relay(
image = mev_params.mev_relay_image
# TODO(maybe) remove hardocded values for the forks
env_vars = {
"GENESIS_FORK_VERSION": "0x10000038",
"BELLATRIX_FORK_VERSION": "0x30000038",
"CAPELLA_FORK_VERSION": "0x40000038",
"DENEB_FORK_VERSION": "0x50000038",
"GENESIS_FORK_VERSION": constants.GENESIS_FORK_VERSION,
"BELLATRIX_FORK_VERSION": constants.BELLATRIX_FORK_VERSION,
"CAPELLA_FORK_VERSION": constants.CAPELLA_FORK_VERSION,
"DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION,
"GENESIS_VALIDATORS_ROOT": validator_root,
"SEC_PER_SLOT": str(seconds_per_slot),
}
......
......@@ -42,3 +42,8 @@ GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = (
KZG_DATA_DIRPATH_ON_CLIENT_CONTAINER = (
GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/trusted_setup.txt"
)
GENESIS_FORK_VERSION = "0x10000038"
BELLATRIX_FORK_VERSION = "0x30000038"
CAPELLA_FORK_VERSION = "0x40000038"
DENEB_FORK_VERSION = "0x50000038"
......@@ -413,7 +413,6 @@ def default_participant():
def get_default_mev_params():
return {
"mev_relay_image": MEV_BOOST_RELAY_DEFAULT_IMAGE,
# TODO replace with flashbots/builder when they publish an arm64 image as mentioned in flashbots/builder#105
"mev_builder_image": "flashbots/builder:latest",
"mev_builder_cl_image": "sigp/lighthouse:latest",
"mev_boost_image": "flashbots/mev-boost",
......@@ -491,7 +490,6 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
mev_participant = default_participant()
mev_participant.update(
{
# TODO replace with actual when flashbots/builder is published
"el_client_image": parsed_arguments_dict["mev_params"][
"mev_builder_image"
],
......@@ -511,8 +509,12 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000".format(
num_participants + 1
),
"--builder.bellatrix_fork_version=0x30000038",
"--builder.genesis_fork_version=0x10000038",
"--builder.bellatrix_fork_version={0}".format(
constants.BELLATRIX_FORK_VERSION
),
"--builder.genesis_fork_version={0}".format(
constants.GENESIS_FORK_VERSION
),
"--builder.genesis_validators_root={0}".format(
constants.GENESIS_VALIDATORS_ROOT_PLACEHOLDER
),
......
......@@ -2,6 +2,8 @@ shared_utils = import_module("../../shared_utils/shared_utils.star")
el_cl_genesis_data = import_module("./el_cl_genesis_data.star")
constants = import_module("../../package_io/constants.star")
GENESIS_VALUES_PATH = "/opt"
GENESIS_VALUES_FILENAME = "values.env"
......@@ -102,4 +104,8 @@ def new_env_file_for_el_cl_genesis_data(
"CapellaForkEpoch": capella_fork_epoch,
"DenebForkEpoch": deneb_fork_epoch,
"ElectraForkEpoch": electra_fork_epoch,
"GenesisForkVersion": constants.GENESIS_FORK_VERSION,
"BellatrixForkVersion": constants.BELLATRIX_FORK_VERSION,
"CapellaForkVersion": constants.CAPELLA_FORK_VERSION,
"DenebForkVersion": constants.DENEB_FORK_VERSION,
}
......@@ -5,12 +5,12 @@ export CL_EXEC_BLOCK="0"
export SLOT_DURATION_IN_SECONDS={{ .SecondsPerSlot }}
export DEPOSIT_CONTRACT_BLOCK="0x0000000000000000000000000000000000000000000000000000000000000000"
export NUMBER_OF_VALIDATORS={{ .NumValidatorKeysToPreregister }}
export GENESIS_FORK_VERSION="0x10000038"
export GENESIS_FORK_VERSION="{{ .GenesisForkVersion }}"
export ALTAIR_FORK_VERSION="0x20000038"
export BELLATRIX_FORK_VERSION="0x30000038"
export CAPELLA_FORK_VERSION="0x40000038"
export BELLATRIX_FORK_VERSION="{{ .BellatrixForkVersion }}"
export CAPELLA_FORK_VERSION="{{ .CapellaForkVersion }}"
export CAPELLA_FORK_EPOCH="{{ .CapellaForkEpoch }}"
export DENEB_FORK_VERSION="0x50000038"
export DENEB_FORK_VERSION="{{ .DenebForkVersion }}"
export DENEB_FORK_EPOCH="{{ .DenebForkEpoch }}"
export ELECTRA_FORK_VERSION="0x60000038"
export ELECTRA_FORK_EPOCH="{{ .ElectraForkEpoch }}"
......
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