Skip to content

Feat/fri early termination#729

Open
diegokingston wants to merge 6 commits into
mainfrom
feat/fri-early-termination
Open

Feat/fri early termination#729
diegokingston wants to merge 6 commits into
mainfrom
feat/fri-early-termination

Conversation

@diegokingston

Copy link
Copy Markdown
Collaborator

No description provided.

@diegokingston

Copy link
Copy Markdown
Collaborator Author

/bench

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Benchmark — ethrex 20 transfers (median of 3)

Table parallelism: auto (cores / 3)

Metric main PR Δ
Peak heap 73337 MB 72428 MB -909 MB (-1.2%) ⚪
Prove time 40.250s 40.274s +0.024s (+0.1%) ⚪

✅ No significant change.

✅ Low variance (time: 1.1%, heap: 0.4%)

Commit: d07779f · Baseline: cached · Runner: self-hosted bench

@diegokingston

Copy link
Copy Markdown
Collaborator Author

/bench

@diegokingston diegokingston marked this pull request as ready for review June 29, 2026 15:28
FRI stops folding when the polynomial reaches degree < 2^k (k =
ProofOptions.fri_final_poly_log_degree, default 7) instead of folding to a
single constant. The prover sends the 2^k final-polynomial coefficients
(fri_final_poly_coeffs); the verifier reconstructs the terminal codeword via a
coset FFT (base-field twiddles) and checks each query against it, with a
structural degree-bound check and a clamp for tiny traces. k is bound into the
Fiat-Shamir statement (DOMAIN_TAG _V3).

Impact (blowup 2, 219 queries): ~225 KB smaller proof, constant across trace
size (~16% at 2^20, 25% at 2^16); verifier does ~6,132 fewer Keccak
compressions and ~1,840 fewer Fp3 muls per proof.

- Prover interpolates the terminal poly on the minimal 2^k sub-coset (no
  oversized iFFT, no zero-trim).
- GPU FRI commit (cuda) supports early termination, mirroring the CPU path;
  validated on a CUDA server (proof verifies, gpu_fri_calls fires).
- Soundness: tampered / over-length / under-length coeffs and cross-k all
  reject; terminal codeword<->coeffs roundtrip; single-fold + clamp cases.
@diegokingston diegokingston force-pushed the feat/fri-early-termination branch from c1627b1 to be46afb Compare June 29, 2026 15:31
diegokingston and others added 3 commits June 29, 2026 16:57
Resolve conflicts where main's continuations feature meets this branch's
FRI early-termination statement binding. Both sides changed
absorb_statement's signature, so the merged function takes both
kind: StatementKind (continuations) and fri_final_poly_log_degree
(this branch); all callers thread both.

- continuation.rs: epoch_transcript now binds opts.fri_final_poly_log_degree
  per epoch, matching the value the epoch's FRI actually folds to (read from
  air.options() by both prover and verifier).
- statement_tests.rs: thread fri_final_poly_log_degree through the test
  helpers and main's new continuation-epoch tests.
- cuda_path_integration.rs: keep both newly added GPU tests
  (gpu_fri_commit_produces_verifiable_proof and
  gpu_proof_verifies_row_pair_commitment).
- statement.rs: allow clippy::too_many_arguments on absorb_statement, now at
  8 args after both features each added one (CI runs clippy -D warnings).
@diegokingston

Copy link
Copy Markdown
Collaborator Author

/bench

diegokingston and others added 2 commits June 30, 2026 18:58
…ofOptions

The main merge brought in MIN_PROOF_OPTIONS (recursion_smoke_test.rs), which
constructs ProofOptions without the fri_final_poly_log_degree field this branch
adds, breaking compilation of the prover lib tests (Lint, Build prover tests,
Disk-spill). Set it to 7 (the default used by every other test ProofOptions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants