Skip to content

Commit 3ba9e51

Browse files
Prysm BN/VC: Fix communication (ethereum#839)
This PR has 2 commits: - Use different ports for gRPC and HTTP communication between Prysm VC and BN - Switch gRPC and HTTP ports to be consistent with default values. Before this PR, we had this issue: ``` docker inspect vc-1-geth-prysm--773bda94114946f3b501f3e293517426 [ { "Id": "93713c8d7020aeb505836a11a1858e27dd9ecac19e7e7ed4814f677c30bc9c48", "Created": "2024-11-29T13:05:02.300408215Z", "Path": "/validator", "Args": [ "--accept-terms-of-use=true", "--chain-config-file=/network-configs/config.yaml", "--suggested-fee-recipient=0x8943545177806ED17B9F23F0a21ee5948eCaa776", "--disable-monitoring=false", "--monitoring-host=0.0.0.0", "--monitoring-port=8080", "--graffiti=1-geth-prysm", "--wallet-dir=/validator-keys/prysm", "--wallet-password-file=/prysm-password/prysm-password.txt", "--beacon-rpc-provider=172.16.0.13:3500", "--beacon-rest-api-provider=172.16.0.13:3500", "--enable-beacon-rest-api" ], ``` ``` "--beacon-rpc-provider=172.16.0.13:3500", "--beacon-rest-api-provider=172.16.0.13:3500", ``` The Prysm VC tried to connect to the Prysm VC with the same port for the beacon API and the gRPC. Now, it is: **VC**: ``` ... "--beacon-rpc-provider=172.16.0.13:4000", "--beacon-rest-api-provider=http://172.16.0.13:3500" ... ``` BN: ``` ... "--rpc-host=0.0.0.0", "--rpc-port=4000", "--http-host=0.0.0.0", "--http-cors-domain=*", "--http-port=3500", ... ``` --------- Signed-off-by: Barnabas Busa <[email protected]> Co-authored-by: Barnabas Busa <[email protected]>
1 parent 0b2a2ae commit 3ba9e51

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/cl/prysm/prysm_launcher.star

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ 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-
RPC_PORT_NUM = 3500
16-
BEACON_HTTP_PORT_NUM = 4000
15+
BEACON_HTTP_PORT_NUM = 3500
16+
RPC_PORT_NUM = 4000
1717
BEACON_MONITORING_PORT_NUM = 8080
1818
PROFILING_PORT_NUM = 6060
1919

src/vc/prysm.star

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def get_config(
4040
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
4141
+ "/config.yaml",
4242
"--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
43+
"--beacon-rpc-provider=" + cl_context.beacon_grpc_url,
44+
"--beacon-rest-api-provider=" + beacon_http_url,
4345
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
4446
"--disable-monitoring=false",
4547
"--monitoring-host=0.0.0.0",
@@ -73,12 +75,8 @@ def get_config(
7375
]
7476

7577
if cl_context.client_name != constants.CL_TYPE.prysm:
76-
cmd.append("--beacon-rpc-provider=" + beacon_http_url)
77-
cmd.append("--beacon-rest-api-provider=" + beacon_http_url)
78+
# Use Beacon API if a Prysm VC wants to connect to a non-Prysm BN
7879
cmd.append("--enable-beacon-rest-api")
79-
else: # we are using Prysm CL
80-
cmd.append("--beacon-rpc-provider=" + cl_context.beacon_grpc_url)
81-
cmd.append("--beacon-rest-api-provider=" + cl_context.beacon_grpc_url)
8280

8381
if len(participant.vc_extra_params) > 0:
8482
# this is a repeated<proto type>, we convert it into Starlark

0 commit comments

Comments
 (0)