Skip to content

Commit 3bb88e0

Browse files
authored
fix(prysm): run p2p-udp on different port as it might conflict with the new quic port (#845)
Prysm added QUIC to their client as per OffchainLabs/prysm#14688 . This currently broke our runs using the master branch prysm image due to the QUIC port running on 13000 by default. Which was conflicting with the settings we were providing for the UDP port: ```sh --p2p-quic-port value The QUIC port used by libp2p. (default: 13000) --p2p-tcp-port value The TCP port used by libp2p. (default: 13000) --p2p-udp-port value The UDP port used by the discovery service discv5. (default: 12000) ``` I've also added the CLI flags for it, but still commented out until a stable release is done.
1 parent 4f69962 commit 3bb88e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/cl/prysm/prysm_launcher.star

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BEACON_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/data/prysm/beacon-data/"
1212
# Port nums
1313
DISCOVERY_TCP_PORT_NUM = 13000
1414
DISCOVERY_UDP_PORT_NUM = 12000
15+
DISCOVERY_QUIC_PORT_NUM = 13000
1516
BEACON_HTTP_PORT_NUM = 3500
1617
RPC_PORT_NUM = 4000
1718
BEACON_MONITORING_PORT_NUM = 8080
@@ -161,6 +162,8 @@ def get_beacon_config(
161162

162163
public_ports = {}
163164
discovery_port = DISCOVERY_TCP_PORT_NUM
165+
discovery_port_udp = DISCOVERY_UDP_PORT_NUM
166+
discovery_port_quic = DISCOVERY_QUIC_PORT_NUM
164167
if port_publisher.cl_enabled:
165168
public_ports_for_component = shared_utils.get_public_ports_for_component(
166169
"cl", port_publisher, participant_index
@@ -181,7 +184,8 @@ def get_beacon_config(
181184

182185
used_port_assignments = {
183186
constants.TCP_DISCOVERY_PORT_ID: discovery_port,
184-
constants.UDP_DISCOVERY_PORT_ID: discovery_port,
187+
constants.UDP_DISCOVERY_PORT_ID: discovery_port_udp,
188+
# constants.QUIC_DISCOVERY_PORT_ID: discovery_port_quic, # TODO: Uncomment this when we have a stable release with this flag
185189
constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM,
186190
constants.METRICS_PORT_ID: BEACON_MONITORING_PORT_NUM,
187191
constants.RPC_PORT_ID: RPC_PORT_NUM,
@@ -200,7 +204,8 @@ def get_beacon_config(
200204
"--http-port={0}".format(BEACON_HTTP_PORT_NUM),
201205
"--p2p-host-ip=" + port_publisher.nat_exit_ip,
202206
"--p2p-tcp-port={0}".format(discovery_port),
203-
"--p2p-udp-port={0}".format(discovery_port),
207+
"--p2p-udp-port={0}".format(discovery_port_udp),
208+
# "--p2p-quic-port={0}".format(discovery_port_quic) # TODO: Uncomment this when we have a stable release with this flag
204209
"--min-sync-peers={0}".format(MIN_PEERS),
205210
"--verbosity=" + log_level,
206211
"--slots-per-archive-point={0}".format(32 if constants.ARCHIVE_MODE else 8192),

0 commit comments

Comments
 (0)