-
Notifications
You must be signed in to change notification settings - Fork 69
/
process-compose.yaml
620 lines (589 loc) · 23.4 KB
/
process-compose.yaml
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
version: "3"
environment:
- ESPRESSO_SEQUENCER_CDN_ENDPOINT=127.0.0.1:$ESPRESSO_CDN_SERVER_PORT
- ESPRESSO_SEQUENCER_ORCHESTRATOR_URL=http://localhost:$ESPRESSO_ORCHESTRATOR_PORT
- ESPRESSO_SEQUENCER_URL=http://localhost:$ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_L1_PROVIDER=http://localhost:$ESPRESSO_SEQUENCER_L1_PORT
- ESPRESSO_SEQUENCER_GENESIS_FILE=data/genesis/demo.toml
- ESPRESSO_BUILDER_GENESIS_FILE=data/genesis/demo.toml
- ESPRESSO_STATE_RELAY_SERVER_URL=http://localhost:$ESPRESSO_STATE_RELAY_SERVER_PORT
- QUERY_SERVICE_URI=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT/v0/
- NODE_VALIDATOR_URI=ws://localhost:$ESPRESSO_NODE_VALIDATOR_PORT/v0/
processes:
# Cheating a bit here but since we don't usually have to debug go-ethereum
# it's using the docker compose service which is a bit easier.
demo-l1-network:
command: docker compose up demo-l1-network --force-recreate --renew-anon-volumes
readiness_probe:
exec:
command: "[ $(docker inspect -f '{{.State.Health.Status}}' espresso-sequencer-demo-l1-network-1) = 'healthy' ]"
initial_delay_seconds: 5
period_seconds: 6
timeout_seconds: 5
success_threshold: 1
failure_threshold: 20
deploy-sequencer-contracts:
# The contract addresses are implicitly inherited from .env. We need to unset these or else the
# script will think they're already deployed.
command:
unset ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS && deploy --only
fee-contract
namespace: setup
depends_on:
demo-l1-network:
condition: process_healthy
deploy-prover-contracts:
# The contract addresses are implicitly inherited from .env. We need to unset these or else the
# script will think they're already deployed.
command:
unset ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS && deploy
--use-mock-contract --only light-client
namespace: setup
depends_on:
demo-l1-network:
condition: process_healthy
sequencer0:
condition: process_healthy
# Make sure this doesn't start until the other contracts have been deployed, since we use the same mnemonic.
deploy-sequencer-contracts:
condition: process_completed
fund-builder:
command: espresso-bridge deposit
namespace: setup
environment:
- L1_PROVIDER=http://localhost:$ESPRESSO_SEQUENCER_L1_PORT
- ESPRESSO_PROVIDER=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT
- CONTRACT_ADDRESS=0xa15bb66138824a1c7167f5e85b957d04dd34e468
- MNEMONIC=$ESPRESSO_BUILDER_ETH_MNEMONIC
- ACCOUNT_INDEX=$ESPRESSO_BUILDER_ETH_ACCOUNT_INDEX
- AMOUNT=1000000000000000000
- CONFIRMATIONS=1
depends_on:
deploy-sequencer-contracts:
condition: process_completed
sequencer1:
condition: process_healthy
orchestrator:
command: orchestrator
environment:
- ESPRESSO_ORCHESTRATOR_BUILDER_URLS=http://localhost:$ESPRESSO_BUILDER_SERVER_PORT
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_ORCHESTRATOR_PORT
path: /healthcheck
initial_delay_seconds: 0
period_seconds: 1
timeout_seconds: 1
success_threshold: 1
failure_threshold: 100
availability:
restart: "exit_on_failure"
state-relay-server:
command: state-relay-server
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_STATE_RELAY_SERVER_PORT
path: /healthcheck
prover-service:
command: state-prover -d
environment:
- MNEMONIC=$ESPRESSO_SEQUENCER_ETH_MNEMONIC
- RAYON_NUM_THREADS=$PROVER_RAYON_NUM_THREADS
depends_on:
sequencer0:
condition: process_healthy
state-relay-server:
condition: process_healthy
demo-l1-network:
condition: process_healthy
deploy-prover-contracts:
condition: process_completed
sequencer0:
command: sequencer -- storage-sql -- http -- query -- catchup -- status -- submit -- hotshot-events -- config
environment:
- ESPRESSO_SEQUENCER_API_PORT=$ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_LIBP2P_BIND_ADDRESS=0.0.0.0:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_0
- ESPRESSO_SEQUENCER_LIBP2P_ADVERTISE_ADDRESS=localhost:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_0
- ESPRESSO_SEQUENCER_API_PEERS=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT
- ESPRESSO_SEQUENCER_POSTGRES_HOST=localhost
- ESPRESSO_SEQUENCER_POSTGRES_PORT=$ESPRESSO_SEQUENCER0_DB_PORT
- ESPRESSO_SEQUENCER_POSTGRES_USER=root
- ESPRESSO_SEQUENCER_POSTGRES_PASSWORD=password
- ESPRESSO_SEQUENCER_POSTGRES_DATABASE=sequencer
- ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY=$ESPRESSO_DEMO_SEQUENCER_STAKING_PRIVATE_KEY_0
- ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY=$ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_0
- ESPRESSO_SEQUENCER_IS_DA=true
- ESPRESSO_SEQUENCER_IDENTITY_NODE_NAME=sequencer0
- ESPRESSO_SEQUENCER_IDENTITY_WALLET_ADDRESS=0x0000000000000000000000000000000000000000
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_NAME=Espresso Systems
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_WEBSITE=https://www.espressosys.com/
- ESPRESSO_SEQUENCER_IDENTITY_OPERATING_SYSTEM=Linux 5.15.153.1
- ESPRESSO_SEQUENCER_IDENTITY_NETWORK_TYPE=local
- ESPRESSO_SEQUENCER_IDENTITY_COUNTRY_CODE=US
- ESPRESSO_SEQUENCER_IDENTITY_LATITUDE=40.7128
- ESPRESSO_SEQUENCER_IDENTITY_LONGITUDE=-74.0060
- ESPRESSO_SEQUENCER_PUBLIC_API_URL=http://localhost:$ESPRESSO_SEQUENCER_API_PORT/
depends_on:
orchestrator:
condition: process_healthy
demo-l1-network:
condition: process_healthy
state-relay-server:
condition: process_healthy
sequencer-db-0:
condition: process_healthy
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
marshal_0:
condition: process_healthy
deploy-sequencer-contracts:
condition: process_completed
availability:
exit_on_skipped: true
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER_API_PORT
path: /healthcheck
failure_threshold: 100
sequencer1:
command: sequencer -- storage-sql -- http -- query -- catchup -- status -- state -- explorer
environment:
- ESPRESSO_SEQUENCER_API_PORT=$ESPRESSO_SEQUENCER1_API_PORT
- ESPRESSO_SEQUENCER_LIBP2P_BIND_ADDRESS=0.0.0.0:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_1
- ESPRESSO_SEQUENCER_LIBP2P_ADVERTISE_ADDRESS=localhost:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_1
- ESPRESSO_SEQUENCER_API_PEERS=http://localhost:$ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER2_API_PORT
- ESPRESSO_SEQUENCER_POSTGRES_HOST=localhost
- ESPRESSO_SEQUENCER_POSTGRES_PORT=$ESPRESSO_SEQUENCER1_DB_PORT
- ESPRESSO_SEQUENCER_POSTGRES_USER=root
- ESPRESSO_SEQUENCER_POSTGRES_PASSWORD=password
- ESPRESSO_SEQUENCER_POSTGRES_DATABASE=sequencer
- ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY=$ESPRESSO_DEMO_SEQUENCER_STAKING_PRIVATE_KEY_1
- ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY=$ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_1
- ESPRESSO_SEQUENCER_IS_DA=true
- ESPRESSO_SEQUENCER_IDENTITY_NODE_NAME=sequencer1
- ESPRESSO_SEQUENCER_IDENTITY_WALLET_ADDRESS=0x0000000000000000000000000000000000000001
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_NAME=Espresso Systems
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_WEBSITE=https://www.espressosys.com/
- ESPRESSO_SEQUENCER_IDENTITY_OPERATING_SYSTEM=Darwin 23.5.0
- ESPRESSO_SEQUENCER_IDENTITY_NETWORK_TYPE=local
- ESPRESSO_SEQUENCER_IDENTITY_COUNTRY_CODE=GR
- ESPRESSO_SEQUENCER_IDENTITY_LATITUDE=39.0742
- ESPRESSO_SEQUENCER_IDENTITY_LONGITUDE=21.8243
- ESPRESSO_SEQUENCER_PUBLIC_API_URL=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT/
- ESPRESSO_SEQUENCER_L1_PROVIDER=ws://localhost:$ESPRESSO_SEQUENCER_L1_WS_PORT
depends_on:
orchestrator:
condition: process_healthy
demo-l1-network:
condition: process_healthy
state-relay-server:
condition: process_healthy
sequencer-db-1:
condition: process_healthy
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
marshal_0:
condition: process_healthy
deploy-sequencer-contracts:
condition: process_completed
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER1_API_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
sequencer2:
command: sequencer -- http -- catchup -- status
environment:
- ESPRESSO_SEQUENCER_API_PORT=$ESPRESSO_SEQUENCER2_API_PORT
- ESPRESSO_SEQUENCER_LIBP2P_BIND_ADDRESS=0.0.0.0:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_2
- ESPRESSO_SEQUENCER_LIBP2P_ADVERTISE_ADDRESS=localhost:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_2
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER3_API_PORT
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq2
- ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY=$ESPRESSO_DEMO_SEQUENCER_STAKING_PRIVATE_KEY_2
- ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY=$ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_2
- ESPRESSO_SEQUENCER_IS_DA=true
- ESPRESSO_SEQUENCER_IDENTITY_NODE_NAME=sequencer2
- ESPRESSO_SEQUENCER_IDENTITY_WALLET_ADDRESS=0x0000000000000000000000000000000000000002
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_NAME=Espresso Systems
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_WEBSITE=https://www.espressosys.com/
- ESPRESSO_SEQUENCER_IDENTITY_OPERATING_SYSTEM=Darwin 23.5.0
- ESPRESSO_SEQUENCER_IDENTITY_NETWORK_TYPE=local
- ESPRESSO_SEQUENCER_IDENTITY_COUNTRY_CODE=CN
- ESPRESSO_SEQUENCER_IDENTITY_LATITUDE=35.8617
- ESPRESSO_SEQUENCER_IDENTITY_LONGITUDE=104.1954
- ESPRESSO_SEQUENCER_PUBLIC_API_URL=http://localhost:$ESPRESSO_SEQUENCER2_API_PORT/
depends_on:
orchestrator:
condition: process_healthy
demo-l1-network:
condition: process_healthy
state-relay-server:
condition: process_healthy
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
marshal_0:
condition: process_healthy
deploy-sequencer-contracts:
condition: process_completed
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER2_API_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
sequencer3:
command: sequencer -- http -- catchup -- status
environment:
- ESPRESSO_SEQUENCER_API_PORT=$ESPRESSO_SEQUENCER3_API_PORT
- ESPRESSO_SEQUENCER_LIBP2P_BIND_ADDRESS=0.0.0.0:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_3
- ESPRESSO_SEQUENCER_LIBP2P_ADVERTISE_ADDRESS=localhost:$ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_3
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER4_API_PORT
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq3
- ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY=$ESPRESSO_DEMO_SEQUENCER_STAKING_PRIVATE_KEY_3
- ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY=$ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_3
- ESPRESSO_SEQUENCER_IDENTITY_NODE_NAME=sequencer3
- ESPRESSO_SEQUENCER_IDENTITY_WALLET_ADDRESS=0x0000000000000000000000000000000000000003
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_NAME=Espresso Systems
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_WEBSITE=https://www.espressosys.com/
- ESPRESSO_SEQUENCER_IDENTITY_OPERATING_SYSTEM=Microsoft Windows NT 10.0.22621.0
- ESPRESSO_SEQUENCER_IDENTITY_E=espresso-sequencer@0.1.0
- ESPRESSO_SEQUENCER_IDENTITY_NETWORK_TYPE=local
- ESPRESSO_SEQUENCER_IDENTITY_COUNTRY_CODE=CN
- ESPRESSO_SEQUENCER_IDENTITY_LATITUDE=35.8617
- ESPRESSO_SEQUENCER_IDENTITY_LONGITUDE=104.1954
- ESPRESSO_SEQUENCER_PUBLIC_API_URL=http://localhost:$ESPRESSO_SEQUENCER3_API_PORT/
- ESPRESSO_SEQUENCER_L1_PROVIDER=ws://localhost:$ESPRESSO_SEQUENCER_L1_WS_PORT
depends_on:
orchestrator:
condition: process_healthy
demo-l1-network:
condition: process_healthy
state-relay-server:
condition: process_healthy
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
marshal_0:
condition: process_healthy
deploy-sequencer-contracts:
condition: process_completed
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER3_API_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
sequencer4:
command: sequencer -- http -- catchup -- status
environment:
- ESPRESSO_SEQUENCER_API_PORT=$ESPRESSO_SEQUENCER4_API_PORT
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_STORAGE_PATH=$ESPRESSO_BASE_STORAGE_PATH/seq4
- ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY=$ESPRESSO_DEMO_SEQUENCER_STAKING_PRIVATE_KEY_4
- ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY=$ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_4
- ESPRESSO_SEQUENCER_IDENTITY_NODE_NAME=sequencer4
- ESPRESSO_SEQUENCER_IDENTITY_WALLET_ADDRESS=0x0000000000000000000000000000000000000004
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_NAME=Espresso Systems
- ESPRESSO_SEQUENCER_IDENTITY_COMPANY_WEBSITE=https://www.espressosys.com/
- ESPRESSO_SEQUENCER_IDENTITY_OPERATING_SYSTEM=TempleOS 5.03
- ESPRESSO_SEQUENCER_IDENTITY_NETWORK_TYPE=local
- ESPRESSO_SEQUENCER_IDENTITY_COUNTRY_CODE=AU
- ESPRESSO_SEQUENCER_IDENTITY_LATITUDE=-25.2744
- ESPRESSO_SEQUENCER_IDENTITY_LONGITUDE=133.7751
- ESPRESSO_SEQUENCER_PUBLIC_API_URL=http://localhost:$ESPRESSO_SEQUENCER4_API_PORT/
depends_on:
orchestrator:
condition: process_healthy
demo-l1-network:
condition: process_healthy
state-relay-server:
condition: process_healthy
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
marshal_0:
condition: process_healthy
deploy-sequencer-contracts:
condition: process_completed
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER4_API_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
node_validator:
command: RUST_LOG=debug node-metrics --
environment:
- ESPRESSO_NODE_VALIDATOR_STAKE_TABLE_SOURCE_BASE_URL=http://localhost:$ESPRESSO_SEQUENCER_API_PORT/v0/
- ESPRESSO_NODE_VALIDATOR_LEAF_STREAM_SOURCE_BASE_URL=http://localhost:$ESPRESSO_SEQUENCER_API_PORT/v0/
- ESPRESSO_NODE_VALIDATOR_INITIAL_NODE_PUBLIC_BASE_URLS=http://localhost:$ESPRESSO_SEQUENCER_API_PORT/,http://localhost:$ESPRESSO_SEQUENCER1_API_PORT/,http://localhost:$ESPRESSO_SEQUENCER2_API_PORT/,http://localhost:$ESPRESSO_SEQUENCER3_API_PORT/,http://localhost:$ESPRESSO_SEQUENCER4_API_PORT/
depends_on:
broker_0:
condition: process_healthy
broker_1:
condition: process_healthy
sequencer0:
condition: process_healthy
sequencer1:
condition: process_healthy
sequencer2:
condition: process_healthy
sequencer3:
condition: process_healthy
sequencer4:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SEQUENCER1_API_PORT
path: /healthcheck
failure_threshold: 100
# We use KeyDB (a Redis variant) to maintain consistency between
# different parts of the CDN
# Cheating a bit here too, but KeyDB is not available as a Nix package.
# Could do local (SQLite) discovery, but removes some of the spirit
# from the local demo.
keydb:
command: docker run --rm -p 0.0.0.0:6379:6379 eqalpha/keydb --requirepass changeme!
readiness_probe:
exec:
command: nc -zv localhost 6379
period_seconds: 5
timeout_seconds: 4
failure_threshold: 20
# The CDN system's main entry point; where users contact first.
marshal_0:
command: cdn-marshal -d "redis://:changeme!@localhost:6379" -b $ESPRESSO_CDN_SERVER_PORT -m 127.0.0.1:9093
depends_on:
keydb:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: 127.0.0.1
port: 9093
path: /metrics
failure_threshold: 100
# A broker is the main message-routing unit of the CDN
broker_0:
command: RUST_LOG=debug cdn-broker -d "redis://:changeme!@localhost:6379" -m 127.0.0.1:9091
depends_on:
keydb:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: 127.0.0.1
port: 9091
path: /metrics
failure_threshold: 100
# A broker is the main message-routing unit of the CDN
# as we're running a local demo, we need to operate on different ports
broker_1:
command:
RUST_LOG=debug cdn-broker --public-bind-endpoint 0.0.0.0:1740 --public-advertise-endpoint local_ip:1740
--private-bind-endpoint 0.0.0.0:1741 --private-advertise-endpoint local_ip:1741 -d
"redis://:changeme!@localhost:6379" -m 127.0.0.1:9092
depends_on:
keydb:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: 127.0.0.1
port: 9092
path: /metrics
failure_threshold: 100
cdn-whitelist:
command: cdn-whitelist -d redis://:changeme!@localhost:6379 -o http://localhost:$ESPRESSO_ORCHESTRATOR_PORT
namespace: setup
depends_on:
orchestrator:
condition: process_healthy
keydb:
condition: process_healthy
submit-transactions-public:
command: submit-transactions
environment:
- ESPRESSO_SUBMIT_TRANSACTIONS_PORT=$ESPRESSO_SUBMIT_TRANSACTIONS_PUBLIC_PORT
depends_on:
sequencer0:
condition: process_healthy
# We don't directly depend on the builder, but transactions will not be finalized until it has
# started, so there is no point in starting before then.
permissionless-builder:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SUBMIT_TRANSACTIONS_PUBLIC_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
submit-transactions-private:
command: submit-transactions
environment:
- ESPRESSO_SUBMIT_TRANSACTIONS_PORT=$ESPRESSO_SUBMIT_TRANSACTIONS_PRIVATE_PORT
- ESPRESSO_SUBMIT_TRANSACTIONS_SUBMIT_URL=http://localhost:$ESPRESSO_BUILDER_SERVER_PORT/txn_submit
depends_on:
sequencer0:
condition: process_healthy
permissionless-builder:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_SUBMIT_TRANSACTIONS_PRIVATE_PORT
path: /healthcheck
failure_threshold: 100
availability:
exit_on_skipped: true
permissionless-builder:
command: permissionless-builder
ports:
- "$ESPRESSO_BUILDER_SERVER_PORT:$ESPRESSO_BUILDER_SERVER_PORT"
environment:
- ESPRESSO_SEQUENCER_STATE_PEERS=http://localhost:$ESPRESSO_SEQUENCER_API_PORT
- ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_URL=http://localhost:$ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT
- ESPRESSO_BUILDER_GENESIS_FILE
depends_on:
sequencer0:
condition: process_healthy
fund-builder:
condition: process_completed
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_BUILDER_SERVER_PORT
path: /healthcheck
failure_threshold: 100
availability:
restart: "exit_on_failure"
nasty-client:
command: nasty-client
environment:
# Point the nasty client at sequencer1, the only one running the state API.
- ESPRESSO_SEQUENCER_URL=http://localhost:$ESPRESSO_SEQUENCER1_API_PORT
depends_on:
sequencer0:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_NASTY_CLIENT_PORT
path: /healthcheck
failure_threshold: 100
marketplace-solver:
command: marketplace-solver
environment:
- ESPRESSO_MARKETPLACE_SOLVER_API_PORT=$ESPRESSO_MARKETPLACE_SOLVER_API_PORT
- ESPRESSO_SEQUENCER_HOTSHOT_EVENT_API_URL=http://localhost:$ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT
- MARKETPLACE_SOLVER_POSTGRES_HOST=localhost
- MARKETPLACE_SOLVER_POSTGRES_USER=root
- MARKETPLACE_SOLVER_POSTGRES_PASSWORD=password
- MARKETPLACE_SOLVER_POSTGRES_DATABASE_NAME=solver
depends_on:
sequencer0:
condition: process_healthy
solver-db:
condition: process_healthy
readiness_probe:
http_get:
scheme: http
host: localhost
port: $ESPRESSO_MARKETPLACE_SOLVER_API_PORT
path: /healthcheck
failure_threshold: 100
sequencer-db-0:
command:
docker run -e POSTGRES_PASSWORD -e POSTGRES_USER -e POSTGRES_DB -p $ESPRESSO_SEQUENCER0_DB_PORT:5432 postgres
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=root
- POSTGRES_DB=sequencer
readiness_probe:
exec:
command: pg_isready -h localhost -p $ESPRESSO_SEQUENCER0_DB_PORT
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 4
# Postgres can be falsely "ready" once before running init scripts.
# See https://github.com/docker-library/postgres/issues/146 for discussion.
success_threshold: 2
failure_threshold: 20
sequencer-db-1:
command:
docker run -e POSTGRES_PASSWORD -e POSTGRES_USER -e POSTGRES_DB -p $ESPRESSO_SEQUENCER1_DB_PORT:5432 postgres
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=root
- POSTGRES_DB=sequencer
readiness_probe:
exec:
command: pg_isready -h localhost -p $ESPRESSO_SEQUENCER1_DB_PORT
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 4
# Postgres can be falsely "ready" once before running init scripts.
# See https://github.com/docker-library/postgres/issues/146 for discussion.
success_threshold: 2
failure_threshold: 20
solver-db:
command:
docker run -e POSTGRES_PASSWORD -e POSTGRES_USER -e POSTGRES_DB -p $MARKETPLACE_SOLVER_POSTGRES_PORT:5432 postgres
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=root
- POSTGRES_DB=solver
readiness_probe:
exec:
command: pg_isready -h localhost -p $MARKETPLACE_SOLVER_POSTGRES_PORT
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 4
# Postgres can be falsely "ready" once before running init scripts.
# See https://github.com/docker-library/postgres/issues/146 for discussion.
success_threshold: 2
failure_threshold: 20
block-explorer:
command:
docker run --rm -p $ESPRESSO_BLOCK_EXPLORER_PORT:3000 -e QUERY_SERVICE_URI -e NODE_VALIDATOR_URI
ghcr.io/espressosystems/espresso-block-explorer:main
depends_on:
sequencer1:
condition: process_healthy