Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
b8cd2b45
Unverified
Commit
b8cd2b45
authored
Jun 24, 2024
by
Barnabas Busa
Committed by
GitHub
Jun 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add checkpoint_enabled and checkpoint_url flags (#689)
parent
6571a70b
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
155 additions
and
69 deletions
+155
-69
mix-public.yaml
.github/tests/mix-public.yaml
+1
-1
per-pr.yml
.github/workflows/per-pr.yml
+1
-0
README.md
README.md
+6
-0
main.star
main.star
+2
-0
network_params.yaml
network_params.yaml
+2
-0
cl_launcher.star
src/cl/cl_launcher.star
+6
-0
grandine_launcher.star
src/cl/grandine/grandine_launcher.star
+22
-12
lighthouse_launcher.star
src/cl/lighthouse/lighthouse_launcher.star
+22
-11
lodestar_launcher.star
src/cl/lodestar/lodestar_launcher.star
+22
-9
nimbus_launcher.star
src/cl/nimbus/nimbus_launcher.star
+6
-0
prysm_launcher.star
src/cl/prysm/prysm_launcher.star
+32
-19
teku_launcher.star
src/cl/teku/teku_launcher.star
+22
-12
constants.star
src/package_io/constants.star
+0
-2
input_parser.star
src/package_io/input_parser.star
+5
-1
participant_network.star
src/participant_network.star
+4
-0
shared_utils.star
src/shared_utils/shared_utils.star
+2
-2
No files found.
.github/tests/mix-public.yaml
View file @
b8cd2b45
...
...
@@ -15,4 +15,4 @@ participants:
cl_type
:
grandine
additional_services
:
[]
port_publisher
:
public_port_start
:
4
0000
public_port_start
:
3
0000
.github/workflows/per-pr.yml
View file @
b8cd2b45
...
...
@@ -70,6 +70,7 @@ jobs:
assertoor
:
runs-on
:
self-hosted-ghr-size-l-x64
timeout-minutes
:
30
steps
:
-
name
:
Checkout Repository
uses
:
actions/checkout@v4
...
...
README.md
View file @
b8cd2b45
...
...
@@ -784,6 +784,12 @@ global_node_selectors: {}
# Defaults to false
keymanager_enabled
:
false
# Global flag to enable checkpoint sync across the network
checkpoint_sync_enabled
:
false
# Global flag to set checkpoint sync url
checkpoint_sync_url
:
"
"
# Global paarameter to set the exit ip address of services and public ports
port_publisher
:
# if you have a service that you want to expose on a specific interfact; set that IP here
...
...
main.star
View file @
b8cd2b45
...
...
@@ -137,6 +137,8 @@ def run(plan, args={}):
global_node_selectors,
keymanager_enabled,
parallel_keystore_generation,
args_with_right_defaults.checkpoint_sync_enabled,
args_with_right_defaults.checkpoint_sync_url,
args_with_right_defaults.port_publisher,
)
...
...
network_params.yaml
View file @
b8cd2b45
...
...
@@ -82,6 +82,8 @@ network_params:
custody_requirement
:
1
target_number_of_peers
:
70
additional_preloaded_contracts
:
{}
devnet_repo
:
ethpandaops
checkpoint_sync_enabled
:
false
additional_services
:
-
tx_spammer
-
blob_spammer
...
...
src/cl/cl_launcher.star
View file @
b8cd2b45
...
...
@@ -31,6 +31,8 @@ def launch(
validator_data,
prysm_password_relative_filepath,
prysm_password_artifact_uuid,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
plan.print("Launching CL network")
...
...
@@ -176,6 +178,8 @@ def launch(
node_selectors,
participant.use_separate_vc,
participant.keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
else:
...
...
@@ -210,6 +214,8 @@ def launch(
node_selectors,
participant.use_separate_vc,
participant.keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
src/cl/grandine/grandine_launcher.star
View file @
b8cd2b45
...
...
@@ -89,6 +89,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -150,6 +152,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
@@ -230,6 +234,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
validator_keys_dirpath = ""
...
...
@@ -311,6 +317,22 @@ def get_beacon_config(
# "--validator-api-bearer-file=" + constants.KEYMANAGER_MOUNT_PATH_ON_CONTAINER, Not yet supported
]
# If checkpoint sync is enabled, add the checkpoint sync url
if checkpoint_sync_enabled:
if checkpoint_sync_url:
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
else:
if network in ["mainnet", "ephemery"]:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
else:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--configuration-directory="
...
...
@@ -331,9 +353,6 @@ def get_beacon_config(
)
)
elif network == constants.NETWORK_NAME.ephemery:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
...
...
@@ -348,21 +367,12 @@ def get_beacon_config(
)
)
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(
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # Public networks
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])
if len(extra_params) > 0:
# we do the list comprehension as the default extra_params is a proto repeated string
...
...
src/cl/lighthouse/lighthouse_launcher.star
View file @
b8cd2b45
...
...
@@ -94,6 +94,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -151,6 +153,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
@@ -246,6 +250,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
# If snooper is enabled use the snooper engine context, otherwise use the execution client context
...
...
@@ -324,6 +330,22 @@ def get_beacon_config(
"--enable-private-discovery",
]
# If checkpoint sync is enabled, add the checkpoint sync url
if checkpoint_sync_enabled:
if checkpoint_sync_url:
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
else:
if network in ["mainnet", "ephemery"]:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
else:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
if network not in constants.PUBLIC_NETWORKS:
cmd.append("--testnet-dir=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER)
if (
...
...
@@ -341,9 +363,6 @@ def get_beacon_config(
)
)
elif network == constants.NETWORK_NAME.ephemery:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
...
...
@@ -351,13 +370,6 @@ def get_beacon_config(
)
)
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(
"--boot-nodes="
+ shared_utils.get_devnet_enrs_list(
...
...
@@ -366,7 +378,6 @@ def get_beacon_config(
)
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
...
...
src/cl/lodestar/lodestar_launcher.star
View file @
b8cd2b45
...
...
@@ -83,6 +83,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -139,6 +141,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
launcher.preset,
)
...
...
@@ -239,6 +243,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
preset,
):
...
...
@@ -305,6 +311,22 @@ def get_beacon_config(
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
]
# If checkpoint sync is enabled, add the checkpoint sync url
if checkpoint_sync_enabled:
if checkpoint_sync_url:
cmd.append("--checkpointSyncUrl=" + checkpoint_sync_url)
else:
if network in ["mainnet", "ephemery"]:
cmd.append(
"--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network]
)
else:
cmd.append(
"--checkpointSyncUrl=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--paramsFile="
...
...
@@ -331,7 +353,6 @@ def get_beacon_config(
)
)
elif network == constants.NETWORK_NAME.ephemery:
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])
cmd.append(
"--bootnodes="
+ shared_utils.get_devnet_enrs_list(
...
...
@@ -339,13 +360,6 @@ def get_beacon_config(
)
)
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(
...
...
@@ -354,7 +368,6 @@ def get_beacon_config(
)
else: # Public testnet
cmd.append("--network=" + network)
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])
if len(extra_params) > 0:
# this is a repeated<proto type>, we convert it into Starlark
...
...
src/cl/nimbus/nimbus_launcher.star
View file @
b8cd2b45
...
...
@@ -105,6 +105,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -166,6 +168,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
@@ -246,6 +250,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
validator_keys_dirpath = ""
...
...
src/cl/prysm/prysm_launcher.star
View file @
b8cd2b45
...
...
@@ -92,6 +92,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -147,6 +149,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
launcher.preset,
)
...
...
@@ -226,6 +230,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
preset,
):
...
...
@@ -284,6 +290,30 @@ def get_beacon_config(
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
]
# If checkpoint sync is enabled, add the checkpoint sync url
if checkpoint_sync_enabled:
if checkpoint_sync_url:
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
else:
if network in ["mainnet", "ephemery"]:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--genesis-beacon-api-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
else:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
cmd.append(
"--genesis-beacon-api-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
if preset == "minimal":
cmd.append("--minimal-config=true")
...
...
@@ -311,36 +341,19 @@ def get_beacon_config(
cmd.append(
"--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"
+ "/boot
strap_nodes
.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"
+ "/boot
strap_nodes
.yaml"
)
else: # Public network
cmd.append("--{}".format(network))
cmd.append("--genesis-beacon-api-url=" + constants.CHECKPOINT_SYNC_URL[network])
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])
if len(extra_params) > 0:
# we do the for loop as otherwise its a proto repeated array
...
...
src/cl/teku/teku_launcher.star
View file @
b8cd2b45
...
...
@@ -93,6 +93,8 @@ def launch(
node_selectors,
use_separate_vc,
keymanager_enabled,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
beacon_service_name = "{0}".format(service_name)
...
...
@@ -155,6 +157,8 @@ def launch(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
@@ -237,6 +241,8 @@ def get_beacon_config(
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
validator_keys_dirpath = ""
...
...
@@ -335,6 +341,22 @@ def get_beacon_config(
"--Xvalidator-api-unsafe-hosts-enabled=true",
]
# If checkpoint sync is enabled, add the checkpoint sync url
if checkpoint_sync_enabled:
if checkpoint_sync_url:
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
else:
if network in ["mainnet", "ephemery"]:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
else:
cmd.append(
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
network
)
)
if network not in constants.PUBLIC_NETWORKS:
cmd.append(
"--initial-state="
...
...
@@ -356,9 +378,6 @@ def get_beacon_config(
)
)
elif network == constants.NETWORK_NAME.ephemery:
cmd.append(
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
)
cmd.append(
"--p2p-discovery-bootnodes="
+ shared_utils.get_devnet_enrs_list(
...
...
@@ -373,21 +392,12 @@ def get_beacon_config(
)
)
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(
"--p2p-discovery-bootnodes="
+ shared_utils.get_devnet_enrs_list(
plan, el_cl_genesis_data.files_artifact_uuid
)
)
else: # Public networks
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])
if len(extra_params) > 0:
# we do the list comprehension as the default extra_params is a proto repeated string
...
...
src/package_io/constants.star
View file @
b8cd2b45
...
...
@@ -117,8 +117,6 @@ NETWORK_ID = {
CHECKPOINT_SYNC_URL = {
"mainnet": "https://beaconstate.info",
"sepolia": "https://checkpoint-sync.sepolia.ethpandaops.io",
"holesky": "https://checkpoint-sync.holesky.ethpandaops.io",
"ephemery": "https://checkpointz.bordel.wtf/",
}
...
...
src/package_io/input_parser.star
View file @
b8cd2b45
...
...
@@ -6,7 +6,7 @@ genesis_constants = import_module(
DEFAULT_EL_IMAGES = {
"geth": "ethereum/client-go:latest",
"erigon": "ethpandaops/erigon:main",
"erigon": "ethpandaops/erigon:main
-6d80c0f
",
"nethermind": "nethermindeth/nethermind:master",
"besu": "hyperledger/besu:latest",
"reth": "ghcr.io/paradigmxyz/reth",
...
...
@@ -374,6 +374,8 @@ def input_parser(plan, input_args):
global_tolerations=result["global_tolerations"],
global_node_selectors=result["global_node_selectors"],
keymanager_enabled=result["keymanager_enabled"],
checkpoint_sync_enabled=result["checkpoint_sync_enabled"],
checkpoint_sync_url=result["checkpoint_sync_url"],
port_publisher=struct(
public_port_start=result["port_publisher"]["public_port_start"],
nat_exit_ip=result["port_publisher"]["nat_exit_ip"],
...
...
@@ -761,6 +763,8 @@ def default_input_args(input_args):
"global_tolerations": [],
"global_node_selectors": {},
"keymanager_enabled": False,
"checkpoint_sync_enabled": False,
"checkpoint_sync_url": "",
"port_publisher": {
"nat_exit_ip": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
"public_port_start": None,
...
...
src/participant_network.star
View file @
b8cd2b45
...
...
@@ -40,6 +40,8 @@ def launch_participant_network(
global_node_selectors,
keymanager_enabled,
parallel_keystore_generation,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
):
network_id = network_params.network_id
...
...
@@ -176,6 +178,8 @@ def launch_participant_network(
validator_data,
prysm_password_relative_filepath,
prysm_password_artifact_uuid,
checkpoint_sync_enabled,
checkpoint_sync_url,
port_publisher,
)
...
...
src/shared_utils/shared_utils.star
View file @
b8cd2b45
...
...
@@ -94,7 +94,7 @@ def get_devnet_enodes(plan, filename):
files={constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: filename},
wait=None,
run="""
with open("/network-configs/
bootnode
.txt") as bootnode_file:
with open("/network-configs/
enodes
.txt") as bootnode_file:
bootnodes = []
for line in bootnode_file:
line = line.strip()
...
...
@@ -211,7 +211,7 @@ def calculate_devnet_url(network, repo):
devnet_name.split("-")[1] + "-" if len(devnet_name.split("-")) > 1 else ""
)
return "github.com/{0}/{1}-devnets/network-configs/{2}{3}-{4}".format(
return "github.com/{0}/{1}-devnets/network-configs/{2}{3}-{4}
/metadata
".format(
repo, devnet_category, devnet_subname, network_type, devnet_number
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment