Skip to content

Commit b8cd2b4

Browse files
authored
feat: add checkpoint_enabled and checkpoint_url flags (#689)
1 parent 6571a70 commit b8cd2b4

16 files changed

+155
-69
lines changed

.github/tests/mix-public.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ participants:
1515
cl_type: grandine
1616
additional_services: []
1717
port_publisher:
18-
public_port_start: 40000
18+
public_port_start: 30000

.github/workflows/per-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070

7171
assertoor:
7272
runs-on: self-hosted-ghr-size-l-x64
73+
timeout-minutes: 30
7374
steps:
7475
- name: Checkout Repository
7576
uses: actions/checkout@v4

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,12 @@ global_node_selectors: {}
784784
# Defaults to false
785785
keymanager_enabled: false
786786

787+
# Global flag to enable checkpoint sync across the network
788+
checkpoint_sync_enabled: false
789+
790+
# Global flag to set checkpoint sync url
791+
checkpoint_sync_url: ""
792+
787793
# Global paarameter to set the exit ip address of services and public ports
788794
port_publisher:
789795
# if you have a service that you want to expose on a specific interfact; set that IP here

main.star

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def run(plan, args={}):
137137
global_node_selectors,
138138
keymanager_enabled,
139139
parallel_keystore_generation,
140+
args_with_right_defaults.checkpoint_sync_enabled,
141+
args_with_right_defaults.checkpoint_sync_url,
140142
args_with_right_defaults.port_publisher,
141143
)
142144

network_params.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ network_params:
8282
custody_requirement: 1
8383
target_number_of_peers: 70
8484
additional_preloaded_contracts: {}
85+
devnet_repo: ethpandaops
86+
checkpoint_sync_enabled: false
8587
additional_services:
8688
- tx_spammer
8789
- blob_spammer

src/cl/cl_launcher.star

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def launch(
3131
validator_data,
3232
prysm_password_relative_filepath,
3333
prysm_password_artifact_uuid,
34+
checkpoint_sync_enabled,
35+
checkpoint_sync_url,
3436
port_publisher,
3537
):
3638
plan.print("Launching CL network")
@@ -176,6 +178,8 @@ def launch(
176178
node_selectors,
177179
participant.use_separate_vc,
178180
participant.keymanager_enabled,
181+
checkpoint_sync_enabled,
182+
checkpoint_sync_url,
179183
port_publisher,
180184
)
181185
else:
@@ -210,6 +214,8 @@ def launch(
210214
node_selectors,
211215
participant.use_separate_vc,
212216
participant.keymanager_enabled,
217+
checkpoint_sync_enabled,
218+
checkpoint_sync_url,
213219
port_publisher,
214220
)
215221

src/cl/grandine/grandine_launcher.star

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def launch(
8989
node_selectors,
9090
use_separate_vc,
9191
keymanager_enabled,
92+
checkpoint_sync_enabled,
93+
checkpoint_sync_url,
9294
port_publisher,
9395
):
9496
beacon_service_name = "{0}".format(service_name)
@@ -150,6 +152,8 @@ def launch(
150152
cl_volume_size,
151153
tolerations,
152154
node_selectors,
155+
checkpoint_sync_enabled,
156+
checkpoint_sync_url,
153157
port_publisher,
154158
)
155159

@@ -230,6 +234,8 @@ def get_beacon_config(
230234
cl_volume_size,
231235
tolerations,
232236
node_selectors,
237+
checkpoint_sync_enabled,
238+
checkpoint_sync_url,
233239
port_publisher,
234240
):
235241
validator_keys_dirpath = ""
@@ -311,6 +317,22 @@ def get_beacon_config(
311317
# "--validator-api-bearer-file=" + constants.KEYMANAGER_MOUNT_PATH_ON_CONTAINER, Not yet supported
312318
]
313319

320+
# If checkpoint sync is enabled, add the checkpoint sync url
321+
if checkpoint_sync_enabled:
322+
if checkpoint_sync_url:
323+
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
324+
else:
325+
if network in ["mainnet", "ephemery"]:
326+
cmd.append(
327+
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
328+
)
329+
else:
330+
cmd.append(
331+
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
332+
network
333+
)
334+
)
335+
314336
if network not in constants.PUBLIC_NETWORKS:
315337
cmd.append(
316338
"--configuration-directory="
@@ -331,9 +353,6 @@ def get_beacon_config(
331353
)
332354
)
333355
elif network == constants.NETWORK_NAME.ephemery:
334-
cmd.append(
335-
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
336-
)
337356
cmd.append(
338357
"--boot-nodes="
339358
+ shared_utils.get_devnet_enrs_list(
@@ -348,21 +367,12 @@ def get_beacon_config(
348367
)
349368
)
350369
else: # Devnets
351-
# TODO Remove once checkpoint sync is working for verkle
352-
if constants.NETWORK_NAME.verkle not in network:
353-
cmd.append(
354-
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
355-
network
356-
)
357-
)
358370
cmd.append(
359371
"--boot-nodes="
360372
+ shared_utils.get_devnet_enrs_list(
361373
plan, el_cl_genesis_data.files_artifact_uuid
362374
)
363375
)
364-
else: # Public networks
365-
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])
366376

367377
if len(extra_params) > 0:
368378
# we do the list comprehension as the default extra_params is a proto repeated string

src/cl/lighthouse/lighthouse_launcher.star

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def launch(
9494
node_selectors,
9595
use_separate_vc,
9696
keymanager_enabled,
97+
checkpoint_sync_enabled,
98+
checkpoint_sync_url,
9799
port_publisher,
98100
):
99101
beacon_service_name = "{0}".format(service_name)
@@ -151,6 +153,8 @@ def launch(
151153
cl_volume_size,
152154
tolerations,
153155
node_selectors,
156+
checkpoint_sync_enabled,
157+
checkpoint_sync_url,
154158
port_publisher,
155159
)
156160

@@ -246,6 +250,8 @@ def get_beacon_config(
246250
cl_volume_size,
247251
tolerations,
248252
node_selectors,
253+
checkpoint_sync_enabled,
254+
checkpoint_sync_url,
249255
port_publisher,
250256
):
251257
# If snooper is enabled use the snooper engine context, otherwise use the execution client context
@@ -324,6 +330,22 @@ def get_beacon_config(
324330
"--enable-private-discovery",
325331
]
326332

333+
# If checkpoint sync is enabled, add the checkpoint sync url
334+
if checkpoint_sync_enabled:
335+
if checkpoint_sync_url:
336+
cmd.append("--checkpoint-sync-url=" + checkpoint_sync_url)
337+
else:
338+
if network in ["mainnet", "ephemery"]:
339+
cmd.append(
340+
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
341+
)
342+
else:
343+
cmd.append(
344+
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
345+
network
346+
)
347+
)
348+
327349
if network not in constants.PUBLIC_NETWORKS:
328350
cmd.append("--testnet-dir=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER)
329351
if (
@@ -341,23 +363,13 @@ def get_beacon_config(
341363
)
342364
)
343365
elif network == constants.NETWORK_NAME.ephemery:
344-
cmd.append(
345-
"--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network]
346-
)
347366
cmd.append(
348367
"--boot-nodes="
349368
+ shared_utils.get_devnet_enrs_list(
350369
plan, el_cl_genesis_data.files_artifact_uuid
351370
)
352371
)
353372
else: # Devnets
354-
# TODO Remove once checkpoint sync is working for verkle
355-
if constants.NETWORK_NAME.verkle not in network:
356-
cmd.append(
357-
"--checkpoint-sync-url=https://checkpoint-sync.{0}.ethpandaops.io".format(
358-
network
359-
)
360-
)
361373
cmd.append(
362374
"--boot-nodes="
363375
+ shared_utils.get_devnet_enrs_list(
@@ -366,7 +378,6 @@ def get_beacon_config(
366378
)
367379
else: # Public networks
368380
cmd.append("--network=" + network)
369-
cmd.append("--checkpoint-sync-url=" + constants.CHECKPOINT_SYNC_URL[network])
370381

371382
if len(extra_params) > 0:
372383
# this is a repeated<proto type>, we convert it into Starlark

src/cl/lodestar/lodestar_launcher.star

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def launch(
8383
node_selectors,
8484
use_separate_vc,
8585
keymanager_enabled,
86+
checkpoint_sync_enabled,
87+
checkpoint_sync_url,
8688
port_publisher,
8789
):
8890
beacon_service_name = "{0}".format(service_name)
@@ -139,6 +141,8 @@ def launch(
139141
cl_volume_size,
140142
tolerations,
141143
node_selectors,
144+
checkpoint_sync_enabled,
145+
checkpoint_sync_url,
142146
port_publisher,
143147
launcher.preset,
144148
)
@@ -239,6 +243,8 @@ def get_beacon_config(
239243
cl_volume_size,
240244
tolerations,
241245
node_selectors,
246+
checkpoint_sync_enabled,
247+
checkpoint_sync_url,
242248
port_publisher,
243249
preset,
244250
):
@@ -305,6 +311,22 @@ def get_beacon_config(
305311
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
306312
]
307313

314+
# If checkpoint sync is enabled, add the checkpoint sync url
315+
if checkpoint_sync_enabled:
316+
if checkpoint_sync_url:
317+
cmd.append("--checkpointSyncUrl=" + checkpoint_sync_url)
318+
else:
319+
if network in ["mainnet", "ephemery"]:
320+
cmd.append(
321+
"--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network]
322+
)
323+
else:
324+
cmd.append(
325+
"--checkpointSyncUrl=https://checkpoint-sync.{0}.ethpandaops.io".format(
326+
network
327+
)
328+
)
329+
308330
if network not in constants.PUBLIC_NETWORKS:
309331
cmd.append(
310332
"--paramsFile="
@@ -331,21 +353,13 @@ def get_beacon_config(
331353
)
332354
)
333355
elif network == constants.NETWORK_NAME.ephemery:
334-
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])
335356
cmd.append(
336357
"--bootnodes="
337358
+ shared_utils.get_devnet_enrs_list(
338359
plan, el_cl_genesis_data.files_artifact_uuid
339360
)
340361
)
341362
else: # Devnets
342-
# TODO Remove once checkpoint sync is working for verkle
343-
if constants.NETWORK_NAME.verkle not in network:
344-
cmd.append(
345-
"--checkpointSyncUrl=https://checkpoint-sync.{0}.ethpandaops.io".format(
346-
network
347-
)
348-
)
349363
cmd.append(
350364
"--bootnodes="
351365
+ shared_utils.get_devnet_enrs_list(
@@ -354,7 +368,6 @@ def get_beacon_config(
354368
)
355369
else: # Public testnet
356370
cmd.append("--network=" + network)
357-
cmd.append("--checkpointSyncUrl=" + constants.CHECKPOINT_SYNC_URL[network])
358371

359372
if len(extra_params) > 0:
360373
# this is a repeated<proto type>, we convert it into Starlark

src/cl/nimbus/nimbus_launcher.star

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def launch(
105105
node_selectors,
106106
use_separate_vc,
107107
keymanager_enabled,
108+
checkpoint_sync_enabled,
109+
checkpoint_sync_url,
108110
port_publisher,
109111
):
110112
beacon_service_name = "{0}".format(service_name)
@@ -166,6 +168,8 @@ def launch(
166168
cl_volume_size,
167169
tolerations,
168170
node_selectors,
171+
checkpoint_sync_enabled,
172+
checkpoint_sync_url,
169173
port_publisher,
170174
)
171175

@@ -246,6 +250,8 @@ def get_beacon_config(
246250
cl_volume_size,
247251
tolerations,
248252
node_selectors,
253+
checkpoint_sync_enabled,
254+
checkpoint_sync_url,
249255
port_publisher,
250256
):
251257
validator_keys_dirpath = ""

0 commit comments

Comments
 (0)