Running it locally
This guide walks through running Aligned's Proof Aggregation Service locally: the Gateway that receives proofs, the Payments Poller that credits deposits, and the Proof Aggregator that aggregates proofs and settles them on-chain.
Dependencies
Ensure you have the following installed:
protoc (required to build the SP1 SDK)
Supported Verifiers
The aggregation mode currently supports the following proving systems:
SP1 - Succinct's zkVM (compressed proofs)
Step-by-Step Setup
Follow these steps to start the aggregation mode locally using the Ethereum package environment.
1. Start the Ethereum Package
Start the local Ethereum network using Kurtosis:
This command spins up a local Ethereum network with all necessary components. To stop it run:
2. Start the Gateway
Start the aggregation mode gateway service:
The gateway handles proof submissions and manages the proof queue. This command also starts the required Docker containers (PostgreSQL) and runs database migrations automatically.
3. Start the Payments Poller
In a separate terminal, start the payments poller:
The payments poller monitors the blockchain for payment events and updates user quotas accordingly.
4. Send a Payment (Deposit)
Deposit funds to get quota for submitting proofs:
This deposits funds using a default test account. For custom deposits, you can use the CLI directly.
5. Submit a Proof
Submit an SP1 proof to the gateway:
This sends a test SP1 Fibonacci proof to the gateway.
6. Start the Proof Aggregator
In a separate terminal, start the proof aggregator:
The proof aggregator fetches pending proofs from the database, aggregates them, and submits the aggregated proof on-chain.
Last updated
Was this helpful?