-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
326 lines (311 loc) · 9.35 KB
/
docker-compose.yml
File metadata and controls
326 lines (311 loc) · 9.35 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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# 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-testnet-stack"
services:
# Bitcoin Finality Governor
bfgd:
build:
dockerfile: "./docker/bfgd/Dockerfile"
context: "./.."
profiles: ["hemi", "full"]
depends_on:
bfgd-postgres:
condition: "service_started"
electrs:
condition: "service_healthy"
environment:
# yamllint disable-line rule:line-length
BFG_POSTGRES_URI: "postgres://postgres@bfgd-postgres:5432/bfg?sslmode=disable"
### XXXX Make this variable and set to recent block
BFG_BTC_START_HEIGHT: "3195980"
BFG_EXBTC_ADDRESS: "electrs:50001"
BFG_LOG_LEVEL: "INFO"
BFG_PUBLIC_ADDRESS: ":8383"
BFG_PRIVATE_ADDRESS: ":8080"
BFG_BASELINE_L2_BLOCK_HEIGHT: "3000000"
BFG_BASELINE_L2_BLOCK_TIMESTAMP: "1744110816000"
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: "./.."
profiles: ["hemi", "full"]
volumes:
- psql_data:/var
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:
# yamllint disable-line rule:line-length
image: "kylemanna/bitcoind@sha256:5d97bbe3c74856818f0b3a1e718eb3968981ab03ce08aaf1c7d528f99aaf30b7"
profiles: ["L1", "full"]
volumes:
- bitcoin_data:/bitcoin/.bitcoin
ports:
- '18333:18333'
networks:
- "localnode"
command:
- "bitcoind"
- "-testnet=1"
- "-rpcuser=user"
- "-rpcpassword=password"
- "-rpcallowip=0.0.0.0/0"
- "-rpcbind=0.0.0.0:18332"
- "-txindex=1"
- "-rpcworkqueue=400"
# Bitcoin Secure Sequencer
bssd:
build:
dockerfile: "./docker/bssd/Dockerfile"
context: "./.."
profiles: ["hemi", "hemi-min", "full"]
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
profiles: ["hemi", "full"]
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"
- "${BITCOINENDPOINT:-bitcoind:18332}"
- "--network"
- "testnet"
# NOTE: If you expose electrs ports,
# you may want to ensure that this is changed!
- "--cookie"
- "${BITCOINCREDS:-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:
# yamllint disable-line rule:line-length
image: "ethereum/client-go@sha256:343cff592e1a9daf99a89261d3263941ff9c3350b62b3ebc0f7c30d35721d905"
profiles: ["L1", "full"]
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:
- "--sepolia"
- "--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"
working_dir: "/tmp/geth"
# Hemi L2 node
op-geth-l2:
# yamllint disable-line rule:line-length
image: "ghcr.io/hemilabs/op-geth:e79d992@sha256:dbe292e013345a8a41c9dc8ee09088853410b17c06ef779258d251f55356c501"
platform: linux/amd64
# XXX does geth need to be fully synced
profiles: ["hemi", "hemi-min", "full"]
depends_on:
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:
- ./testnet-genesis.json:/tmp/testnet-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
- ./entrypointl2.sh:/tmp/entrypointl2.sh
- op-geth_data:/tmp/datadir
- ./rollup.json:/tmp/rollup.json
- ./l2-config.toml:/tmp/l2-config.toml
- tbc_data:/tbcdata
environment:
OP_GETH_L1_RPC: "${GETHL1ENDPOINT:-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:
# yamllint disable-line rule:line-length
image: "alpine@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c" # 3.21.3
profiles: ["hemi", "hemi-min", "full"]
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:
# yamllint disable-line rule:line-length
image: "alpine@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c" # 3.21.3
profiles: ["hemi", "hemi-min", "full"]
volumes:
- tbc_data:/tbcdata
command:
- "chown"
- "-R"
- "65532" # geth user
- "/tbcdata"
# Hemi op-node
op-node:
# yamllint disable-line rule:line-length
image: "ghcr.io/hemilabs/op-node:ea9fe7b@sha256:7110e3c4c61e495ea0a6621d7ec211ceb7e948e25c648b05bd51fcc557ad06bc"
platform: linux/amd64
profiles: ["hemi", "hemi-min", "full"]
depends_on:
op-geth-l2:
condition: "service_healthy"
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
- ./rollup.json:/tmp/rollup.json
environment:
OP_NODE_BSS_WS: "http://bssd:8081/v1/ws"
ports:
- '8547:8547'
networks:
- "localnode"
command:
- "op-node"
- "--ignore-missing-pectra-blob-schedule"
- "--l1=${GETHL1ENDPOINT:-http://geth-l1:8545}"
- "--l1.rpckind=any"
- "--l1.beacon=${PRYSMENDPOINT:-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=1715865630"
- "--override.canyon=1715865630"
- "--override.delta=1715865630"
- "--rpc.addr=0.0.0.0"
- "--rpc.port=8547"
- "--p2p.static=/ip4/34.147.95.117/tcp/9003/p2p/16Uiu2HAmFtpk79F9M1TdC2cnq8c1pJy59yrb5AWeM1qH6d13Fbi2"
- "--p2p.no-discovery"
- "--p2p.ban.peers=false"
- "--p2p.ban.duration=1s"
- "--p2p.ban.threshold=-10000000000"
- "--log.level=info"
- "--syncmode=${OPSYNCMODE:-execution-layer}"
- "--override.pectrablobschedule=1748963425"
- "--override.isthmus=1748963425"
- "--override.holocene=1748963425"
- "--override.granite=1748963425"
- "--override.fjord=1748963425"
deploy:
restart_policy:
condition: "any"
# Prysm
prysm:
# yamllint disable-line rule:line-length
image: "docker.io/prysmaticlabs/prysm-beacon-chain:v5.3.2@sha256:7e2ca890f1b3cbeef69723399767dfbba5c6c660e4e230bc0b4dbe778992e364"
profiles: ["L1", "full"]
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=${GETHL1ENDPOINT:-http://geth-l1:8551}"
- "--sepolia"
- "--jwt-secret=/tmp/jwt/jwt.hex"
- "--checkpoint-sync-url=https://sepolia.beaconstate.info"
- "--genesis-beacon-api-url=https://sepolia.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"
networks:
localnode: {}
volumes:
bitcoin_data: {}
geth_data: {}
prysm_data: {}
psql_data: {}
op-geth_data: {}
electrs_data: {}
tbc_data: {}