Overview
This project implements the first on-chain STARK proof verifier running directly on Solana. It enables Solana programs to verify STARK proofs generated by the Stone Prover — bridging the StarkNet ecosystem with Solana's execution environment.
The Problem
STARK verification is computationally intensive. A full STARK verification involves evaluating a polynomial commitment scheme, checking FRI layers, and verifying a transcript of constraints — all of which require significant compute.
Solana's execution model imposes hard limits on compute units (CUs) per transaction. A naive port of the verifier would exceed these limits by orders of magnitude.
The Solution
The verification protocol was split into multiple stages, each fitting within a single Solana transaction's compute budget. State is persisted between transactions using a program-derived account (PDA), allowing the full verification to complete across multiple sequential transactions.
Key engineering decisions:
- Compute budget analysis — profiled each step of the STARK verification to understand CU consumption
- State machine design — designed a resumable state machine where each step can be checkpointed and continued
- Solana-native constraints — rewrote inner-loop operations to minimize account reads and CPI overhead
Technical Details
The verifier handles proofs produced by Stone Prover in its standard output format. It implements:
- FRI (Fast Reed-Solomon Interactive Oracle Proof) verification
- Merkle commitment verification
- DEEP-ALI (Domain Extension for Eliminating Pretenders) checks
- Constraint evaluation over a prime field
Impact
This was the first working on-chain STARK verifier on Solana, demonstrating cross-chain ZK proof settlement between StarkNet and Solana. It opens the door for applications that need trustless proof verification on Solana backed by StarkNet's proving infrastructure.