forked from bnb-chain/opbnb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
148 lines (139 loc) · 4.06 KB
/
docker-compose.yml
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
version: '3.4'
# This Compose file is expected to be used with the devnet-up.sh script.
# The volumes below mount the configs generated by the script into each
# service.
volumes:
l1_data:
l2_data:
op_log:
services:
l1:
build:
context: .
dockerfile: Dockerfile.l1
ports:
- "8545:8545"
- "7060:6060"
env_file:
- ./l1.env
user: root
volumes:
- "l1_data:/db"
- "./l1-entrypoint.sh:/l1-entrypoint.sh"
entrypoint: /l1-entrypoint.sh
l2:
build:
context: .
dockerfile: Dockerfile.l2
ports:
- "9545:8545"
- "8060:6060"
volumes:
- "l2_data:/db"
- "${PWD}/../.devnet/genesis-l2.json:/genesis.json"
- "${PWD}/test-jwt-secret.txt:/config/test-jwt-secret.txt"
entrypoint: # pass the L2 specific flags by overriding the entry-point and adding extra arguments
- "/bin/sh"
- "/entrypoint.sh"
- "--authrpc.jwtsecret=/config/test-jwt-secret.txt"
op-node:
depends_on:
- l1
- l2
build:
context: ../
dockerfile: ./op-node/Dockerfile
command: >
op-node
--l1.trustrpc
--l1=http://l1:8545
--l2=http://l2:8551
--l2.jwt-secret=/config/test-jwt-secret.txt
--sequencer.enabled
--sequencer.l1-confs=15
--verifier.l1-confs=15
--l1.http-poll-interval=3s
--l1.epoch-poll-interval=3s
--l1.rpc-max-batch-size=20
--p2p.sequencer.key=8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba
--rollup.config=/rollup.json
--rpc.addr=0.0.0.0
--rpc.port=8545
--p2p.disable
--rpc.enable-admin
--snapshotlog.file=/op_log/snapshot.log
--p2p.priv.path=/config/p2p-node-key.txt
--metrics.enabled
--metrics.addr=0.0.0.0
--metrics.port=7300
--pprof.enabled
--rpc.enable-admin
--log.level=debug
ports:
- "7545:8545"
- "7300:7300"
- "6060:6060"
volumes:
- "${PWD}/p2p-sequencer-key.txt:/config/p2p-sequencer-key.txt"
- "${PWD}/p2p-node-key.txt:/config/p2p-node-key.txt"
- "${PWD}/test-jwt-secret.txt:/config/test-jwt-secret.txt"
- "${PWD}/../.devnet/rollup.json:/rollup.json"
- op_log:/op_log
op-proposer:
depends_on:
- l1
- l2
- op-node
build:
context: ../
dockerfile: ./op-proposer/Dockerfile
ports:
- "6062:6060"
- "7302:7300"
environment:
OP_PROPOSER_L1_ETH_RPC: http://l1:8545
OP_PROPOSER_ROLLUP_RPC: http://op-node:8545
OP_PROPOSER_POLL_INTERVAL: 1s
OP_PROPOSER_NUM_CONFIRMATIONS: 4
OP_PROPOSER_SAFE_ABORT_NONCE_TOO_LOW_COUNT: 3
OP_PROPOSER_RESUBMISSION_TIMEOUT: "30s"
OP_PROPOSER_LOG_TERMINAL: "true"
OP_PROPOSER_L2OO_ADDRESS: "${L2OO_ADDRESS}"
OP_PROPOSER_PPROF_ENABLED: "true"
OP_PROPOSER_METRICS_ENABLED: "true"
OP_PROPOSER_ALLOW_NON_FINALIZED: "false"
OP_PROPOSER_PRIVATE_KEY: ${INIT_HOLDER_PRV}
op-batcher:
depends_on:
- l1
- l2
- op-node
build:
context: ../
dockerfile: ./op-batcher/Dockerfile
ports:
- "6061:6060"
- "7301:7300"
- "6545:8545"
environment:
OP_BATCHER_L1_ETH_RPC: http://l1:8545
OP_BATCHER_L2_ETH_RPC: http://l2:8545
OP_BATCHER_ROLLUP_RPC: http://op-node:8545
OP_BATCHER_MAX_L1_TX_SIZE_BYTES: 120000
OP_BATCHER_TARGET_L1_TX_SIZE_BYTES: 100000
OP_BATCHER_TARGET_NUM_FRAMES: 30
OP_BATCHER_APPROX_COMPR_RATIO: "0.4"
OP_BATCHER_MAX_CHANNEL_DURATION: 20
OP_BATCHER_POLL_INTERVAL: 1s
OP_BATCHER_SAFE_ABORT_NONCE_TOO_LOW_COUNT: 3
OP_BATCHER_NUM_CONFIRMATIONS: 4
OP_BATCHER_TXMGR_RECEIPT_QUERY_INTERVAL: 1s
OP_BATCHER_RESUBMISSION_TIMEOUT: "30s"
OP_BATCHER_LOG_LEVEL: "debug"
OP_BATCHER_PRIVATE_KEY: ${INIT_HOLDER_PRV}
OP_BATCHER_PPROF_ENABLED: "true"
OP_BATCHER_METRICS_ENABLED: "true"
OP_BATCHER_RPC_ENABLE_ADMIN: "true"
OP_BATCHER_LOG_TERMINAL: "true"
OP_BATCHER_SUB_SAFETY_MARGIN: 30 # SWS is 15, ChannelTimeout is 40
OP_BATCHER_MAX_PENDING_TX: 100