Skip to content

Commit bb87ea4

Browse files
authored
feat(docs): run prover first draft (#17094)
2 parents 04c1f39 + d781cae commit bb87ea4

File tree

3 files changed

+606
-165
lines changed

3 files changed

+606
-165
lines changed
Lines changed: 202 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 3
3-
title: How to Run a Prover Node
3+
title: How to Run an Aztec Prover
44
description: A comprehensive guide to setting up and running an Aztec Prover node on testnet or mainnet, including hardware requirements, configuration options, and performance optimization tips.
55
keywords:
66
[
@@ -23,66 +23,182 @@ tags:
2323
- infrastructure
2424
---
2525

26-
import { AztecTestnetVersion } from '@site/src/components/Snippets/general_snippets';
27-
2826
## Background
2927

30-
Prover nodes are a critical part of the Aztec network's infrastructure. They generate cryptographic proofs that attest to the correctness of public transactions, ultimately producing a single rollup proof that is submitted to Ethereum.
28+
This guide covers the steps required to run a prover on the Aztec network. Before you begin, you should understand that operating a prover is a resource-intensive role typically undertaken by experienced engineers due to its technical complexity and hardware requirements.
3129

32-
Operating a prover node requires a solid grasp of blockchain protocols, cryptographic systems, DevOps best practices, and high-performance hardware. It’s a resource-intensive role typically undertaken by experienced engineers or specialized teams due to its technical and operational complexity.
30+
Aztec provers are critical infrastructure components that generate cryptographic proofs attesting to transaction correctness, ultimately producing a single rollup proof submitted to Ethereum.
3331

34-
## Prerequisites
32+
The prover consists of three main components:
3533

36-
Before following this guide, make sure you:
34+
1. **Prover node**: Polls L1 for unproven epochs, creates proving jobs, distributes them to the broker, and submits the final rollup proof to the rollup contract.
3735

38-
- Have the `aztec` tool [installed](../../../developers/getting_started/getting_started.md#install-the-sandbox)
39-
- Have sufficient hardware resources for proving operations
40-
- Your confidence level is expected to be around "I'd be able to run a Prover _without_ this guide"
36+
2. **Prover broker**: Manages the job queue, distributing work to agents and collecting results.
4137

42-
## Understanding Prover Architecture
38+
3. **Prover agent(s)**: Executes proof generation jobs in a stateless manner.
4339

44-
The Aztec prover involves three key components: the Prover Node, the Proving Broker, and the Proving Agent.
40+
## Prerequisites
4541

46-
#### Prover Node
42+
The minimum hardware specifications for each of the components is listed below.
4743

48-
The Prover Node is responsible for polling the L1 for unproven epochs and initiating the proof process. When an epoch is ready to be proven, the prover node creates proving jobs and distributes them to the broker. The Prover Node is also responsible for submitting the final rollup proof to the rollup contract.
44+
#### Prover Node
4945

5046
Minimum specifications:
5147

5248
- 2 core / 4 vCPU
5349
- 16 GB RAM
54-
- 1 TB NVMe SDD
50+
- 1 TB NVMe SSD
5551
- 25 Mbps network connection
5652

5753
#### Proving Broker
5854

59-
Manages a queue of proving jobs, distributing them to available agents and forwarding results back to the node.
60-
6155
Minimum specifications:
6256

6357
- 2 core / 4 vCPU
6458
- 16 GB RAM
65-
- 10 GB SDD
59+
- 10 GB SSD
6660

6761
#### Proving Agents
6862

69-
Executes the actual proof jobs. Agents are stateless, fetch work from the broker, and return the results.
70-
7163
Minimum specifications:
7264

7365
- 32 core / 64 vCPU
7466
- 128 GB RAM
75-
- 10 GB SDD
67+
- 10 GB SSD
68+
69+
This guide outlines a basic, non-distributed setup with all components on a single machine. Your hardware must meet or exceed the proving agent requirements listed above.
70+
71+
This guide assumes you are using a standard Linux distribution (Debian or Ubuntu).
72+
73+
### Required Software
74+
75+
- Docker and the Aztec toolchain installed via aztec-up (see the [getting started section](../../index.md))
76+
- Docker Compose ([installation guide](https://docs.docker.com/compose/install/))
77+
- Access to L1 node endpoints (execution and consensus clients). See [Eth Docker's guide](https://ethdocker.com/Usage/QuickStart) if you need to set these up.
78+
79+
## Configure the Prover
80+
81+
Setting up a prover involves configuring three components through environment variables and Docker Compose.
82+
83+
### Setup Steps
84+
85+
1. Configure components via environment variables
86+
2. Enable auto-update and auto-restart functionality
87+
3. Deploy with Docker Compose
88+
89+
First, create the directory structure for prover data storage:
90+
91+
```sh
92+
mkdir -p aztec-prover/prover-node-data aztec-prover/prover-broker-data
93+
cd aztec-prover
94+
touch .env
95+
```
96+
97+
### Component Configuration
98+
99+
Each prover component requires specific environment variables. Configure them as follows:
100+
101+
#### Prover Node
102+
103+
Required environment variables:
104+
105+
- `DATA_DIRECTORY`: the folder where the data of the prover node is stored
106+
- `P2P_IP`: the IP address of this prover node
107+
- `P2P_PORT`: the port that P2P communication happens on
108+
- `ETHEREUM_HOSTS`: the execution RPC endpoints
109+
- `L1_CONSENSUS_HOST_URLS`: the consensus RPC endpoints
110+
- `LOG_LEVEL`: the desired level of logging for the prover node. It defaults to `INFO`
111+
- `PROVER_BROKER_HOST`: the endpoint of the prover broker that this node sends prover jobs to
112+
- `PROVER_PUBLISHER_PRIVATE_KEY`: the private key of the Ethereum EOA used for publishing the proofs to L1
113+
- `AZTEC_PORT`: the port that the prover node API is exposed on
114+
115+
Add the following to your `.env` file (assuming default ports of 8080 for the prover node, and 40400 for p2p connectivity):
116+
117+
```sh
118+
DATA_DIRECTORY=./prover-node-data
119+
P2P_IP=<your external IP address>
120+
P2P_PORT=40400
121+
ETHEREUM_HOSTS=<your L1 execution endpoint, or a comma separated list if you have multiple>
122+
L1_CONSENSUS_HOST_URLS=<your L1 consensus endpoint, or a comma separated list if you have multiple>
123+
LOG_LEVEL=info
124+
PROVER_BROKER_HOST=http://prover-broker:8080
125+
PROVER_PUBLISHER_PRIVATE_KEY=<the private key of the L1 EOA your prover will publish proofs from>
126+
AZTEC_PORT=8080
127+
```
128+
129+
**Note**: The broker URL `http://prover-broker:8080` references the Docker Compose service name defined later.
130+
131+
:::tip
132+
You MUST forward ports for P2P connectivity. Configure your router to forward both UDP and TCP traffic on the port specified by `P2P_PORT` to your local IP address.
133+
134+
To find your public IP address, run: `curl ipv4.icanhazip.com`
135+
:::
136+
137+
#### Prover Broker
138+
139+
Required environment variables:
140+
141+
- `DATA_DIRECTORY`: the folder where the data of the prover broker is stored
142+
- `LOG_LEVEL`: the desired level of logging for the prover broker. It defaults to `INFO`
143+
- `ETHEREUM_HOSTS`: the execution RPC endpoints
144+
- `P2P_IP`: the IP address of this prover broker
145+
- `P2P_PORT`: the port that P2P communication happens on
146+
147+
**Note**: Some variables overlap with the prover node configuration. If running components on separate machines, adjust accordingly. Since `DATA_DIRECTORY` is used by both components, define a separate variable for the broker:
148+
149+
Add to your `.env` file:
150+
151+
```sh
152+
PROVER_BROKER_DATA_DIRECTORY=./prover-broker-data
153+
```
76154
77-
## Setting Up Your Prover
155+
#### Prover Agent
78156
79-
### Using Docker Compose
157+
Required environment variables:
158+
159+
- `PROVER_AGENT_COUNT`: Number of agents to run (each requires ~10GB RAM)
160+
- `PROVER_AGENT_POLL_INTERVAL_MS`: Polling interval for job requests (milliseconds)
161+
- `PROVER_BROKER_HOST`: Broker endpoint for job submission
162+
- `PROVER_ID`: Ethereum address corresponding to `PROVER_PUBLISHER_PRIVATE_KEY`
163+
164+
Add to your `.env` file:
165+
166+
```sh
167+
PROVER_AGENT_COUNT=10
168+
PROVER_AGENT_POLL_INTERVAL_MS=10000
169+
PROVER_BROKER_HOST=http://prover-broker:8080
170+
PROVER_ID=<the address corresponding to the PROVER_PUBLISHER_PRIVATE_KEY you set on the node>
171+
```
172+
173+
### Enable Auto-Update and Auto-Restart
174+
175+
The prover's auto-update functionality is critical for network coordination. This background module enables:
176+
177+
- Configuration updates across all nodes
178+
- Automated image updates via controlled shutdowns
179+
- Rapid hot-fix deployment
180+
- Coordinated resets after governance upgrades
181+
182+
**Important**: Do NOT set `AUTO_UPDATE_URL` or `AUTO_UPDATE` environment variables. These must use their default values for proper operation.
183+
184+
Since Docker Compose doesn't respect pull policies on container restarts, install Watchtower for automatic updates:
185+
186+
```sh
187+
docker run -d \
188+
--name watchtower \
189+
-v /var/run/docker.sock:/var/run/docker.sock \
190+
containrrr/watchtower
191+
```
192+
193+
### Deploy with Docker Compose
194+
195+
Create a `docker-compose.yml` file in your `aztec-prover` directory with the following content:
80196
81197
```yml
82198
name: aztec-prover
83199
services:
84200
prover-node:
85-
image: aztecprotocol/aztec:latest # Always refer to the docs to check that you're using the correct image.
201+
image: aztecprotocol/aztec:latest
86202
command:
87203
- node
88204
- --no-warnings
@@ -93,58 +209,89 @@ services:
93209
- --network
94210
- alpha-testnet
95211
depends_on:
96-
broker:
212+
prover-broker:
97213
condition: service_started
98214
required: true
99215
environment:
100-
# PROVER_COORDINATION_NODE_URL: "http://:8080" # this can point to your own sequencer - using this replaces the need for the prover node to be on the P2P network and uses your sequencer as a sentry node of some sort.
101-
# P2P_ENABLED: "false" # Switch to false if you provide a PROVER_COORDINATION_NODE_URL
102-
DATA_DIRECTORY: /data
103-
DATA_STORE_MAP_SIZE_KB: "134217728"
104-
ETHEREUM_HOSTS: # EL RPC endpoint
105-
L1_CONSENSUS_HOST_URLS: # CL RPC endpoint
106-
LOG_LEVEL: info
107-
PROVER_BROKER_HOST: http://broker:8080
108-
PROVER_PUBLISHER_PRIVATE_KEY: # The node needs to publish proofs to L1. Replace with your private key
216+
DATA_DIRECTORY: /var/lib/data
217+
ETHEREUM_HOSTS: ${ETHEREUM_HOSTS}
218+
L1_CONSENSUS_HOST_URLS: ${L1_CONSENSUS_HOST_URLS}
219+
LOG_LEVEL: ${LOG_LEVEL}
220+
PROVER_BROKER_HOST: ${PROVER_BROKER_HOST}
221+
PROVER_PUBLISHER_PRIVATE_KEY: ${PROVER_PUBLISHER_PRIVATE_KEY}
222+
P2P_PORT: ${P2P_PORT}
223+
AZTEC_PORT: ${AZTEC_PORT}
109224
ports:
110-
- "8080:8080"
111-
- "40400:40400"
112-
- "40400:40400/udp"
225+
- ${AZTEC_PORT}:${AZTEC_PORT}
226+
- ${P2P_PORT}:${P2P_PORT}
227+
- ${P2P_PORT}:${P2P_PORT}/udp
113228
volumes:
114-
- /home/my-node/node:/data # Local directory
229+
- ${DATA_DIRECTORY}:/var/lib/data
115230

116-
agent:
117-
image: aztecprotocol/aztec:latest # Always refer to the docs to check that you're using the correct image.
231+
prover-broker:
232+
image: aztecprotocol/aztec:latest
118233
command:
119234
- node
120235
- --no-warnings
121236
- /usr/src/yarn-project/aztec/dest/bin/index.js
122237
- start
123-
- --prover-agent
238+
- --prover-broker
124239
- --network
125240
- alpha-testnet
126241
environment:
127-
PROVER_AGENT_COUNT: "1"
128-
PROVER_AGENT_POLL_INTERVAL_MS: "10000" # Just to reduce the log spamming if you're using debug logging.
129-
PROVER_BROKER_HOST: http://broker:8080
130-
PROVER_ID: # this should be the address corresponding to the PROVER_PUBLISHER_PRIVATE_KEY you set on the node.
131-
pull_policy: always
132-
restart: unless-stopped
242+
DATA_DIRECTORY: /var/lib/data
243+
ETHEREUM_HOSTS: ${ETHEREUM_HOSTS}
244+
P2P_IP: ${P2P_IP}
245+
LOG_LEVEL: ${LOG_LEVEL}
246+
volumes:
247+
- ${PROVER_BROKER_DATA_DIRECTORY}:/var/lib/data
133248

134-
broker:
135-
image: aztecprotocol/aztec:latest # Always refer to the docs to check that you're using the correct image.
249+
prover-agent:
250+
image: aztecprotocol/aztec:latest
136251
command:
137252
- node
138253
- --no-warnings
139254
- /usr/src/yarn-project/aztec/dest/bin/index.js
140255
- start
141-
- --prover-broker
256+
- --prover-agent
142257
- --network
143258
- alpha-testnet
144259
environment:
145-
DATA_DIRECTORY: /data
146-
ETHEREUM_HOSTS: # Your EL RPC endpoint
147-
LOG_LEVEL: info
148-
volumes:
149-
- /home/my-node/node:/data # Local directory
260+
PROVER_AGENT_COUNT: ${PROVER_AGENT_COUNT}
261+
PROVER_AGENT_POLL_INTERVAL_MS: ${PROVER_AGENT_POLL_INTERVAL_MS}
262+
PROVER_BROKER_HOST: ${PROVER_BROKER_HOST}
263+
PROVER_ID: ${PROVER_ID}
264+
pull_policy: always
265+
restart: unless-stopped
266+
```
267+
268+
**Note**: This configuration includes only essential settings. The `--network alpha-testnet` flag applies network-specific defaults. See the [CLI reference](../../reference/cli_reference.md) for all available options.
269+
270+
Start the prover:
271+
272+
```sh
273+
docker compose up -d
274+
```
275+
276+
## Verification
277+
278+
To verify your prover is running correctly:
279+
280+
1. Check that all services are running:
281+
282+
```sh
283+
docker compose ps
284+
```
285+
286+
2. View logs for each component:
287+
288+
```sh
289+
# Prover node logs
290+
docker compose logs -f prover-node
291+
292+
# Broker logs
293+
docker compose logs -f prover-broker
294+
295+
# Agent logs
296+
docker compose logs -f prover-agent
150297
```

0 commit comments

Comments
 (0)