An extensible, recursive, ZK light client operator service that currently supports both Ethereum (via Helios) and Tendermint chains. This service generates and verifies zero-knowledge proofs of light client state transitions, enabling trustless verification of blockchain state.
- Helios Documentation - Documentation for the Ethereum light client implementation
- Tendermint Documentation - Documentation for the Tendermint light client implementation
- Support for both Ethereum and Tendermint light clients
- Recursive proof verification
- State persistence
- REST API for proof retrieval
- Configurable trusted checkpoints
- Automatic proof generation and verification
The project provides several Makefile commands for different use cases:
One-time setup command - Generates the ZK circuits and ELF files needed for proof generation and verification. This command:
- Deletes existing state
- Generates recursive circuits for both Helios and Tendermint
- Dumps ELF files to
elfs/variable/
- Generates wrapper circuits
- Dumps final ELF files
Note
This command should only be run once per deployment. Running it on different machines or after circuit code modifications will produce new ELF files that won't match previously generated ones, potentially leading to invalid proofs.
Fresh start from hardcoded checkpoint - Starts the service with a clean slate. This command:
- Deletes the database and all existing state
- Starts proving from the first checkpoint all the way to the current head
- Initializes new state based on the trusted checkpoints in
crates/service/src/checkpoints.rs
Warning
This command will prune the database and restart proof generation from the beginning. Use this only when you want to completely reset the service state.
Resume prover - Continues the service from where it left off. This command:
- Loads existing state from the database
- Continues proof generation from the last processed checkpoint
- Preserves all previously generated proofs and state
💡 Recommended: Use this command for normal operation and after service restarts.
- Set the environment variable
CLIENT_BACKEND
to either"HELIOS"
or"TENDERMINT"
to choose which light client to use - Follow the initialization instructions in the respective documentation:
- Specify the trusted checkpoint for your chosen light client in
crates/service/src/checkpoints.rs
:- For Helios: Update
HELIOS_TRUSTED_SLOT
with the desired slot number - For Tendermint: Update
TENDERMINT_TRUSTED_HEIGHT
andTENDERMINT_TRUSTED_ROOT
with the desired height and root hash
- For Helios: Update
- First time setup: Run
make build-circuits
to generate the required circuits and ELF files - Start the service:
- For fresh start:
make run
(⚠️ prunes database) - For normal operation:
make continue
- For fresh start:
The service consists of several key components:
- Service: Main orchestrator that manages proof generation and verification
- Preprocessor: Prepares inputs for the light client programs
- Recursion Circuit: Verifies light client proofs and maintains proof chain
- Wrapper Circuit: Verifies recursive proofs and commits outputs