Skip to content

Two multi-group root fixes + downstream preset/catalog enablement (from aerie) - #367

Draft
moodlezoup wants to merge 5 commits into
LayerZero-Labs:mainfrom
moodlezoup:aerie-substrate-v2
Draft

Two multi-group root fixes + downstream preset/catalog enablement (from aerie)#367
moodlezoup wants to merge 5 commits into
LayerZero-Labs:mainfrom
moodlezoup:aerie-substrate-v2

Conversation

@moodlezoup

@moodlezoup moodlezoup commented Aug 6, 2026

Copy link
Copy Markdown

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:

  1. Catalog expansion of multi-group roots hardcoded a 128-bit field width when sizing the root-batch next-w length; the planner side used the policy's true width, so generated tables disagreed with the offline DP for non-128-bit fields. Fixed by threading the policy width through (CommittedGroupParams::output_witness_len_for_field_bits); expansion is now byte-identical to the DP (drift test included).
  2. The direct-range live-x-prefix kernels debug_assert!(rounds_completed < col_bits), which equals the true invariant (< num_vars) only when ring_bits == 0; shapes with ring_bits = 7 and a live plane prefix trip it spuriously. Fixed to < num_vars.

Downstream-enablement ports

  • f7e4cf9e — optional parallel feature for the batched-sumcheck driver (rayon fan-out over instances; serial path unchanged; no API change beyond + Send bounds).
  • 38aa2f51RelationRangeImageProver::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] on impl_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

Michael Zhu and others added 5 commits August 6, 2026 09:55
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.
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