Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
26c9704
feat(fri): combine DEEP codewords by height for batched FRI
diegokingston Jun 30, 2026
c667138
feat(fri): batched fold-and-inject commit phase (arity 2)
diegokingston Jun 30, 2026
5d165ea
feat(fri): shared round-4 transcript binding
diegokingston Jun 30, 2026
79a1243
feat(fri): mixed-height row-pair MMCS
diegokingston Jul 1, 2026
5c0e9eb
fix(fri): bind per-matrix widths in MMCS verify_batch + hardening
diegokingston Jul 1, 2026
0712987
feat(prover): batched MMCS commit for main traces
diegokingston Jul 1, 2026
99958d7
feat(prover): batched MMCS commit for aux traces
diegokingston Jul 1, 2026
1d3abac
refactor(prover): linear shared transcript + batched composition MMCS
diegokingston Jul 2, 2026
91d15ca
refactor(prover): one shared OOD point z per epoch
diegokingston Jul 2, 2026
7258954
feat(proof): BatchedMultiProof shard proof format (scaffolding)
diegokingston Jul 2, 2026
aa8295b
refactor(prover): split round 3 (all OOD) from round 4 in multi_prove
diegokingston Jul 2, 2026
9a42a74
feat(prover): multi_prove_batched — batched round 4 over shared MMCS
diegokingston Jul 2, 2026
8d55921
feat(verifier): batched_multi_verify — unified-shard roundtrip gate
diegokingston Jul 2, 2026
4df849a
test(verifier): batched soundness negatives (T8)
diegokingston Jul 2, 2026
7c5016e
feat(prover): make batched (MMCS unified-shard) the default monolithi…
diegokingston Jul 2, 2026
c2ec0c5
test(prover): validate batched path on real VM tables + preprocessed
diegokingston Jul 2, 2026
5ba856b
Merge origin/main into feat/batched-fri-per-epoch
diegokingston Jul 3, 2026
0e5f536
Merge origin/main into feat/batched-fri-per-epoch
diegokingston Jul 6, 2026
3b1d670
fix(stark): repair feature-gated builds + formatting after main merge
diegokingston Jul 6, 2026
cd61b24
fix(stark): restore main's per-table non-batched multi_prove (fix con…
diegokingston Jul 6, 2026
1f3c0ce
Merge origin/main into feat/batched-fri-per-epoch (#729 FRI early-ter…
diegokingston Jul 6, 2026
3160ccf
fix(stark): clippy clone_on_copy in batched FRI (Lint CI)
diegokingston Jul 7, 2026
cb7453e
refactor(stark): extract batched_round_4 + drop dead round2s/deep_inputs
diegokingston Jul 7, 2026
5e17d8a
feat(stark): commit_aux_trace + multi_prove_batched_epoch two-lane dr…
diegokingston Jul 7, 2026
e229b9c
feat(stark): split batched_multi_verify + batched_verify_epoch
diegokingston Jul 7, 2026
301ba1c
feat(continuation): two-lane EpochProof + wiring + COMMIT-balance L2G…
diegokingston Jul 8, 2026
f0e9943
chore(stark): satisfy clippy + fmt gates for batched-epoch path
diegokingston Jul 8, 2026
c7007bf
Merge branch 'main' into feat/batched-fri-per-epoch
diegokingston Jul 8, 2026
ece0164
fix(stark): clippy needless_borrow under debug-checks feature
diegokingston Jul 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
499 changes: 499 additions & 0 deletions crypto/stark/src/fri/batched.rs

Large diffs are not rendered by default.

722 changes: 722 additions & 0 deletions crypto/stark/src/fri/mmcs.rs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions crypto/stark/src/fri/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pub mod batched;
pub mod fri_commitment;
pub mod fri_decommit;
pub(crate) mod fri_functions;
pub mod mmcs;
pub(crate) mod terminal;

use crypto::fiat_shamir::is_transcript::IsStarkTranscript;
Expand Down
66 changes: 65 additions & 1 deletion crypto/stark/src/proof/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use math::field::{
};

use crate::{
config::Commitment, fri::fri_decommit::FriDecommitment, lookup::BusPublicInputs, table::Table,
config::Commitment, fri::fri_decommit::FriDecommitment, fri::mmcs::MixedOpening,
lookup::BusPublicInputs, table::Table,
};

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -83,3 +84,66 @@ pub struct StarkProof<F: IsSubFieldOf<E>, E: IsField, PI> {
pub struct MultiProof<F: IsSubFieldOf<E>, E: IsField, PI> {
pub proofs: Vec<StarkProof<F, E, PI>>,
}

/// Opening of all tables at ONE FRI query index, read from the per-phase
/// mixed-height MMCS trees. `main`, `aux` and `composition` each carry ONE
/// shared authentication path covering every table's row-pair at the query —
/// the unified-shard opening-path win (N×Q auth paths collapse to ~Q per phase).
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(bound = "")]
pub struct BatchedQueryOpening<F: IsSubFieldOf<E>, E: IsField> {
pub main: MixedOpening<F>,
pub aux: Option<MixedOpening<E>>,
pub composition: MixedOpening<E>,
/// Per preprocessed table (in preprocessed-table order): the precomputed
/// columns opened against that table's hardcoded precomputed tree — those
/// columns are NOT part of the shared main MMCS.
pub precomputed: Vec<PolynomialOpenings<F>>,
}

/// Per-table data carried by a [`BatchedMultiProof`] (canonical epoch order).
/// The three commitment roots and the OOD point `z` are SHARED across the epoch
/// (roots live on `BatchedMultiProof`; `z` is re-derived by the verifier), so
/// only genuinely per-table values live here.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(bound = "PI: serde::Serialize + serde::de::DeserializeOwned")]
pub struct BatchedTableData<E: IsField, PI> {
pub trace_length: usize,
/// tⱼ(z gᵏ)
pub trace_ood_evaluations: Table<E>,
/// Hᵢ(z^N)
pub composition_poly_parts_ood_evaluation: Vec<FieldElement<E>>,
/// Hardcoded precomputed-columns commitment (preprocessed tables); the
/// verifier checks it against the AIR's known value.
pub precomputed_root: Option<Commitment>,
pub bus_public_inputs: Option<BusPublicInputs<E>>,
pub public_inputs: PI,
}

/// A batched STARK proof for an epoch of tables sharing ONE linear transcript,
/// ONE OOD point `z`, and ONE FRI over the height-combined DEEP codewords
/// (unified-shard / Plonky3-style). Produced by `Prover::multi_prove_batched`
/// and verified by `Verifier::batched_multi_verify`. Eventually replaces
/// [`MultiProof`].
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[serde(bound = "PI: serde::Serialize + serde::de::DeserializeOwned")]
pub struct BatchedMultiProof<F: IsSubFieldOf<E>, E: IsField, PI> {
/// Shared mixed-height MMCS root over all tables' main-split matrices.
pub main_root: Commitment,
/// Shared mixed-height MMCS root over all aux-carrying tables' matrices.
pub aux_root: Option<Commitment>,
/// Shared mixed-height MMCS root over all tables' composition matrices.
pub composition_root: Commitment,
/// Merkle roots of the batched-FRI fold layers.
pub fri_layers_merkle_roots: Vec<Commitment>,
/// Final FRI folding value.
pub fri_last_value: FieldElement<E>,
/// Per-query openings of the FRI fold layers (shared across tables).
pub query_list: Vec<FriDecommitment<E>>,
/// Proof-of-work grinding nonce.
pub nonce: Option<u64>,
/// Per-query openings of the three shared trees (+ per-table precomputed).
pub deep_poly_openings: Vec<BatchedQueryOpening<F, E>>,
/// Per-table data in canonical epoch order.
pub per_table: Vec<BatchedTableData<E, PI>>,
}
Loading
Loading