-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathdocker-compose-mainnetv1.yml
More file actions
147 lines (141 loc) · 4.71 KB
/
docker-compose-mainnetv1.yml
File metadata and controls
147 lines (141 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Mantle Network L2 history Geth Node Docker Compose Configuration
# This configuration file is used to deploy a Mantle Network L2 Geth node
# Main Features:
# 1. Run L2 Geth node and connect to Mantle Network mainnet
# 2. Configure health check to ensure node operation
# 3. Set up data persistence storage
# 4. Configure RPC interface access
#
# Usage Instructions:
# 1. Ensure Docker and Docker Compose are installed
# 2. download history snapshot
# 3. Run command: docker-compose -f docker-compose-mainnetv1.yml up -d
#
# Important Notes:
# - must download history snapshot , do not use snapshot of v2
# - Ensure sufficient disk space for data storage
# - Regular backup of data directory is recommended
version: '3.4'
services:
op-geth:
image: mantlenetworkio/mantle-op-geth:v1.3.2
deploy:
resources:
limits:
cpus: '4'
memory: 8000M
reservations:
cpus: '4'
memory: 8000M
restart_policy:
condition: on-failure
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: geth
command:
- --datadir=/db
- --verbosity=3
- --port=30300
- --http
- --http.corsdomain=*
- --http.vhosts=*
- --http.addr=0.0.0.0
- --http.port=8545
- --http.api=web3,eth,debug,txpool,net
- --ws
- --ws.addr=0.0.0.0
- --ws.port=8546
- --ws.origins=*
- --ws.api=web3,eth,debug,txpool,net
- --syncmode=full
- --maxpeers=0
- --networkid=5000
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.vhosts=*
- --authrpc.jwtsecret=/secret/jwt_secret_txt
- --pprof
- --pprof.addr=0.0.0.0
- --pprof.port=6060
- --gcmode=archive
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=9001
- --snapshot=false
- --rollup.sequencerhttp=https://rpc.mantle.xyz
- --rollup.historicalrpc=http://op-geth-v1:8545
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/mantle-op-node:v1.3.2
deploy:
resources:
limits:
cpus: '4'
memory: 8000M
reservations:
cpus: '4'
memory: 8000M
restart_policy:
condition: on-failure
depends_on:
- op-geth
volumes:
- ./mainnet/secret:/secret
- ./mainnet/rollup.json:/config/rollup.json
environment:
OP_NODE_L1_ETH_RPC: $L1_RPC_MAINNET
OP_NODE_L2_ENGINE_RPC: 'http://op-geth: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_P2P_LISTEN_IP: '0.0.0.0'
OP_NODE_P2P_LISTEN_TCP_PORT: 9003
OP_NODE_P2P_LISTEN_UDP_PORT: 9003
OP_NODE_P2P_PEER_SCORING: 'light'
OP_NODE_P2P_PEER_BANNING: 'true'
OP_NODE_METRICS_ENABLED: 'true'
OP_NODE_METRICS_ADDR: '0.0.0.0'
OP_NODE_METRICS_PORT: 7300
OP_NODE_PPROF_ENABLED: 'true'
OP_NODE_PPROF_PORT: 6060
OP_NODE_PPROF_ADDR: '0.0.0.0'
OP_NODE_P2P_DISCOVERY_PATH: '/op-node/opnode_discovery_db'
OP_NODE_P2P_PEERSTORE_PATH: '/op-node/opnode_peerstore_db'
OP_NODE_INDEXER_SOCKET: 'da-indexer-api.mantle.xyz:443'
OP_NODE_INDEXER_ENABLE: 'true'
OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC: https://rpc.mantle.xyz
OP_NODE_P2P_STATIC: '/dns4/peer0.mantle.xyz/tcp/9003/p2p/16Uiu2HAmKVKzUAns2gLhZAz1PYcbnhY3WpxNxUZYeTN1x29tNBAW,/dns4/peer1.mantle.xyz/tcp/9003/p2p/16Uiu2HAm1AiZtVp8f5C8LvpSTAXC6GtwqAVKnB3VLawWYSEBmcFN,/dns4/peer2.mantle.xyz/tcp/9003/p2p/16Uiu2HAm2UHVKiPXpovs8VbbUQVPr7feBAqBJdFsH1z5XDiLEvHT'
OP_NODE_SEQUENCER_ENABLED: 'false'
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-geth-v1:
image: mantlenetworkio/l2geth:v0.4.3
entrypoint: sh ./geth.sh
env_file:
- ./mainnet/envs/geth.env #
volumes:
- ./data/gethv1:/root/.ethereum/geth/
environment:
ETH1_HTTP: $L1_RPC_MAINNET #change this
SEQUENCER_CLIENT_HTTP: https://rpc.mantle.xyz
ROLLUP_STATE_DUMP_PATH: https://mantlenetworkio.github.io/networks/mainnet/genesis.json
ROLLUP_BACKEND: 'l2'
ETH1_CTC_DEPLOYMENT_HEIGHT: 8
RETRIES: 60
ROLLUP_VERIFIER_ENABLE: 'true'
ports:
- ${HISTORY_RPC_HTTP_PORT:-18545}:8545
- ${HISTORY_RPC_WS_PORT:-18546}:8546