Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable syncing ephemery #459

Merged
merged 33 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
50d8794
feat: enable syncing shadowforks
barnabasbusa Jan 11, 2024
535ee45
fix lint
barnabasbusa Jan 11, 2024
6b323e3
feat: enable syncing ephemery
barnabasbusa Jan 12, 2024
3c83bd7
fix curl
barnabasbusa Jan 12, 2024
b79891f
fix curl
barnabasbusa Jan 12, 2024
ea215cd
Merge branch 'main' into bbusa/ephemery
barnabasbusa Jan 15, 2024
36a7707
fix some formatting
barnabasbusa Jan 15, 2024
ea9b2ea
Merge branch 'bbusa/ephemery' of github.com:kurtosis-tech/ethereum-pa…
barnabasbusa Jan 15, 2024
3887470
fix: re-add networkid
barnabasbusa Jan 16, 2024
f34e671
fix lint
barnabasbusa Jan 16, 2024
4f0425b
Merge branch 'main' into bbusa/ephemery
barnabasbusa Jan 16, 2024
ea67b54
Merge branch 'bbusa/networkid' into bbusa/ephemery
barnabasbusa Jan 16, 2024
dc9ed8a
Merge branch 'bbusa/ephemery' of github.com:kurtosis-tech/ethereum-pa…
barnabasbusa Jan 16, 2024
93e1238
add network id and final genesis time and validator root
barnabasbusa Jan 16, 2024
f5ef24d
Merge branch 'main' into bbusa/ephemery
barnabasbusa Jan 16, 2024
7035304
fix lint
barnabasbusa Jan 16, 2024
ebc14e4
fix some checkpoint sync
barnabasbusa Jan 16, 2024
f0cde05
add verkle to not have checkpoint
barnabasbusa Jan 16, 2024
a07a7ee
dont wait for nethermind metrics port
barnabasbusa Jan 16, 2024
c848498
fix readme
barnabasbusa Jan 16, 2024
94ce8a4
revert back the url to latest.tar
barnabasbusa Jan 16, 2024
f139cd1
fix: Update nethermind to expose host on 0.0.0.0
barnabasbusa Jan 17, 2024
b77d11f
Update input_parser.star
barnabasbusa Jan 17, 2024
b0b60a7
Update nethermind_launcher.star
barnabasbusa Jan 17, 2024
26bbe11
Merge remote-tracking branch 'origin/barnabasbusa-patch-1' into bbusa…
barnabasbusa Jan 17, 2024
71e50a8
Merge branch 'main' into bbusa/ephemery
barnabasbusa Jan 17, 2024
4fd23af
remove not needed comments
barnabasbusa Jan 17, 2024
9742b87
Merge branch 'bbusa/ephemery' of github.com:kurtosis-tech/ethereum-pa…
barnabasbusa Jan 17, 2024
36a151c
make formatting a bit nicer
barnabasbusa Jan 17, 2024
906932d
replace all network names with constants references
barnabasbusa Jan 17, 2024
21f65ec
fix lint
barnabasbusa Jan 17, 2024
d37e307
add comment for "dead" code
barnabasbusa Jan 17, 2024
549df03
Merge branch 'main' into bbusa/ephemery
barnabasbusa Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ participants:
- el_client_type: nethermind
el_client_image: ethpandaops/nethermind:master
cl_client_type: prysm
cl_client_image: ethpandaops/prysm:develop,ethpandaops/prysm-validator:develop
cl_client_image: gcr.io/prysmaticlabs/prysm/beacon-chain:latest,gcr.io/prysmaticlabs/prysm/validator:latest
- el_client_type: erigon
el_client_image: ethpandaops/erigon:devel
cl_client_type: nimbus
Expand All @@ -24,5 +24,5 @@ participants:
cl_client_type: teku
cl_client_image: ethpandaops/teku:master
network_params:
network: "dencun-devnet-12"
network: "ephemery"
additional_services: []
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,7 @@ This note is from 2023-10-05
`flashbots/mev-boost-relay:0.27` and later support `capella_fork_epoch` at `0` but this seems to require a few flags enabled
on the `lighthouse` beacon client including `--always-prefer-builder-payload` and `--disable-peer-scoring`

Users are recommended to use [`examples/capella-mev.yaml`](./examples/capella-mev.yaml); as inspiration for reliable payload
delivery.
Users are recommended to browse the example tests [`./.github/tests`](./.github/tests); as inspiration for different ways to use the package.

## Pre-funded accounts at Genesis

Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please find the example configurations in the [../.github/tests](../.github/tests) directory.
barnabasbusa marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 0 additions & 18 deletions examples/capella-mev.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions examples/dencun.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions examples/verkle-gen-nethermind.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions examples/verkle-gen.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions examples/verkle.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(plan, args={}):
all_cl_client_contexts,
args_with_right_defaults.participants,
)
if network_params.network == "kurtosis":
if network_params.network == constants.NETWORK_NAME.kurtosis:
if network_params.deneb_fork_epoch != 0:
plan.print("Launching 4788 contract deployer")
el_uri = "http://{0}:{1}".format(
Expand Down
71 changes: 42 additions & 29 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -353,46 +353,59 @@ def get_beacon_config(
"--metrics-allow-origin=*",
"--metrics-port={0}".format(BEACON_METRICS_PORT_NUM),
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
# Enable this flag once we have https://github.com/sigp/lighthouse/issues/5054 fixed
# "--allow-insecure-genesis-sync",
h4ck3rk3y marked this conversation as resolved.
Show resolved Hide resolved
]

if network not in constants.PUBLIC_NETWORKS:
cmd.append("--testnet-dir=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER)
else:
cmd.append("--network=" + network)
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])

if network == "kurtosis":
if boot_cl_client_ctxs != None:
if network == constants.NETWORK_NAME.kurtosis:
if boot_cl_client_ctxs != None:
cmd.append(
"--boot-nodes="
+ ",".join(
[
ctx.enr
for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]
]
)
)
cmd.append(
"--trusted-peers="
+ ",".join(
[
ctx.peer_id
for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]
]
)
)
elif network == constants.NETWORK_NAME.ephemery:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--boot-nodes="
+ ",".join(
[
ctx.enr
for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]
]
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # Devnets
# TODO Remove once checkpoint sync is working for verkle
if constants.NETWORK_NAME.verkle not in network:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--trusted-peers="
+ ",".join(
[
ctx.peer_id
for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]
]
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
elif network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # Public networks
cmd.append("--network=" + network)
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])

if len(extra_params) > 0:
# this is a repeated<proto type>, we convert it into Starlark
Expand Down
20 changes: 15 additions & 5 deletions src/cl/lodestar/lodestar_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def get_beacon_config(
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.ssz"
)
if network == "kurtosis": # kurtosis
if network == constants.NETWORK_NAME.kurtosis:
if bootnode_contexts != None:
cmd.append(
"--bootnodes="
Expand All @@ -338,19 +338,29 @@ def get_beacon_config(
]
)
)
else: # devnet
elif network == constants.NETWORK_NAME.ephemery:
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])
cmd.append(
"--checkpointSyncUrl=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
"--bootnodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # Devnets
# TODO Remove once checkpoint sync is working for verkle
if constants.NETWORK_NAME.verkle not in network:
cmd.append(
"--checkpointSyncUrl=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--bootnodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # public testnet
else: # Public testnet
cmd.append("--network=" + network)
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])

Expand Down
23 changes: 11 additions & 12 deletions src/cl/nimbus/nimbus_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def launch(
)

# Holesky has a bigger memory footprint, so it needs more memory
if launcher.network == "holesky":
if launcher.network == constants.NETWORK_NAME.holesky:
holesky_beacon_memory_limit = 4096
bn_max_mem = (
int(bn_max_mem) if int(bn_max_mem) > 0 else holesky_beacon_memory_limit
Expand All @@ -160,7 +160,7 @@ def launch(

network_name = (
"devnets"
if launcher.network != "kurtosis"
if launcher.network != constants.NETWORK_NAME.kurtosis
and launcher.network not in constants.PUBLIC_NETWORKS
else launcher.network
)
Expand Down Expand Up @@ -374,21 +374,20 @@ def get_beacon_config(
if node_keystore_files != None and not split_mode_enabled:
cmd.extend(validator_flags)

if network == "kurtosis":
if bootnode_contexts == None:
# Copied from https://github.com/status-im/nimbus-eth2/blob/67ab477a27e358d605e99bffeb67f98d18218eca/scripts/launch_local_testnet.sh#L417
# See explanation there
cmd.append("--subscribe-all-subnets")
else:
for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]:
cmd.append("--bootstrap-node=" + ctx.enr)
cmd.append("--direct-peer=" + ctx.multiaddr)
elif network not in constants.PUBLIC_NETWORKS:
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--bootstrap-file="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/bootstrap_nodes.txt"
)
if network == constants.NETWORK_NAME.kurtosis:
if bootnode_contexts == None:
cmd.append("--subscribe-all-subnets")
else:
for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]:
cmd.append("--bootstrap-node=" + ctx.enr)
cmd.append("--direct-peer=" + ctx.multiaddr)

if len(extra_params) > 0:
cmd.extend([param for param in extra_params])

Expand Down
30 changes: 25 additions & 5 deletions src/cl/prysm/prysm_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ def get_beacon_config(
"--monitoring-port={0}".format(BEACON_MONITORING_PORT_NUM)
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
]

if network not in constants.PUBLIC_NETWORKS:
cmd.append("--p2p-static-id=true")
cmd.append(
Expand All @@ -336,22 +337,41 @@ def get_beacon_config(
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.ssz",
)
if network == "kurtosis": # Kurtosis
if network == constants.NETWORK_NAME.kurtosis:
if bootnode_contexts != None:
for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]:
cmd.append("--peer=" + ctx.multiaddr)
cmd.append("--bootstrap-node=" + ctx.enr)
else: # Devnet
elif network == constants.NETWORK_NAME.ephemery:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
"--genesis-beacon-api-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--bootstrap-node="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/boot_enr.yaml"
)
else: # Devnets
# TODO Remove once checkpoint sync is working for verkle
if constants.NETWORK_NAME.verkle not in network:
cmd.append(
"--genesis-beacon-api-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--bootstrap-node="
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/boot_enr.yaml"
)
else: # Public network
cmd.append("--{}".format(network))
cmd.append("--genesis-beacon-api-url=" + constants.CHECKPOINT_SYNC_URL[network])
Expand Down
Loading