forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.provernet.yml
167 lines (161 loc) · 6 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
# 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: ghcr.io/foundry-rs/foundry@sha256:29ba6e34379e79c342ec02d437beb7929c9e254261e8032b17e187be71a2609f
command: >
'anvil --block-time 12 --host 0.0.0.0 --chain-id 31337 --port 8545 --silent'
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
ARCHIVER_POLLING_INTERVAL: 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_RETRY_INTERVAL: 10000
SEQ_PUBLISHER_PRIVATE_KEY: "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
VALIDATOR_PRIVATE_KEY: "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
ASSUME_PROVEN_UNTIL_BLOCK_NUMBER: "${ASSUME_PROVEN_UNTIL_BLOCK_NUMBER:-4}"
P2P_ENABLED: false
IS_DEV_NET: true
volumes:
- ./log/aztec-node/:/usr/src/yarn-project/aztec/log:rw
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
interval: 3s
timeout: 30s
start_period: 120s
depends_on:
- ethereum
command:
- "start"
- "--node"
- "--archiver"
- "--sequencer"
# 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: 5
BOT_PRIVATE_TRANSFERS_PER_TX: 1
BOT_PUBLIC_TRANSFERS_PER_TX: 0
BOT_NO_WAIT_FOR_TRANSFERS: true
BOT_NO_START: false
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
IS_DEV_NET: true
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:$AZTEC_PORT/status" ]
interval: 3s
timeout: 30s
start_period: 10s
restart: on-failure:5
command: [ "start", "--bot", "--pxe" ]
# Prover node that listens for unproven blocks on L1, and generates and submits block 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
TX_PROVIDER_NODE_URL: http://aztec-node
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
ARCHIVER_POLLING_INTERVAL: 1000
PROVER_AGENT_ENABLED: false
PROVER_PUBLISHER_PRIVATE_KEY: "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97"
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
ASSUME_PROVEN_UNTIL_BLOCK_NUMBER: "${ASSUME_PROVEN_UNTIL_BLOCK_NUMBER:-4}"
IS_DEV_NET: true
volumes:
- ./log/aztec-prover/:/usr/src/yarn-project/aztec/log:rw
depends_on:
aztec-node:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
interval: 3s
timeout: 30s
start_period: 10s
command: [ "start", "--prover-node", "--archiver" ]
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
AZTEC_NODE_URL: http://aztec-prover
L1_CHAIN_ID: 31337
AZTEC_PORT: 80
PROVER_REAL_PROOFS: "${PROVER_REAL_PROOFS:-false}"
PROVER_TEST_DELAY_MS: "${PROVER_TEST_DELAY_MS:-0}"
PROVER_AGENT_CONCURRENCY: 2
BB_SKIP_CLEANUP: "${BB_SKIP_CLEANUP:-0}" # Persist tmp dirs for debugging
IS_DEV_NET: true
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:
condition: service_healthy
command: [ "start", "--prover" ]
restart: on-failure:5
healthcheck:
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
interval: 3s
timeout: 30s
start_period: 20s
# 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 ./node_modules/.bin/aztec block-number -u http://aztec-bot | head -n2; sleep 10; done'
restart: on-failure:5
stop_grace_period: 1s