Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
support multiple bootnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y committed Aug 3, 2023
1 parent 7c5da7d commit bb496a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def get_beacon_config(

if boot_cl_client_ctxs != None:
cmd.append("--boot-nodes="+",".join([ctx.enr for ctx in boot_cl_client_ctxs]))
cmd.append("--trusted-peers"=",".join([ctx.peer_id for ctx in boot_cl_client_ctxs]))

if len(extra_params) > 0:
# this is a repeated<proto type>, we convert it into Starlark
Expand Down
5 changes: 4 additions & 1 deletion src/cl/prysm/prysm_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ def get_beacon_config(
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
]

if bootnode_context != None:
if bootnode_contexts != None:
cmd.append("--bootstrap-node="+",".join([ctx.enr for ctx in bootnode_contexts]))
for ctx in bootnode_contexts:
cmd.append("--peer="ctx.peer_id)
cmd.append("--p2p-static-id=true")

if len(extra_params) > 0:
# we do the for loop as otherwise its a proto repeated array
Expand Down
1 change: 1 addition & 0 deletions src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def get_config(

if bootnode_contexts != None:
cmd.append("--p2p-discovery-bootnodes="+",".join([ctx.enr for ctx in bootnode_contexts]))
cmd.append("--p2p-static-peers"=",".join([ctx.peer_id for ctx in bootnode_contexts]))

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

0 comments on commit bb496a8

Please sign in to comment.