Skip to content

perf(verifier): batch reduced setup rows sharing one functional - #271

Open
Acentelles wants to merge 3 commits into
LayerZero-Labs:markos/recursion-integrationfrom
Acentelles:perf/batch-reduced-setup-rows
Open

Acentelles wants to merge 3 commits into
LayerZero-Labs:markos/recursion-integrationfrom
Acentelles:perf/batch-reduced-setup-rows

Conversation

@Acentelles

@Acentelles Acentelles commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When every reduced setup row in a scan job shares one base-ring functional (one functional class with ratio 1), the verifier now collects the rows and their scalars and evaluates them with one weighted_dot_base_rows call, instead of one dot_base and one add_product per row. This uses the same shared-functional kernel the lifted scans already use.

Mixed ring dimensions or distinct functionals keep the existing per-class path. The value computed is the same field sum. There is no change to the proof, the transcript or the setup.

Changes

  • akita-verifier, setup_contribution/scan/reduced.rs: the shared-functional fast path, with checked allocations (InvalidSetup on failure).
  • Tests: setup_contribution/tests/reduced_shared.rs compares the batched path against the per-row path, including the mixed and distinct-functional fallbacks.

Measured effect (stacked; standalone not measured)

Standalone rows on this base are not measured. The figures below are total trace rows (real plus virtual) of Jolt's recursion example, whose guest verifies one Akita proof of an inner Jolt proof. Each was measured without and with this change, on two recursion integration builds that also carry the factored compression-weight evaluation and the terminal quotient certificate.

Build 1 was measured in two runs, on an AMD Ryzen 9 7950X host and an AMD EPYC 7B13 host; rows and guest ELFs are identical across the runs.

Inner proof Without With Difference
$2^{12}$ 68,927,710 67,155,051 -1,772,659
$2^{20}$ 167,526,238 163,158,228 -4,368,010

Build 2 adds further verifier changes and was measured in one run, on an AMD EPYC 7B13 host:

Inner proof Without With Difference
$2^{12}$ 68,380,552 66,608,445 -1,772,107
$2^{20}$ 166,866,977 162,499,519 -4,367,458

On build 2, the honest proof is accepted and a tampered proof is rejected, and the proof and tampered-proof bytes are identical with and without the change.

Reproduce

Run the a16z/jolt#1911 recursion example (--features akita,field-inline,ntt-inline, trace --embed) at inner $2^{12}$ and $2^{20}$ with the Akita dependency pointed at this branch, then at its base ee03aa30, and compare the total rows.

Base

This PR targets markos/recursion-integration (ee03aa30), the recursion integration branch where this change was measured. It merges into main with the rest of that branch.

Current integration figures (whole stack, not this PR alone)

These are figures for the whole recursion integration stack: Jolt's recursion example with this PR's Akita changes together with the other changes on this branch, the Jolt-side verifier changes and the guest build settings. They are not a measurement of this PR alone.

Stack Inner $2^{12}$ rows Inner $2^{20}$ rows Hosts
Recursion head with these Akita changes 57,813,926 147,659,422 Census-reconciled on a Ryzen 9 5900XT; fold measured on EPYC 9124 and Ryzen 9 7950X
The same, with the follow-on no-carry tensor contraction fold 57,804,752 147,597,159 EPYC 9124

The Akita proof is 72,672 bytes at $2^{12}$ and 75,817 bytes at $2^{20}$ in both stacks, unchanged.

Receipt hashes (whole / closing):

  • census: 02a12d07 / 72c63ef2;
  • first fold: d23b9ab4 / 16ca914c;
  • follow-on fold: ea4ddf32 / f069836d.

@Acentelles
Acentelles requested a review from markosg04 October 26, 2026 18:36

This branch has not been deployed

No deployments
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