Skip to content

Feat/fri early termination#729

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

Feat/fri early termination#729
diegokingston wants to merge 2 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 82185 MB 82265 MB +80 MB (+0.1%) ⚪
Prove time 42.918s 42.785s -0.133s (-0.3%) ⚪

✅ No significant change.

🔬 Looks like a small speedup (-0.3%) — below what 3 runs can confirm. Comment /bench-abba to run the drift-free ABBA tiebreaker (paired-t CI + exact Wilcoxon). Note: it occupies the bench server for ~30–40 min.
Optional pair count: /bench-abba 32 (20 resolves ~1%, 32 for ~0.6%).

✅ Low variance (time: 1.2%, heap: 0.1%)

Commit: 4046577 · 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
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.

1 participant