Skip to content

Commit

Permalink
fix: ignore bootnodes if in shadowfork (#660)
Browse files Browse the repository at this point in the history
Signed-off-by: Barnabas Busa <busa.barnabas@gmail.com>
Signed-off-by: Barnabas Busa <barnabas.busa@ethereum.org>
Signed-off-by: Parithosh Jayanthi <parithosh@indenwolken.xyz>
Co-authored-by: parithosh <parithosh.jayanthi@ethereum.org>
  • Loading branch information
barnabasbusa and parithosh committed Jun 26, 2024
1 parent 1acc201 commit cda5dda
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 43 deletions.
1 change: 0 additions & 1 deletion .github/tests/sepolia-mix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/per-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/el/besu/besu_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
10 changes: 4 additions & 6 deletions src/el/erigon/erigon_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion src/el/ethereumjs/ethereumjs_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 4 additions & 6 deletions src/el/geth/geth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
14 changes: 9 additions & 5 deletions src/el/nethermind/nethermind_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions src/el/nimbus-eth1/nimbus_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion src/el/reth/reth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand All @@ -110,9 +110,9 @@ PUBLIC_NETWORKS = (
)

NETWORK_ID = {
"mainnet": 1,
"sepolia": 11155111,
"holesky": 17000,
"mainnet": "1",
"sepolia": "11155111",
"holesky": "17000",
}

CHECKPOINT_SYNC_URL = {
Expand Down
5 changes: 3 additions & 2 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cda5dda

Please sign in to comment.