Aztec Testnet Prover Setup Guide
This guide will help you set up an Aztec Protocol prover node on the alpha testnet using Docker Compose. Follow these steps carefully to participate in the Aztec prover network and contribute to zero-knowledge proof generation while earning rewards.
Prerequisites
System Requirements
- Operating System: Ubuntu 22.04/24.04 LTS x64 (or any Docker-compatible OS)
- Prover Node: Up to 8 cores, 16GB RAM minimum
- Proving Broker: Up to 4 cores, 16GB RAM minimum
- Proving Agents: Each agent may use up to 16 cores and 128GB RAM
- Storage: 100GB+ available disk space
- Network: Stable, high-quality internet connection with reliable RPC access
- Software: Docker and Docker Compose installed
- Access: Root or sudo privileges
Network Information
Component | Value | Description |
---|---|---|
Network | Aztec Alpha Testnet | Current alpha testing network |
Environment | Alpha Testing | Active testing phase |
Node Type | Prover Node | Generates zero-knowledge proofs |
Deployment | Docker Compose | Containerized deployment |
Version | 1.2.1 | Current stable version |
This guide uses Docker Compose for easy deployment and management. The setup automatically handles the Aztec prover configuration and network connectivity.
Important: Unstable or low-quality RPC connections will significantly impact proving performance. Ensure you have access to reliable Ethereum RPC endpoints before proceeding.
Architecture Overview
The Aztec prover setup consists of three main components:
- Prover Node: Main coordinator that manages proof generation and network connectivity
- Proving Broker: Coordinates and distributes proving tasks among agents
- Proving Agents: Individual workers that generate zero-knowledge proofs
The following commands are executed as root by default. If you are not a root user, please prepend the commands with sudo
.
Update System Packages
sudo -i
# Update package list and install required tools
apt update
apt install -y make git-core libssl-dev pkg-config build-essential protobuf-compiler libudev-dev curl jq wget aria2
Step 1: Prepare Your Environment
Install Docker and Docker Compose
# Update system packages and install prerequisites
apt-get install ca-certificates curl
# Add Docker's official GPG key
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update package list and install Docker
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start and enable Docker service
systemctl start docker
systemctl enable docker
# Verify installation
docker --version
docker compose version
Obtain Required Credentials
Before setting up your prover, you need:
- Prover Publisher Private Key: Ethereum private key for your prover identity
- Prover Publisher Address: Corresponding Ethereum address
- L1 Execution RPC URL: Reliable Ethereum mainnet RPC endpoint
- L1 Consensus RPC URL: Ethereum consensus layer RPC endpoint
Security Note: Keep your private key secure and never share it. Consider using a dedicated wallet for prover operations.
Step 2: (Option 1)Single Machine Deployment
For running all components on a single machine, follow these steps:
Create Project Directory
# Create project directory
mkdir -p /data/aztec-prover && cd /data/aztec-prover
Create Environment Configuration
Create a .env
file with your configuration:
export P2P_IP=YOUR_SERVER_PUBLIC_IP
export L1_EXECUTION_HOST_URL=YOUR_ETHEREUM_RPC_URL
export L1_CONSENSUS_HOST_URL=YOUR_CONSENSUS_RPC_URL
export PROVER_PUBLISHER_PRIVATE_KEY=YOUR_PRIVATE_KEY
export PROVER_PUBLISHER_ADDRESS=YOUR_ETHEREUM_ADDRESS
export PROVER_AGENT_COUNT=1
cat > .env << EOF
# Aztec Prover Configuration
VERSION=1.2.1
PROVER_AGENT_COUNT=${PROVER_AGENT_COUNT}
P2P_IP=${P2P_IP}
L1_EXECUTION_HOST_URL=${L1_EXECUTION_HOST_URL}
L1_CONSENSUS_HOST_URL=${L1_CONSENSUS_HOST_URL}
PROVER_PUBLISHER_PRIVATE_KEY=${PROVER_PUBLISHER_PRIVATE_KEY}
PROVER_PUBLISHER_ADDRESS=${PROVER_PUBLISHER_ADDRESS}
# Port Configuration
PROVER_P2P_PORT=40400
PROVER_RPC_PORT=8080
BROKER_RPC_PORT=8082
EOF
Configuration Parameters:
PROVER_AGENT_COUNT
: Number of proving agents (adjust based on your CPU/memory)P2P_IP
: Your server's public IP address for P2P connectivityL1_EXECUTION_HOST_URL
: High-quality Ethereum RPC endpointL1_CONSENSUS_HOST_URL
: Ethereum consensus layer RPC endpointPROVER_PUBLISHER_PRIVATE_KEY
: Your prover's private key (with 0x prefix)PROVER_PUBLISHER_ADDRESS
: Your prover's Ethereum address
Create Docker Compose Configuration
Create a docker-compose.yaml
file:
cat > docker-compose.yaml << 'EOF'
x-logging: &logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services:
prover-node:
image: aztecprotocol/aztec:${VERSION}
restart: always
depends_on:
broker:
condition: service_started
required: true
environment:
P2P_ENABLED: "true"
DATA_DIRECTORY: /data
P2P_IP: ${P2P_IP}
DATA_STORE_MAP_SIZE_KB: "134217728"
ETHEREUM_HOSTS: ${L1_EXECUTION_HOST_URL}
L1_CONSENSUS_HOST_URLS: ${L1_CONSENSUS_HOST_URL}
LOG_LEVEL: info
PROVER_BROKER_HOST: http://broker:8080
PROVER_PUBLISHER_PRIVATE_KEY: ${PROVER_PUBLISHER_PRIVATE_KEY}
ports:
- "${PROVER_RPC_PORT}:8080"
- "${PROVER_P2P_PORT}:40400"
- "${PROVER_P2P_PORT}:40400/udp"
volumes:
- /data/prover:/data
entrypoint: >
sh -c 'node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --network alpha-testnet --archiver --prover-node'
logging: *logging
agent:
image: aztecprotocol/aztec:${VERSION}
restart: always
entrypoint: >
sh -c 'node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --network alpha-testnet --prover-agent'
environment:
PROVER_AGENT_COUNT: ${PROVER_AGENT_COUNT}
PROVER_AGENT_POLL_INTERVAL_MS: "5000"
PROVER_BROKER_HOST: http://broker:8080
PROVER_ID: ${PROVER_PUBLISHER_ADDRESS}
pull_policy: always
logging: *logging
broker:
image: aztecprotocol/aztec:${VERSION}
restart: always
ports:
- "${BROKER_RPC_PORT}:8080"
environment:
DATA_DIRECTORY: /data
ETHEREUM_HOSTS: ${L1_EXECUTION_HOST_URL}
LOG_LEVEL: info
P2P_IP: ${P2P_IP}
volumes:
- /data/broker:/data
logging: *logging
entrypoint: >
sh -c 'node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --network alpha-testnet --prover-broker'
EOF
Configure Firewall
Open the required P2P port for network connectivity:
# Allow P2P port for prover node
ufw allow 40400 comment "Aztec prover node P2P port"
# Verify firewall rules
ufw status
Step 2: (Option 2)Multi-Machine Deployment
For distributing the workload across multiple machines, you can separate the master node and proving agents.
Master Node Setup
On your master machine (e.g., master-01
), create the configuration without agents:
Master .env
file:
export P2P_IP=YOUR_SERVER_PUBLIC_IP
export L1_EXECUTION_HOST_URL=YOUR_ETHEREUM_RPC_URL
export L1_CONSENSUS_HOST_URL=YOUR_CONSENSUS_RPC_URL
export PROVER_PUBLISHER_PRIVATE_KEY=YOUR_PRIVATE_KEY
export PROVER_PUBLISHER_ADDRESS=YOUR_ETHEREUM_ADDRESS
export PROVER_AGENT_COUNT=0
cat > .env << EOF
# Aztec Prover Configuration
VERSION=1.2.1
PROVER_AGENT_COUNT=${PROVER_AGENT_COUNT}
P2P_IP=${P2P_IP}
L1_EXECUTION_HOST_URL=${L1_EXECUTION_HOST_URL}
L1_CONSENSUS_HOST_URL=${L1_CONSENSUS_HOST_URL}
PROVER_PUBLISHER_PRIVATE_KEY=${PROVER_PUBLISHER_PRIVATE_KEY}
PROVER_PUBLISHER_ADDRESS=${PROVER_PUBLISHER_ADDRESS}
# Port Configuration
PROVER_P2P_PORT=40400
PROVER_RPC_PORT=8080
BROKER_RPC_PORT=8082
EOF
Use the same docker-compose.yaml
as in the single machine setup.
Agent Node Setup
On each agent machine (e.g., agent-01
), create a simplified configuration:
Agent .env
file:
export PROVER_AGENT_COUNT=0
export PROVER_PUBLISHER_ADDRESS=YOUR_ETHEREUM_ADDRESS
export MASTER_SERVER_IP=YOUR_MASTER_SERVER_IP
export BROKER_PORT=YOUR_MASTER_BROKER_PORT
cat > .env << EOF
VERSION=1.2.1
PROVER_AGENT_COUNT=${PROVER_AGENT_COUNT}
PROVER_PUBLISHER_ADDRESS=${PROVER_PUBLISHER_ADDRESS}
BROKER_ADDRESS=${MASTER_SERVER_IP}
BROKER_PORT=${BROKER_PORT}
EOF
Agent docker-compose.yaml
:
cat > docker-compose.yaml << 'EOF'
x-logging: &logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services:
agent:
image: aztecprotocol/aztec:${VERSION}
restart: always
entrypoint: >
sh -c 'node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --network alpha-testnet --prover-agent'
environment:
PROVER_AGENT_COUNT: ${PROVER_AGENT_COUNT}
PROVER_AGENT_POLL_INTERVAL_MS: "5000"
PROVER_BROKER_HOST: http://${BROKER_ADDRESS}:${BROKER_PORT}
PROVER_ID: ${PROVER_PUBLISHER_ADDRESS}
pull_policy: always
logging: *logging
EOF
The agent's PROVER_PUBLISHER_ADDRESS must be consistent with the master's.
Configure Agent Access
On the master node, allow agent machines to connect to the broker:
# Allow specific agent IP to access broker port
ufw allow from AGENT_IP to any port 8082 comment "Agent to broker connection"
Step 4: Deploy and Start
Start the Prover Node
# Start all services
docker compose up -d
# Verify containers are running
docker compose ps
Verify Deployment
# Check container status
docker compose ps
# View logs
docker compose logs -f
# Monitor specific service logs
docker compose logs -f prover-node
docker compose logs -f broker
docker compose logs -f agent
Step 5: Monitor Your Prover
Proving Metrics
Monitor your prover's performance through:
- Container Logs: Track proof generation and completion
- Resource Usage: Monitor CPU and memory utilization
- Network Connectivity: Ensure stable P2P connections
- RPC Quality: Monitor RPC response times and reliability
Step 6: Optimization and Troubleshooting
Performance Optimization
# Increase agent count based on hardware
# Edit .env file
PROVER_AGENT_COUNT=2 # Adjust based on your CPU cores
# Restart to apply changes
docker compose down
docker compose up -d
Resource Tuning
For better performance, you can adjust Docker resource limits:
# Add to each service in docker-compose.yaml
deploy:
resources:
limits:
cpus: '4'
memory: 8g
reservations:
cpus: '2'
memory: 4g
Step 7: Maintenance and Updates
Regular Maintenance
# View logs for issues
docker compose logs --since 24h
# Restart services if needed
docker compose restart
# Clean up old images
docker system prune -f
Updating Prover Version
# Stop current services
docker compose down
# Update version in .env file
sed -i 's/VERSION=1.2.1/VERSION=NEW_VERSION/' .env
# Pull latest images and restart
docker compose pull
docker compose up -d
Earning Rewards
How Prover Rewards Work
- Proof Generation: Earn rewards for successfully generating zero-knowledge proofs
- Network Contribution: Rewards based on proof complexity and network demand
- Uptime Rewards: Consistent operation increases earning potential
- Quality Metrics: Higher performance hardware may earn higher rewards
Maximizing Earnings
- Maintain High Uptime: Keep your prover running consistently
- Optimize Performance: Ensure adequate CPU, memory, and network resources
- Use Quality RPC: Reliable RPC connections improve proving success rate
- Monitor Regularly: Address issues promptly to maintain optimal performance
Support Resources
For help and support with Aztec prover setup:
- Aztec Documentation: docs.aztec.network
- Prover Guide: docs.aztec.network/guides/developer_guides/aztec_sandbox
- Discord Community: discord.gg/aztec
- GitHub: github.com/AztecProtocol/aztec-packages
- Twitter: @aztecnetwork
This setup creates a production-ready Aztec prover node that will contribute to the zero-knowledge proof generation network and earn rewards based on your computational contributions.
Important Notes:
- Keep your private key secure and backed up
- Monitor your prover regularly for optimal performance
- Ensure stable internet connection and quality RPC access for consistent earnings
- Update your prover software regularly for the latest features and security patches