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:
- el_type: nethermind
cl_type: prysm
- el_type: erigon
el_image: ethpandaops/erigon:devel-d754b29 # this is a temp fix, till upstream is fixed
cl_type: lighthouse
- el_type: besu
cl_type: lighthouse
......
......@@ -16,16 +16,21 @@ jobs:
# 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_with_args:
needs: list-yamls
needs:
- list-yamls
strategy:
matrix:
file_name: ${{ fromJson(needs.list-yamls.outputs.matrix) }}
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
......@@ -52,6 +57,11 @@ jobs:
assertoor-mix-assert:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract branch name
......
......@@ -11,9 +11,13 @@ jobs:
run_starlark:
runs-on: self-hosted-ghr-size-l-x64
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
......@@ -39,9 +43,13 @@ jobs:
]
runs-on: self-hosted-ghr-size-l-x64
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
......@@ -57,7 +65,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
......@@ -72,6 +79,11 @@ jobs:
runs-on: self-hosted-ghr-size-l-x64
timeout-minutes: 30
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Kurtosis Assertoor GitHub Action
......
......@@ -229,12 +229,9 @@ def get_config(
"--metrics-host=0.0.0.0",
"--metrics-port={0}".format(METRICS_PORT_NUM),
"--min-gas-price=1000000000",
"--bonsai-limit-trie-logs-enabled=false",
"--bonsai-limit-trie-logs-enabled=false" if "verkle" not in network else "",
]
if (
network not in constants.PUBLIC_NETWORKS
or constants.NETWORK_NAME.shadowfork in network
):
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--genesis-file="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
......@@ -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(
"--bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -209,11 +209,6 @@ def get_config(
cmd = [
"erigon",
"{0}".format(
"--override.cancun=" + str(cancun_time)
if constants.NETWORK_NAME.shadowfork in network
else ""
),
"--networkid={0}".format(networkid),
"--log.console.verbosity=" + verbosity_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
......@@ -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(
"--bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -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(
"--bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -272,11 +272,6 @@ def get_config(
"{0}".format(
"--{}".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),
"--verbosity=" + verbosity_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
......@@ -343,7 +338,10 @@ def get_config(
cmd.append("--override.overlay-stride=10000")
cmd.append("--override.blockproof=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(
"--bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -218,20 +218,21 @@ def get_config(
"--Metrics.ExposeHost=0.0.0.0",
]
if network not in constants.PUBLIC_NETWORKS:
cmd.append("--config=none.cfg")
if constants.NETWORK_NAME.shadowfork in network:
cmd.append(
"--Init.ChainSpecPath="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/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(
"--Init.ChainSpecPath="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/chainspec.json"
)
cmd.append("--config=" + network)
else:
cmd.append("--config=" + network)
......@@ -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(
"--Discovery.Bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -218,10 +218,7 @@ def get_config(
"--nat=extip:{0}".format(port_publisher.nat_exit_ip),
"--tcp-port={0}".format(discovery_port),
]
if (
network not in constants.PUBLIC_NETWORKS
or constants.NETWORK_NAME.shadowfork in network
):
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--custom-network="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
......@@ -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(
"--bootstrap-node="
+ shared_utils.get_devnet_enodes(
......
......@@ -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(
"--bootnodes="
+ shared_utils.get_devnet_enodes(
......
......@@ -88,7 +88,7 @@ EIP7594_FORK_VERSION = "0x70000038"
ETHEREUM_GENESIS_GENERATOR = struct(
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_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0",
)
......@@ -110,9 +110,9 @@ PUBLIC_NETWORKS = (
)
NETWORK_ID = {
"mainnet": 1,
"sepolia": 11155111,
"holesky": 17000,
"mainnet": "1",
"sepolia": "11155111",
"holesky": "17000",
}
CHECKPOINT_SYNC_URL = {
......
......@@ -50,6 +50,7 @@ def launch_participant_network(
cancun_time = 0
prague_time = 0
shadowfork_block = "latest"
total_number_of_validator_keys = 0
if (
constants.NETWORK_NAME.shadowfork in network_params.network
and ("verkle" in network_params.network)
......@@ -148,12 +149,12 @@ def launch_participant_network(
# Launch all consensus layer clients
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
)
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
)
......
......@@ -104,7 +104,9 @@ def new_env_file_for_el_cl_genesis_data(
):
return {
"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,
"SecondsPerSlot": network_params.seconds_per_slot,
"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