Two multi-group root fixes + downstream preset/catalog enablement (from aerie) - #367
Draft
moodlezoup wants to merge 5 commits into
Draft
Two multi-group root fixes + downstream preset/catalog enablement (from aerie)#367moodlezoup wants to merge 5 commits into
moodlezoup wants to merge 5 commits into
Conversation
Fan the per-instance univariate-poly computation and challenge ingestion in prove_batched_sumcheck out across instances with rayon par_iter_mut, behind the existing "parallel" feature (dep:rayon added). Instance trait objects gain + Send and E gains Send + Sync accordingly. With many instances (the fused selector batch carries dozens) the per-instance round computations dominate late rounds whose domains are too small for intra-instance parallelism. Only the akita-sumcheck delta of the fork commit is ported; the rest of that commit was superseded upstream.
Port fn new_virtual_only from the old akita_stage2 lifecycle onto its upstream successor RelationRangeImageProver: a stage-2 prover over virtual-only recompositions with no committed table. The constructor carries only the stage-1 range-image claim (batching_coeff = 1) and zeroes every relation input: zero common_alpha_factor and relation_lane_weights tables, zero relation and trace opening claims, no additional relation terms. The old Option<TraceTable> = None argument no longer exists upstream; a new PreparedProverEvaluationTrace::zero(live_lane_count, coeff_count) constructor provides the identically-zero trace with the right geometry (empty per-lane support, no sources), which behaves exactly like the old no-trace path: zero contributions per round and a zero final value. Argument names follow the upstream renames (live_x_cols/col_bits/ ring_bits -> live_lane_count/lane_bits/coefficient_bits, s_claim -> range_image_evaluation); behavior is identical to the fork constructor.
Add #[macro_export] to impl_proof_optimized_preset! and $crate-qualify its internal recursion so downstream workspaces can define their own CommitmentConfig presets with identical semantics. The helpers the expansion references become public accordingly: PROOF_OPTIMIZED_LOG_BASIS_MIN/MAX, proof_optimized_ring_challenge_config, proof_optimized_schedule_key, proof_optimized_setup_matrix_capacity (all under the already-public proof_optimized module). Unlike the fork commit, the upstream application presets stay where they are; this ports only the export. Verified from an external scratch crate that the macro expands and the generated CommitmentConfig impl resolves.
1) Catalog expansion validated multi-group root rows with a hardcoded 128-bit field when recomputing the fold-output witness length, so valid generated rows for 32/64-bit families were rejected (num_live_blocks mismatch). Thread the policy's field width through a new CommittedGroupParams::output_witness_len_for_field_bits. 2) The direct-range live-x-prefix round kernels asserted rounds_completed < col_bits, which only equals the true bound (rounds_completed < num_vars, i.e. one foldable variable left) when ring_bits == 0; live-prefix tables with bound ring variables tripped the debug_assert spuriously.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for discussion: four commits that aerie (a Falcon/FN-DSA signature-aggregation proof system built on akita) carries on top of upstream main, published here so aerie can pin a reviewable revision (consumed by Acentelles/aerie#3). Two are candidate upstream fixes; the other three enable downstream preset/catalog hosting. Happy to split into separate PRs if some parts are wanted and others aren't.
Candidate bug fixes (stand alone)
9f98830d— two issues found while driving heterogeneous multi-group roots from downstream, each with a test:CommittedGroupParams::output_witness_len_for_field_bits); expansion is now byte-identical to the DP (drift test included).debug_assert!(rounds_completed < col_bits), which equals the true invariant (< num_vars) only whenring_bits == 0; shapes withring_bits = 7and a live plane prefix trip it spuriously. Fixed to< num_vars.Downstream-enablement ports
f7e4cf9e— optionalparallelfeature for the batched-sumcheck driver (rayon fan-out over instances; serial path unchanged; no API change beyond+ Sendbounds).38aa2f51—RelationRangeImageProver::new_virtual_only: a stage-2 constructor for virtual-only recompositions (no committed trace table), used by downstream range arguments that recompose committed digits virtually.bc1f484a—#[macro_export]onimpl_proof_optimized_preset!(with$crate-qualified internals and pub helpers), so downstream crates can define their own application presets against their own generated schedule catalogs, keeping application parameter choices out of akita.Validation: full workspace suite on this branch — 1261 passed / 0 failed / 6 pre-existing ignores. The drift guard covering fix (1) passes in release.
🤖 Generated with Claude Code