Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions docker-compose-mainnetv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ x-healthcheck: &healthcheck
services:
op-geth:
image: mantlenetworkio/op-geth:v1.0.0-alpha.1
network_mode: "host"
deploy:
resources:
limits:
Expand All @@ -20,8 +21,6 @@ services:
memory: 8000M
restart_policy:
condition: on-failure
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: geth
command:
- --datadir=/db
Expand Down Expand Up @@ -49,7 +48,7 @@ services:
- --pprof
- --pprof.addr=0.0.0.0
- --pprof.port=6060
- --gcmode=archive
- --gcmode=full
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=9001
Expand All @@ -58,12 +57,9 @@ services:
volumes:
- ./mainnet/secret:/secret/
- ./data/mainnet-geth:/db/geth/
ports:
- ${VERIFIER_HTTP_PORT:-8545}:8545
- ${VERIFIER_WS_PORT:-8546}:8546
- ${VERIFIER_AUTH_PORT:-8551}:8551
op-node:
image: mantlenetworkio/op-node:v1.0.0-alpha.1
network_mode: "host"
deploy:
resources:
limits:
Expand All @@ -81,13 +77,13 @@ services:
- ./mainnet/rollup.json:/config/rollup.json
environment:
OP_NODE_L1_ETH_RPC: 'wss://mainnet.gateway.tenderly.co' #change this
OP_NODE_L2_ENGINE_RPC: 'http://op-geth:8551'
OP_NODE_L2_ENGINE_RPC: 'http://localhost:8551'
OP_NODE_L2_ENGINE_AUTH: /secret/jwt_secret_txt
OP_NODE_ROLLUP_CONFIG: '/config/rollup.json'
OP_NODE_P2P_PRIV_PATH: /secret/p2p_node_key_txt
OP_NODE_VERIFIER_L1_CONFS: '3'
OP_NODE_RPC_ADDR: '0.0.0.0'
OP_NODE_RPC_PORT: 8545
OP_NODE_RPC_PORT: 9545
OP_NODE_P2P_LISTEN_IP: '0.0.0.0'
OP_NODE_P2P_LISTEN_TCP_PORT: 9003
OP_NODE_P2P_LISTEN_UDP_PORT: 9003
Expand All @@ -109,6 +105,4 @@ services:
OP_NODE_P2P_AGENT: 'mantle'
OP_NODE_L2_ENGINE_SYNC_ENABLED: 'true'
OP_NODE_L2_SKIP_SYNC_START_CHECK: 'true'
OP_NODE_P2P_SYNC_REQ_RESP: 'true'
ports:
- ${NODE_RPC_PORT:-9545}:8545
OP_NODE_P2P_SYNC_REQ_RESP: 'false'
16 changes: 16 additions & 0 deletions run-node-mainnetv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ chaindata
```

#### Start
> **_NOTE:_** please change the OP_NODE_L1_ETH_RPC in docker-compose-mainnetv2.yml to your own RPC
>
> **_NOTE:_** please add OP_NODE_P2P_ADVERTISE_IP: PUBLIC_IP into the docker-compose-mainnetv2.yml if your instance have public IP and make the 9003 port could forward to op-node 9003

```sh
docker-compose -f docker-compose-mainnetv2.yml up -d
Expand Down Expand Up @@ -145,3 +148,16 @@ cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .finalized_l2.number

cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .safe_l2.number
```

### debug p2p

if you have public IP of the instance you run op-node , open p2p will fast the sync speed , if your rpc is slow at sync please run the following command and check the status

```sh
#check all the connection
cast rpc opp2p_peers true --rpc-url http://localhost:9545

#check self peer info
cast rpc opp2p_self --rpc-url http://localhost:9545

```