Commit cda5ddac authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: ignore bootnodes if in shadowfork (#660)

Signed-off-by: default avatarBarnabas Busa <busa.barnabas@gmail.com>
Signed-off-by: default avatarBarnabas Busa <barnabas.busa@ethereum.org>
Signed-off-by: default avatarParithosh Jayanthi <parithosh@indenwolken.xyz>
Co-authored-by: default avatarparithosh <parithosh.jayanthi@ethereum.org>
parent 1acc201c
...@@ -4,7 +4,6 @@ participants: ...@@ -4,7 +4,6 @@ participants:
- el_type: nethermind - el_type: nethermind
cl_type: prysm cl_type: prysm
- el_type: erigon - el_type: erigon
el_image: ethpandaops/erigon:devel-d754b29 # this is a temp fix, till upstream is fixed
cl_type: lighthouse cl_type: lighthouse
- el_type: besu - el_type: besu
cl_type: lighthouse cl_type: lighthouse
......
...@@ -16,16 +16,21 @@ jobs: ...@@ -16,16 +16,21 @@ jobs:
# List all yaml files in the .github/tests directory, except for the k8s.yaml file # List all yaml files in the .github/tests directory, except for the k8s.yaml file
run: echo "matrix=$(ls ./.github/tests/*.yaml | grep -vE 'k8s.yaml$' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT run: echo "matrix=$(ls ./.github/tests/*.yaml | grep -vE 'k8s.yaml$' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
run_with_args: run_with_args:
needs: list-yamls needs:
- list-yamls
strategy: strategy:
matrix: matrix:
file_name: ${{ fromJson(needs.list-yamls.outputs.matrix) }} file_name: ${{ fromJson(needs.list-yamls.outputs.matrix) }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true continue-on-error: true
steps: steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Kurtosis - name: Setup Kurtosis
run: | run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
...@@ -52,6 +57,11 @@ jobs: ...@@ -52,6 +57,11 @@ jobs:
assertoor-mix-assert: assertoor-mix-assert:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Extract branch name - name: Extract branch name
......
...@@ -11,9 +11,13 @@ jobs: ...@@ -11,9 +11,13 @@ jobs:
run_starlark: run_starlark:
runs-on: self-hosted-ghr-size-l-x64 runs-on: self-hosted-ghr-size-l-x64
steps: steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Kurtosis - name: Setup Kurtosis
run: | run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
...@@ -39,9 +43,13 @@ jobs: ...@@ -39,9 +43,13 @@ jobs:
] ]
runs-on: self-hosted-ghr-size-l-x64 runs-on: self-hosted-ghr-size-l-x64
steps: steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Kurtosis - name: Setup Kurtosis
run: | run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
...@@ -57,7 +65,6 @@ jobs: ...@@ -57,7 +65,6 @@ jobs:
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Kurtosis - name: Setup Kurtosis
run: | run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
...@@ -72,6 +79,11 @@ jobs: ...@@ -72,6 +79,11 @@ jobs:
runs-on: self-hosted-ghr-size-l-x64 runs-on: self-hosted-ghr-size-l-x64
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Kurtosis Assertoor GitHub Action - name: Kurtosis Assertoor GitHub Action
......
...@@ -229,12 +229,9 @@ def get_config( ...@@ -229,12 +229,9 @@ def get_config(
"--metrics-host=0.0.0.0", "--metrics-host=0.0.0.0",
"--metrics-port={0}".format(METRICS_PORT_NUM), "--metrics-port={0}".format(METRICS_PORT_NUM),
"--min-gas-price=1000000000", "--min-gas-price=1000000000",
"--bonsai-limit-trie-logs-enabled=false", "--bonsai-limit-trie-logs-enabled=false" if "verkle" not in network else "",
] ]
if ( if network not in constants.PUBLIC_NETWORKS:
network not in constants.PUBLIC_NETWORKS
or constants.NETWORK_NAME.shadowfork in network
):
cmd.append( cmd.append(
"--genesis-file=" "--genesis-file="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
...@@ -254,7 +251,10 @@ def get_config( ...@@ -254,7 +251,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -209,11 +209,6 @@ def get_config( ...@@ -209,11 +209,6 @@ def get_config(
cmd = [ cmd = [
"erigon", "erigon",
"{0}".format(
"--override.cancun=" + str(cancun_time)
if constants.NETWORK_NAME.shadowfork in network
else ""
),
"--networkid={0}".format(networkid), "--networkid={0}".format(networkid),
"--log.console.verbosity=" + verbosity_level, "--log.console.verbosity=" + verbosity_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
...@@ -259,7 +254,10 @@ def get_config( ...@@ -259,7 +254,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -242,7 +242,10 @@ def get_config( ...@@ -242,7 +242,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -272,11 +272,6 @@ def get_config( ...@@ -272,11 +272,6 @@ def get_config(
"{0}".format( "{0}".format(
"--{}".format(network) if network in constants.PUBLIC_NETWORKS else "" "--{}".format(network) if network in constants.PUBLIC_NETWORKS else ""
), ),
"{0}".format(
"--override.cancun=" + str(cancun_time)
if constants.NETWORK_NAME.shadowfork in network
else ""
),
"--networkid={0}".format(networkid), "--networkid={0}".format(networkid),
"--verbosity=" + verbosity_level, "--verbosity=" + verbosity_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
...@@ -343,7 +338,10 @@ def get_config( ...@@ -343,7 +338,10 @@ def get_config(
cmd.append("--override.overlay-stride=10000") cmd.append("--override.overlay-stride=10000")
cmd.append("--override.blockproof=true") cmd.append("--override.blockproof=true")
cmd.append("--clear.verkle.costs=true") cmd.append("--clear.verkle.costs=true")
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -218,20 +218,21 @@ def get_config( ...@@ -218,20 +218,21 @@ def get_config(
"--Metrics.ExposeHost=0.0.0.0", "--Metrics.ExposeHost=0.0.0.0",
] ]
if network not in constants.PUBLIC_NETWORKS: if constants.NETWORK_NAME.shadowfork in network:
cmd.append("--config=none.cfg")
cmd.append( cmd.append(
"--Init.ChainSpecPath=" "--Init.ChainSpecPath="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/chainspec.json" + "/chainspec.json"
) )
elif constants.NETWORK_NAME.shadowfork in network: cmd.append("--config=" + network.split("-")[0])
cmd.append("--Init.BaseDbPath=" + network.split("-")[0])
elif network not in constants.PUBLIC_NETWORKS:
cmd.append("--config=none.cfg")
cmd.append( cmd.append(
"--Init.ChainSpecPath=" "--Init.ChainSpecPath="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/chainspec.json" + "/chainspec.json"
) )
cmd.append("--config=" + network)
else: else:
cmd.append("--config=" + network) cmd.append("--config=" + network)
...@@ -249,7 +250,10 @@ def get_config( ...@@ -249,7 +250,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--Discovery.Bootnodes=" "--Discovery.Bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -218,10 +218,7 @@ def get_config( ...@@ -218,10 +218,7 @@ def get_config(
"--nat=extip:{0}".format(port_publisher.nat_exit_ip), "--nat=extip:{0}".format(port_publisher.nat_exit_ip),
"--tcp-port={0}".format(discovery_port), "--tcp-port={0}".format(discovery_port),
] ]
if ( if network not in constants.PUBLIC_NETWORKS:
network not in constants.PUBLIC_NETWORKS
or constants.NETWORK_NAME.shadowfork in network
):
cmd.append( cmd.append(
"--custom-network=" "--custom-network="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
...@@ -241,7 +238,10 @@ def get_config( ...@@ -241,7 +238,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootstrap-node=" "--bootstrap-node="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -245,7 +245,10 @@ def get_config( ...@@ -245,7 +245,10 @@ def get_config(
] ]
) )
) )
elif network not in constants.PUBLIC_NETWORKS: elif (
network not in constants.PUBLIC_NETWORKS
and constants.NETWORK_NAME.shadowfork not in network
):
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ shared_utils.get_devnet_enodes( + shared_utils.get_devnet_enodes(
......
...@@ -88,7 +88,7 @@ EIP7594_FORK_VERSION = "0x70000038" ...@@ -88,7 +88,7 @@ EIP7594_FORK_VERSION = "0x70000038"
ETHEREUM_GENESIS_GENERATOR = struct( ETHEREUM_GENESIS_GENERATOR = struct(
capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated (no support for minimal config) capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated (no support for minimal config)
deneb_genesis="ethpandaops/ethereum-genesis-generator:3.3.0", # Default deneb_genesis="ethpandaops/ethereum-genesis-generator:3.3.5", # Default
verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis, waiting for rebase verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis, waiting for rebase
verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0", verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0",
) )
...@@ -110,9 +110,9 @@ PUBLIC_NETWORKS = ( ...@@ -110,9 +110,9 @@ PUBLIC_NETWORKS = (
) )
NETWORK_ID = { NETWORK_ID = {
"mainnet": 1, "mainnet": "1",
"sepolia": 11155111, "sepolia": "11155111",
"holesky": 17000, "holesky": "17000",
} }
CHECKPOINT_SYNC_URL = { CHECKPOINT_SYNC_URL = {
......
...@@ -50,6 +50,7 @@ def launch_participant_network( ...@@ -50,6 +50,7 @@ def launch_participant_network(
cancun_time = 0 cancun_time = 0
prague_time = 0 prague_time = 0
shadowfork_block = "latest" shadowfork_block = "latest"
total_number_of_validator_keys = 0
if ( if (
constants.NETWORK_NAME.shadowfork in network_params.network constants.NETWORK_NAME.shadowfork in network_params.network
and ("verkle" in network_params.network) and ("verkle" in network_params.network)
...@@ -148,12 +149,12 @@ def launch_participant_network( ...@@ -148,12 +149,12 @@ def launch_participant_network(
# Launch all consensus layer clients # Launch all consensus layer clients
prysm_password_relative_filepath = ( prysm_password_relative_filepath = (
validator_data.prysm_password_relative_filepath validator_data.prysm_password_relative_filepath
if network_params.network == constants.NETWORK_NAME.kurtosis if total_number_of_validator_keys > 0
else None else None
) )
prysm_password_artifact_uuid = ( prysm_password_artifact_uuid = (
validator_data.prysm_password_artifact_uuid validator_data.prysm_password_artifact_uuid
if network_params.network == constants.NETWORK_NAME.kurtosis if total_number_of_validator_keys > 0
else None else None
) )
......
...@@ -104,7 +104,9 @@ def new_env_file_for_el_cl_genesis_data( ...@@ -104,7 +104,9 @@ def new_env_file_for_el_cl_genesis_data(
): ):
return { return {
"UnixTimestamp": genesis_unix_timestamp, "UnixTimestamp": genesis_unix_timestamp,
"NetworkId": network_params.network_id, "NetworkId": constants.NETWORK_ID[network_params.network.split("-")[0]]
if shadowfork_file
else network_params.network_id, # This will override the network_id if shadowfork_file is present. If you want to use the network_id, please ensure that you don't use "shadowfork" in the network name.
"DepositContractAddress": network_params.deposit_contract_address, "DepositContractAddress": network_params.deposit_contract_address,
"SecondsPerSlot": network_params.seconds_per_slot, "SecondsPerSlot": network_params.seconds_per_slot,
"PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic, "PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic,
......
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