protocol.simple_pilout#
Multi-AIR proving coordination for the Simple pilout.
The Simple pilout contains five AIRs: SimpleLeft, SimpleRight, U8Air, U16Air, SpecifiedRanges. C++ proofman proves all five simultaneously and derives the global_challenge by element-wise accumulating each AIR’s Poseidon2 lattice contribution before any AIR advances to Stage 2.
prove_simple_pilout() implements the full protocol, producing byte-identical proofs to C++ proofman.
Usage:
Attributes#
Classes#
All data needed to commit Stage 1 for one AIR in the Simple pilout. |
|
Stage-1 results for all five Simple AIRs. |
|
All data needed to fully prove one AIR in the Simple pilout. |
Functions#
|
Prove all Simple pilout AIRs with the shared multi-AIR global challenge. |
|
Commit Stage 1 for all Simple pilout AIRs and derive the multi-AIR global challenge. |
Module Contents#
- class protocol.simple_pilout.AIRStage1Data[source]#
All data needed to commit Stage 1 for one AIR in the Simple pilout.
- air_config: protocol.air_config.AirConfig[source]#
- class protocol.simple_pilout.SimplePiloutStage1Result[source]#
Stage-1 results for all five Simple AIRs.
- class protocol.simple_pilout.AIRProveData[source]#
All data needed to fully prove one AIR in the Simple pilout.
- air_config: protocol.air_config.AirConfig[source]#
- protocol.simple_pilout.prove_simple_pilout(air_data: dict[str, AIRProveData]) dict[str, dict][source]#
Prove all Simple pilout AIRs with the shared multi-AIR global challenge.
- Implements the full C++ proofman VADCOP protocol:
Commit Stage 1 for all AIRs (exactly once per AIR).
Compute each AIR’s Poseidon2 lattice contribution from (verkey, root1).
Accumulate contributions element-wise → shared global challenge.
Run Stage 2+ for each AIR using the shared challenge.
- Args:
air_data: Dict mapping AIR name → AIRProveData for all five Simple AIRs.
- Returns:
Dict mapping AIR name → proof dict (same structure as gen_proof() returns).
- protocol.simple_pilout.prove_simple_pilout_stage1(air_data: dict[str, AIRStage1Data]) SimplePiloutStage1Result[source]#
Commit Stage 1 for all Simple pilout AIRs and derive the multi-AIR global challenge.
- Implements the C++ proofman pattern from challenge_accumulation.rs:
For each AIR: build const tree (verkey) and commit Stage-1 witness (root1).
For each AIR: compute Poseidon2 lattice contribution from (verkey, root1).
Accumulate all contributions element-wise (mod Goldilocks prime).
Hash accumulated contribution with publics → global_challenge.
The Simple pilout has n_publics=0 and no proof_values_stage1, so only the five AIR contributions enter the challenge hash.
- Args:
- air_data: Dict mapping AIR name → AIRStage1Data for all five Simple AIRs.
Keys must include: ‘SimpleLeft’, ‘SimpleRight’, ‘U8Air’, ‘U16Air’, ‘SpecifiedRanges’ (order determines accumulation order).
- Returns:
SimplePiloutStage1Result with verkeys, stage1_commitments, and global_challenge.