Skip to content

Commit

Permalink
prepare Mainnet to The Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
feshchenkod committed Sep 2, 2022
1 parent 2588648 commit 64e36e7
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 1 deletion.
35 changes: 35 additions & 0 deletions geth/docker-compose.no-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,51 @@ services:
- "0"
- --rpc.txfeecap
- "0"
- --authrpc.addr
- "0.0.0.0"
- --authrpc.port
- "${AUTH_PORT}"
- --authrpc.jwtsecret
- "/secrets/jwtsecret"
- --authrpc.vhosts=*
ports:
- ${HTTP_PORT}:${HTTP_PORT}
- ${WS_PORT}:${WS_PORT}
- ${P2P_PORT}:${P2P_PORT}
volumes:
- ./geth-data:/root/.ethereum
- ./secrets:/secrets
stop_grace_period: 3m30s
stop_signal: SIGINT
healthcheck:
test: wget -nv -t1 --spider 'http://127.0.0.1:${HTTP_PORT}/' || exit 1
interval: 5s
timeout: 10s
retries: 3

lighthouse-mainnet:
image: sigp/lighthouse:latest-modern
hostname: lighthouse-mainnet
restart: unless-stopped
command: |
lighthouse beacon_node
--network mainnet
--eth1-endpoints $RPC_URL
--datadir /home/.eth2/beaconchaindata
--discovery-port ${CL_P2P_PORT}
--port ${CL_P2P_PORT}
--http
--http-address 0.0.0.0
--enr-address $PUBLIC_IP
--enr-udp-port ${CL_P2P_PORT}
--target-peers $TARGET_PEERS
--debug-level $LOG_LEVEL
--execution-endpoint $EXECUTION_ENDPOINT
--execution-jwt "/secrets/jwtsecret"
# --checkpoint-sync-url $CHECKPOINT_RPC_URL
ports:
- '${CL_P2P_PORT}:${CL_P2P_PORT}/tcp'
- '${CL_P2P_PORT}:${CL_P2P_PORT}/udp'
volumes:
- ./lighthouse-data:/home/.eth2/beaconchaindata
- ./secrets:/secrets
37 changes: 37 additions & 0 deletions geth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,20 @@ services:
- "0"
- --rpc.txfeecap
- "0"
- --authrpc.addr
- "0.0.0.0"
- --authrpc.port
- "${AUTH_PORT}"
- --authrpc.jwtsecret
- "/secrets/jwtsecret"
- --authrpc.vhosts=*
ports:
# - ${HTTP_PORT}:${HTTP_PORT}
# - ${WS_PORT}:${WS_PORT}
- ${P2P_PORT}:${P2P_PORT}
volumes:
- ./geth-data:/root/.ethereum
- ./secrets:/secrets
stop_grace_period: 3m30s
stop_signal: SIGINT
healthcheck:
Expand Down Expand Up @@ -92,6 +100,35 @@ services:
networks:
- rpc

lighthouse-mainnet:
image: sigp/lighthouse:latest-modern
hostname: lighthouse-mainnet
restart: unless-stopped
command: |
lighthouse beacon_node
--network mainnet
--eth1-endpoints $RPC_URL
--datadir /home/.eth2/beaconchaindata
--discovery-port ${CL_P2P_PORT}
--port ${CL_P2P_PORT}
--http
--http-address 0.0.0.0
--enr-address $PUBLIC_IP
--enr-udp-port ${CL_P2P_PORT}
--target-peers $TARGET_PEERS
--debug-level $LOG_LEVEL
--execution-endpoint $EXECUTION_ENDPOINT
--execution-jwt "/secrets/jwtsecret"
# --checkpoint-sync-url $CHECKPOINT_RPC_URL
ports:
- '${CL_P2P_PORT}:${CL_P2P_PORT}/tcp'
- '${CL_P2P_PORT}:${CL_P2P_PORT}/udp'
volumes:
- ./lighthouse-data:/home/.eth2/beaconchaindata
- ./secrets:/secrets
networks:
- rpc

networks:
rpc:
name: rpc-shared-network
13 changes: 12 additions & 1 deletion geth/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,16 @@ ALLOW_FROM=0.0.0.0/0
P2P_PORT=30304
HTTP_PORT=8545
WS_PORT=8546
WS_PORT=8546
AUTH_PORT=8554
# Comma-separated list of addresses to treat as "local"
TX_LOCAL_ADDR=0x0000000000000000000000000000000000000000
TX_LOCAL_ADDR=0x0000000000000000000000000000000000000000


RPC_URL=http://geth:8545
CHECKPOINT_RPC_URL=
PUBLIC_IP=
EXECUTION_ENDPOINT=http://geth:8554
CL_P2P_PORT=30304
TARGET_PEERS=50
LOG_LEVEL=info
16 changes: 16 additions & 0 deletions geth/geth.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ docker-compose pull
docker-compose up -d geth
```

### Prepare to The Merge
Set `PUBLIC_IP` in `.env`.

Create a jwtsecret file:
```bash
openssl rand -hex 32 | tr -d "\n" | sudo tee /secrets/jwtsecret
sudo chmod 644 /secrets/jwtsecret
```

Update to latest EL / CL node software:
```
docker-compose pull
docker-compose up -d geth lighthouse-mainnet
```


## Pruning
Use it if the size is approaching 800 GB. At least 120 GB must be free for successful pruning.
```bash
Expand Down
Empty file added geth/secrets/.gitkeep
Empty file.

0 comments on commit 64e36e7

Please sign in to comment.