Commit 3ba9e51f authored by Manu NALEPA's avatar Manu NALEPA Committed by GitHub

Prysm BN/VC: Fix communication (#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: default avatarBarnabas Busa <barnabas.busa@ethereum.org>
Co-authored-by: default avatarBarnabas Busa <barnabas.busa@ethereum.org>
parent 0b2a2ae0
......@@ -12,8 +12,8 @@ BEACON_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/data/prysm/beacon-data/"
# Port nums
DISCOVERY_TCP_PORT_NUM = 13000
DISCOVERY_UDP_PORT_NUM = 12000
RPC_PORT_NUM = 3500
BEACON_HTTP_PORT_NUM = 4000
BEACON_HTTP_PORT_NUM = 3500
RPC_PORT_NUM = 4000
BEACON_MONITORING_PORT_NUM = 8080
PROFILING_PORT_NUM = 6060
......
......@@ -40,6 +40,8 @@ def get_config(
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml",
"--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
"--beacon-rpc-provider=" + cl_context.beacon_grpc_url,
"--beacon-rest-api-provider=" + beacon_http_url,
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--disable-monitoring=false",
"--monitoring-host=0.0.0.0",
......@@ -73,12 +75,8 @@ def get_config(
]
if cl_context.client_name != constants.CL_TYPE.prysm:
cmd.append("--beacon-rpc-provider=" + beacon_http_url)
cmd.append("--beacon-rest-api-provider=" + beacon_http_url)
# Use Beacon API if a Prysm VC wants to connect to a non-Prysm BN
cmd.append("--enable-beacon-rest-api")
else: # we are using Prysm CL
cmd.append("--beacon-rpc-provider=" + cl_context.beacon_grpc_url)
cmd.append("--beacon-rest-api-provider=" + cl_context.beacon_grpc_url)
if len(participant.vc_extra_params) > 0:
# this is a repeated<proto type>, we convert it into Starlark
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment