-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathdocker-compose_mainnet.yml
More file actions
297 lines (283 loc) · 9.13 KB
/
docker-compose_mainnet.yml
File metadata and controls
297 lines (283 loc) · 9.13 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# Copyright (c) 2024 Hemi Labs, Inc.
# Use of this source code is governed by the MIT License,
# which can be found in the LICENSE file.
name: "hemi-stack"
services:
# Bitcoin Finality Governor
bfgd:
build:
dockerfile: "./docker/bfgd/Dockerfile"
context: "./.."
depends_on:
bfgd-postgres:
condition: "service_started"
electrs:
condition: "service_healthy"
environment:
BFG_POSTGRES_URI: "postgres://postgres@bfgd-postgres:5432/bfg?sslmode=disable"
### XXXX Make this variable and set to recent block
BFG_BTC_START_HEIGHT: "869309"
BFG_EXBTC_ADDRESS: "electrs:50001"
BFG_LOG_LEVEL: "INFO"
BFG_PUBLIC_ADDRESS: ":8383"
BFG_PRIVATE_ADDRESS: ":8080"
ports:
### CHANGE HOST PORTS
- '8082:8080'
- '8385:8383'
networks:
- "localnode"
deploy:
restart_policy:
condition: "any"
# Bitcoin Finality Governor PostgreSQL
bfgd-postgres:
build:
dockerfile: "./localnode/postgres.Dockerfile"
context: "./.."
volumes:
- psql_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: "bfg"
POSTGRES_HOST_AUTH_METHOD: "trust"
networks:
- "localnode"
command:
- "postgres"
# lower random_page_cost (opposed to default 4.0) to cause planner
# to choose index scans vs sequential scans when at fewer rows in a table
- "-c"
- "random_page_cost=1.0"
# Bitcoind Node
bitcoind:
image: "kylemanna/bitcoind@sha256:5d97bbe3c74856818f0b3a1e718eb3968981ab03ce08aaf1c7d528f99aaf30b7"
volumes:
- bitcoin_data:/bitcoin/.bitcoin
ports:
- '8333:8333'
networks:
- "localnode"
command:
- "bitcoind"
- "-rpcuser=user"
- "-rpcpassword=password"
- "-rpcallowip=0.0.0.0/0"
- "-rpcbind=0.0.0.0:8332"
- "-txindex=1"
- "-rpcworkqueue=400"
# Bitcoin Secure Sequencer
bssd:
build:
dockerfile: "./docker/bssd/Dockerfile"
context: "./.."
depends_on:
- "bfgd"
environment:
BSS_BFG_URL: "ws://bfgd:8080/v1/ws/private"
BSS_LOG_LEVEL: "INFO"
BSS_ADDRESS: ":8081"
ports:
- '8081:8081'
networks:
- "localnode"
# Electrs (Bitcoin indexer, used by BFG)
electrs:
build:
context: ./..
dockerfile: ./localnode/electrs.Dockerfile
depends_on:
- "bitcoind"
volumes:
- ./cookie:/tmp/.cookie
- electrs_data:/data/electrs
environment:
RUST_LOG: debug
RUST_BACKTRACE: "full"
networks:
- "localnode"
command:
- "electrs_bitcoin/bin/electrs"
- "--electrum-rpc-addr"
- "0.0.0.0:50001"
- "--daemon-rpc-addr"
- "bitcoind:8332"
# NOTE: If you expose electrs ports, you may want to ensure that this is changed!
- "--cookie"
- "user:password"
- "-vvv"
- "--timestamp"
- "--utxos-limit"
- "50000"
- "--electrum-txs-limit"
- "50000"
- "--jsonrpc-import"
- "--db-dir=/data/electrs/blockstream"
deploy:
restart_policy:
condition: "on-failure"
# Ethereum L1 node
geth-l1:
image: "ethereum/client-go@sha256:343cff592e1a9daf99a89261d3263941ff9c3350b62b3ebc0f7c30d35721d905"
volumes:
- geth_data:/tmp/geth
# change this token value if you expose this service's ports for
# connection from other machines
- ./jwt.hex:/tmp/jwt/jwt.hex
ports:
- '8545:8545'
networks:
- "localnode"
command:
- "--http"
- "--http.port=8545"
- "--http.addr=0.0.0.0"
- "--http.api=eth,net,engine,admin"
- "--authrpc.vhosts=*"
- "--authrpc.addr=0.0.0.0"
- "--authrpc.jwtsecret=/tmp/jwt/jwt.hex"
- "--http.vhosts"
- "*"
- "--datadir"
- "/tmp/geth"
- "--gpo.percentile=0"
- "--mainnet"
working_dir: "/tmp/geth"
# Hemi L2 node
op-geth-l2:
image: "ghcr.io/hemilabs/op-geth:e525f27@sha256:f48c03532810ec4d9d08be8afa19822c9adcdd2d8dd559467a0d2b34965d5a6d"
# XXX does geth need to be fully synced
depends_on:
geth-l1:
condition: "service_started"
op-geth-l2-init:
condition: "service_completed_successfully"
op-geth-l2-init-tbc:
condition: "service_completed_successfully"
healthcheck:
test: ["CMD", "nc", "-vz", "0.0.0.0", "18546"]
interval: 5s
timeout: 5s
retries: 999999
volumes:
- ./mainnet-genesis.json:/tmp/genesis.json
# change this token value if you expose this service's ports for
# connection from other machines
- ./jwt.hex:/tmp/jwt/jwt.hex:ro
- ./mainnet-entrypointl2.sh:/tmp/entrypointl2.sh
- op-geth_data:/tmp/datadir
- ./mainnet-rollup.json:/tmp/rollup.json
- ./mainnet-l2-config.toml:/tmp/l2-config.toml # TODO make a testnet specific one
- tbc_data:/tbcdata
environment:
OP_GETH_L1_RPC: "http://geth-l1:8545"
OP_GETH_L2_READINESS_RPC: "http://localhost:18546"
ports:
- '18546:18546'
- '28546:28546'
networks:
- "localnode"
entrypoint:
- "sh"
- "/tmp/entrypointl2.sh"
working_dir: "/tmp"
ulimits:
memlock: -1
deploy:
restart_policy:
condition: "on-failure"
# Init container for Hemi L2 node
op-geth-l2-init:
image: "alpine@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d" # 3.20.3
volumes:
- op-geth_data:/tmp/datadir
command:
- "chown"
- "-R"
- "65532" # geth user
- "/tmp/datadir"
# Init TBC container for Hemi L2 node
op-geth-l2-init-tbc:
image: "alpine@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d" # 3.20.3
volumes:
- tbc_data:/tbcdata
command:
- "chown"
- "-R"
- "65532" # geth user
- "/tbcdata"
# Hemi op-node
op-node:
image: "ghcr.io/hemilabs/op-node:84b895e@sha256:df29c59680c33cdda616f67662c9e75bdeea60f79d91937ee0b60bf0d0f48243"
depends_on:
geth-l1:
condition: "service_started"
op-geth-l2:
condition: "service_healthy"
prysm:
condition: "service_started"
volumes:
# change this token value if you expose this service's ports for
# connection from other machines
- ./jwt.hex:/tmp/jwt/jwt.hex
- ./op-node-priv-key.txt:/tmp/op-node-priv-key.txt
- ./mainnet-rollup.json:/tmp/rollup.json
environment:
OP_NODE_BSS_WS: "http://bssd:8081/v1/ws"
ports:
- '8547:8547'
networks:
- "localnode"
command:
- "op-node"
- "--l1=http://geth-l1:8545"
- "--l1.rpckind=any"
- "--l1.beacon=http://prysm:3500"
- "--l2=ws://op-geth-l2:8551"
- "--l2.jwt-secret=/tmp/jwt/jwt.hex"
- "--sequencer.enabled=false"
- "--rollup.config=/tmp/rollup.json"
- "--override.ecotone=1725868497"
- "--override.canyon=1725868497"
- "--override.delta=1725868497"
- "--rpc.addr=0.0.0.0"
- "--rpc.port=8547"
- "--p2p.bootnodes=enr:-J64QACnJ0giPmPXowNCHP-FDleMMbDqYg5nuLABYfJeYbP9OA6_fZtvCsTbAwvlPD8_C6ZSXEk1-XPabDBwD8UTyNCGAZMxdy4t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ticlabs/prysm/beacon-chain@sha256:ea7d64346cd51cb0a6979779bdfd284a13aedb5642a795637935daacdfe1675d" # stable
volumes:
- prysm_data:/data
# change this token value if you expose this service's ports for
# connection from other machines
- ./jwt.hex:/tmp/jwt/jwt.hex:ro
ports:
- '4000:4000'
networks:
- "localnode"
command:
- "--execution-endpoint=http://geth-l1:8551"
- "--jwt-secret=/tmp/jwt/jwt.hex"
- "--checkpoint-sync-url=https://beaconstate.info"
- "--genesis-beacon-api-url=https://beaconstate.info"
- "--accept-terms-of-use"
- "--datadir=/data/prysm"
- "--rpc-host=0.0.0.0"
- "--enable-debug-rpc-endpoints"
- "--grpc-gateway-host=0.0.0.0"
- "--enable-experimental-backfill"
- "--mainnet"
networks:
localnode: {}
volumes:
bitcoin_data: {}
geth_data: {}
prysm_data: {}
psql_data: {}
op-geth_data: {}
electrs_data: {}
tbc_data: {}