-
Notifications
You must be signed in to change notification settings - Fork 243
/
docker-compose.provernet.yml
202 lines (194 loc) · 6.99 KB
/
docker-compose.provernet.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
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
# Template for simulating a provernet-like setup using docker-compose, currently unused except for development or testing.
# Spins up an aztec node with a sequencer, a transactions bot, and a prover node with a separate prover agent.
# Logs latest block numbers every 10 seconds.
name: aztec-provernet
services:
# Anvil instance that serves as L1
ethereum:
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
entrypoint: 'anvil --block-time 12 --silent -p 8545 --host 0.0.0.0 --chain-id 31337'
ports:
- 8545:8545
# Single Aztec node with a sequencer for building and publishing unproven blocks to L1
aztec-node:
image: "aztecprotocol/${IMAGE:-aztec:master}"
ports:
- "8080:80"
environment:
LOG_LEVEL: info
ETHEREUM_HOST: http://ethereum:8545
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
DEPLOY_AZTEC_CONTRACTS: 1
DEPLOY_AZTEC_CONTRACTS_SALT: 1
ARCHIVER_POLLING_INTERVAL_MS: 1000
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 1000
SEQ_VIEM_POLLING_INTERVAL_MS: 1000
SEQ_MAX_TX_PER_BLOCK: 4
SEQ_MIN_TX_PER_BLOCK: 1
SEQ_MAX_SECONDS_BETWEEN_BLOCKS: 3600
SEQ_MIN_SECONDS_BETWEEN_BLOCKS: 0
SEQ_PUBLISHER_PRIVATE_KEY: "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
VALIDATOR_PRIVATE_KEY: "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
P2P_ENABLED: false
volumes:
- ./log/aztec-node/:/usr/src/yarn-project/aztec/log:rw
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:80/status" ]
interval: 3s
timeout: 30s
start_period: 120s
depends_on:
- ethereum
command:
- "start"
- "--node"
- "--archiver"
- "--sequencer"
# Prover node that listens for unproven blocks on L1, generates quotes, and submits epoch proofs
# Requires one or more agents to be connected for actually generating proofs
# Fetches individual tx proofs from the aztec-node directly
aztec-prover:
image: "aztecprotocol/${IMAGE:-aztec:master}"
ports:
- "8083:80"
environment:
LOG_LEVEL: verbose
ETHEREUM_HOST: http://ethereum:8545
PROVER_COORDINATION_NODE_URL: http://aztec-node
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
ARCHIVER_POLLING_INTERVAL_MS: 1000
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 1000
PROVER_VIEM_POLLING_INTERVAL_MS: 1000
PROVER_AGENT_COUNT: 0
PROVER_BROKER_HOST: http://aztec-prover-broker
PROVER_PUBLISHER_PRIVATE_KEY: "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97"
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
PROVER_MINIMUM_ESCROW_AMOUNT: 1000000000
PROVER_TARGET_ESCROW_AMOUNT: 2000000000
PROVER_ID: "${PROVER_ID:-0x01}"
volumes:
- ./log/aztec-prover/:/usr/src/yarn-project/aztec/log:rw
depends_on:
aztec-node:
condition: service_healthy
aztec-prover-broker:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:80/status" ]
interval: 3s
timeout: 30s
start_period: 120s
command: [ "start", "--prover-node", "--archiver" ]
restart: on-failure:5
aztec-prover-broker:
image: "aztecprotocol/${IMAGE:-aztec:master}"
ports:
- "8084:80"
environment:
LOG_LEVEL: verbose
AZTEC_PORT: 80
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:80/status" ]
interval: 3s
timeout: 30s
start_period: 120s
command: [ "start", "--prover-broker" ]
restart: on-failure:5
# Prover agent that connects to the prover-node for fetching proving jobs and executing them
# Multiple instances can be run, or PROVER_AGENT_CONCURRENCY can be increased to run multiple workers in a single instance
aztec-prover-agent:
image: "aztecprotocol/${IMAGE:-aztec:master}"
ports:
- "8090:80"
environment:
LOG_LEVEL: verbose
ETHEREUM_HOST: http://ethereum:8545
PROVER_BROKER_HOST: http://aztec-prover-broker
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
PROVER_TEST_DELAY_MS: "${PROVER_TEST_DELAY_MS:-0}"
BB_SKIP_CLEANUP: "${BB_SKIP_CLEANUP:-0}" # Persist tmp dirs for debugging
PROVER_ID: "${PROVER_ID:-0x01}"
volumes:
- ./log/aztec-prover-agent/:/usr/src/yarn-project/aztec/log:rw
- ./cache/bb-crs/:/root/.bb-crs:rw
- ./workdir/bb-prover/:/usr/src/yarn-project/bb:rw
depends_on:
aztec-prover-broker:
condition: service_healthy
command: [ "start", "--prover-agent" ]
deploy:
mode: replicated
replicas: 2
restart: on-failure:5
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:80/status" ]
interval: 3s
timeout: 30s
start_period: 20s
# Bot for keeping a steady flow of txs into the network
# Requires bootstrapping to be completed successfully
aztec-bot:
image: "aztecprotocol/${IMAGE:-aztec:master}"
ports:
- "8082:80"
environment:
LOG_LEVEL: info
ETHEREUM_HOST: http://ethereum:8545
AZTEC_NODE_URL: http://aztec-node
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
BOT_PRIVATE_KEY: 0xcafe
BOT_TX_INTERVAL_SECONDS: 300
BOT_PRIVATE_TRANSFERS_PER_TX: 1
BOT_PUBLIC_TRANSFERS_PER_TX: 0
BOT_NO_WAIT_FOR_TRANSFERS: true
BOT_NO_START: false
BOT_MAX_CONSECUTIVE_ERRORS: 3
BOT_STOP_WHEN_UNHEALTHY: true
PXE_PROVER_ENABLED: "${PROVER_REAL_PROOFS:-false}"
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
BB_SKIP_CLEANUP: "${BB_SKIP_CLEANUP:-0}" # Persist tmp dirs for debugging
volumes:
- ./log/aztec-bot/:/usr/src/yarn-project/aztec/log:rw
- ./cache/bb-crs/:/root/.bb-crs:rw
- ./workdir/bb-bot/:/usr/src/yarn-project/bb:rw
depends_on:
aztec-node:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:80/status" ]
interval: 3s
timeout: 30s
start_period: 90s
restart: on-failure:5
command: [ "start", "--bot", "--pxe" ]
# Simple watcher that logs the latest block numbers every few seconds using the CLI and the bot's PXE
aztec-block-watcher:
image: "aztecprotocol/${IMAGE:-aztec:master}"
environment:
ETHEREUM_HOST: http://ethereum:8545
L1_CHAIN_ID: 31337
depends_on:
aztec-bot:
condition: service_healthy
entrypoint: '/bin/bash -c'
command: >
'while true; do node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js block-number -u http://aztec-bot | head -n2; sleep 10; done'
restart: on-failure:5
stop_grace_period: 1s
# Run a CLI command against the bot's PXE or L1
# docker compose run --rm aztec-cli block-number
aztec-cli:
image: "aztecprotocol/${IMAGE:-aztec:master}"
environment:
ETHEREUM_HOST: http://ethereum:8545
PXE_URL: http://aztec-bot
L1_CHAIN_ID: 31337
stdin_open: true
tty: true
scale: 0