Repository navigation
perf(akita)!: batch native trace columns with first-fold cycle locality - #2012
Conversation
📏 PR diffNote Actual code changed: 1,456 lines🟢 +657 added 🔴 −799 removed Tests, docs, fixtures, and helper scripts excluded.
Every changed line is classified once. |
Benchmark comparison (crates)Same-runner A/B: 1 of 66 benchmarks differ by more than ±10%:
All 66 benchmarks
|
Review at head 1. Moderate: spec and book still describe the deleted design. The PR touches nothing under
2. Low: the 64-column limit lost its single owner. 3. Low: PR-body numbers and the "drift test". Head has 1,410 catalog rows / 18.9 MB (1,347 one-hot + 63 dense) against 503 rows / 5.9 MB at base; "2,984 → 1,011" and "1,074" describe intermediate commits (the last commit added 336 rows). 4. Low: K=256 grid. 276 rows / 4.4 MB at head (232 / 2.8 MB at base), but 5. Low: per-column buffer copies. 6. Test gaps. No permanent streamed N>1 prove/verify round trip with wrong/swapped-evaluation rejection (the grouped streamed fixture has N=1); Notes: the FS inventory scanner does not recognise |
Re-reviewed at Since my comment at
Soundness of the switch (traced)
Findings
Test gaps
Ran
Not run: field-inline end to end, the full catalog |
@quangvdao Following up on findings 2 and 3 in your review: The PR description now includes the full base/head performance comparison, with verifier timings, proof sizes, and Single/W2R2/W4R2/W8R2 measurements. There are three alternating fresh-process samples per side/case; all 48 proofs passed both verification modes. The report and raw samples are checked in. The W8R2 Fibonacci Opened Akita #191 and linked it from the description. Both schedules have six recursive folds, but native batching adds a second setup-prefix group and increases the third recursive input by 3.51x. The issue records the exact geometry and measurements and asks for per-fold profiling and valid alternative-schedule comparisons. It is related to #183, but we have not established that the current native schedule can be replaced by a cheaper valid one. Catalog freshness enforcement was also run locally: |
0xAndoroid
left a comment
There was a problem hiding this comment.
Two-model review at d60ffac. Soundness looks right: every column evaluation and the commitment's poly_count are absorbed before Akita draws batching challenges (native_batching.rs:152-199, adapters.rs:984); prover and verifier stage 8 build the trace group claim through the one assembler (stage8/akita.rs:376); the column·B + block challenge index and source-ordered outputs match the pinned Akita (decompose_fold.rs:328); CommitmentConfig::Akita keeps ordinal 1 and the layout digest is prefix-free.
We ran the full ten-catalog gen_jolt_schedules crates/jolt-akita/schedules --check at HEAD: 1,611 rows byte-identical (14.5 min, 88 GB RSS). The body's "all 12 rows across the four K=256 catalogs" predates d97705d (HEAD holds 256 K=256 rows), and nothing in CI runs the check.
Inline: 3 major (default-profile verifier/setup regression untracked, +25 min on the slowest CI job, dead single-source opening kernel), 6 minor.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
|
|
||
| ## Verification and proof size | ||
|
|
||
| | Workload / profile | Parallel verify base → head (ms) | Single-thread verify base → head (ms) | Proof base → head (bytes) | |
There was a problem hiding this comment.
This table shows the default (Single) profile's single-thread verifier regressing with non-overlapping sample ranges: sha2 2^22 +26% (19.5→24.5 ms), sha2 2^20 +21%, fib 2^20 +10%; PCS setup is 2.5–11× slower in all 8 cases (fib 2^18: 20.9→88.8 ms). The prose and Akita #191 cover only W8R2/2^24. Track the Single-profile verifier/setup regression (own issue or widen #191) or explain it here; perf in the title holds for fib 2^18 single only.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Added a dedicated section documenting the Single-profile verifier regressions: +10% for Fibonacci 2^20, +21% for SHA2 2^20, and +26% for SHA2 2^22, with non-overlapping sample ranges. Single-profile setup is 2.5–4.2× slower; across all measured cases it is 2.5–11.1× slower. These regressions are documented, not fixed. Setup and recursive geometry changes remain possible causes requiring profiling. The report explicitly states that the measurements do not establish a general speedup. I agree that refactor(akita)! is the more accurate title prefix.
| } | ||
| } | ||
|
|
||
| fn assert_k16_production_coverage(profile: AkitaChunkProfile) { |
There was a problem hiding this comment.
The W2R2/W4R2/W8R2 sweeps cost 1,947 / 1,378 / 816 s on this PR's job (112543437084); the jolt-akita field-inline step goes 490 s on main (job 112528801193) → 1,988 s, and the job to 58m46s, the longest of the 69 checks. Keep the Single sweep (3 s) plus width 51/64 × arity 16/25/34 per profile in PR CI; put the exhaustive sweeps behind #[ignore = "exhaustive grid: …"] with the command in schedules/README.md, or a scheduled job.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
PR CI now retains the complete Single grid and width 51/64 × arity 16/25/34 for each chunked profile. A nextest filter excludes exactly the three exhaustive chunked sweeps; their manual command is documented in schedules/README.md. The Single sweep and all three boundary tests passed.
| } | ||
|
|
||
| impl<E, const D: usize> OpeningFoldKernel<TracePackedOneHotView<'_, D>, AkitaField, D> | ||
| impl<E, const D: usize> OpeningFoldKernel<TraceOneHotColumnView<'_, D>, AkitaField, D> |
There was a problem hiding this comment.
Dead path. The pinned Akita (83574331) dispatches only evaluate_and_fold_batch for root sources (akita-cpu-backend/src/opaque/source.rs:56); OpeningProveBackendFor requires only the batch kernels (sources/poly.rs:310-313), and type OpeningView<'a> = () is admitted (sources/dense/tests.rs:366). The only callers of opening_view/this impl are trace_onehot/tests.rs:123,421-428. Make TraceOneHotColumn batch-only: OpeningView = (), delete TraceOneHotColumnView, this impl, opening_fold_column and the column_start/active_columns parameters with their checks in the hot loops (opening.rs:155-265). That also brings tests.rs back under 1,000 lines (921 → 1,028 here).
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Made the source batch-only with OpeningView = (). Removed TraceOneHotColumnView, the single-column kernel, opening_fold_column, and the column-range parameters and checks. Streamed batch parity against Akita’s materialized one-hot implementation passes. I also moved the trace-read-count helper and its two tests intact into a focused module: trace_onehot/tests.rs is now 875 lines, and all 15 trace kernel tests are retained and pass.
| &proof, | ||
| &mut verifier_transcript, | ||
| ) | ||
| .expect("original ordered evaluations must verify"); |
There was a problem hiding this comment.
This exercises BatchOpeningScheme::verify_batch over two dense polynomials. Jolt's trace opening goes through AkitaScheme::verify_batch → verify_trace_batch (scheme.rs:732-739, native_batching.rs:345), with the grouped transcript and the streamed one-hot source; prove_trace_batch/verify_trace_batch have no test caller that tampers an M>1 trace group. Add one: commit an M≥2 TraceOneHotColumn group, prove, verify the original, swap two distinct evaluations, assert rejection.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Added a two-column streamed trace test through AkitaScheme::prove_batch/verify_batch, exercising the grouped trace-opening path. It verifies the original statement and matching prover/verifier transcript state, asserts that the evaluations differ, then swaps them and requires rejection. The test passed.
| @@ -0,0 +1,31 @@ | |||
| --- a/crates/jolt-prover/src/profile.rs | |||
There was a problem hiding this comment.
Line-offset hunks against profile.rs with PR51_ eprintln probes, a JOLT_PR51_CHUNKS env switch, and a runner (run_comparison.py) that is not in the repo; they rot with the next edit to profile.rs. Make the chunk-profile selection a profile --akita-chunk-profile flag, drop both patches and the CSV, and keep the tables in the PR body / Akita #191.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Added and documented profile --akita-chunk-profile with single, w2r2, w4r2, and w8r2. Removed both benchmark-specific patches and the sample CSV, retaining historical provenance links.
Chunked runs now carry their profile suffix in artifact directories, latest links, CSV benchmark names, and summary workload names. The summary script supports explicit profile selection, and the plot reader keeps the CSV series separate. Real Fibonacci 2^16 Single and W4R2 proofs passed parallel and single-threaded verification; their emitted identities and summary selection were also checked.
| /// The Akita path's stand-in for the streaming witness-commit slot: stage 0 | ||
| /// commits the native `OneHotTrace` group directly, so this slot is never | ||
| /// reached. | ||
| struct PackedCommitStub; |
There was a problem hiding this comment.
PackedCommitStub survives the rename the body says is complete; AkitaCommitStub.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Renamed it to AkitaCommitStub and updated all references.
| @@ -1,4 +1,4 @@ | |||
| //! Packed (Akita) field-inline parity and tamper tests over fp128. | |||
| //! Akita (Akita) field-inline parity and tamper tests over fp128. | |||
There was a problem hiding this comment.
"Akita (Akita)" — rename garble; same at jolt-verifier/tests/soundness/tampering/akita.rs:92 ("Akita akita fixtures").
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Corrected both “Akita (Akita)” and “Akita akita fixtures.”
| if preprocessing.pcs_setup.max_num_vars() != plan.packing().packed_num_vars() | ||
| || preprocessing.pcs_setup.max_num_polys_per_commitment_group() != 1 | ||
| let required_batch_polys = auxiliary_groups.len() + plan.ids().len(); | ||
| // The setup is shape-exact for the canonical OneHotTrace group. |
There was a problem hiding this comment.
Narrates the two checks below it; delete.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
| protocol is specified in [Akita Native Trace Batching](akita-native-trace-batching.md). | ||
| `OneHotTrace` is one native commitment group containing the actual trace columns, | ||
| with each polynomial in `(cycle || address)` order. There are no selector slots | ||
| or selector challenge for the trace. Logical address row zero is public and |
There was a problem hiding this comment.
Wrong for RAM: digit zero is committed on cycles with a remappable RAM access (jolt-prover/src/akita/witness.rs:189 ram_digit_zero_mask, trace_onehot/traversal.rs:13 committed_zero_mask); lattice-claims.md:131 states it correctly. Restrict the omission/recentering sentence to instruction, bytecode, digit and carry columns.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
There was a problem hiding this comment.
Restricted digit-zero omission and Stage-7 recentering to instruction, bytecode, digit, and carry columns. The spec now explicitly states that RAM columns retain digit zero on cycles with a remappable RAM access, matching the witness and streamed kernel behavior.
0xAndoroid
left a comment
There was a problem hiding this comment.
Re-checked at 58b9bce: the earlier threads look addressed. Three new issues:
evaluate_and_fold_batchandopening.rs(278 lines) never run in production. All 1,548 one-hot catalog roots useSubringCoefficientPacking(Akitaowned.rs:183), so the fold path is reached only from unit tests. A panic there fails 2 unit tests and nothing else. Either route a real root through it or delete it. The reply on the dead-kernel thread cited the dispatch for the wrong path.- Tests nothing runs:
profile/tests.rs, since no CI job runs profiling, andscripts/tests/test_benchmark_profiles.py, which no workflow invokes. Wire them into CI or delete them. - Narration comments:
zkvm_profiling.md:109-111and the perf spec line 160 restate the code. Delete them.
Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself.
|
@0xAndoroid Addressed all three points from your latest review:
|
Resolve the akita/mod.rs doc conflict with a16z#2012: keep main's "Akita" wording and this branch's removal of the stale no-`akita`-feature rationale (jolt-kernels now has an `akita` feature). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict resolutions: - Akita pin: main pins akita d98400c5 (LayerZero-Labs/akita#175); this branch pins the recursion companion 22530c7b (akita main 2607265b plus LayerZero-Labs/akita#186-#190). markos/recursion-integration now merges d98400c5 into the companion (f2fbf8be; akita-config's schedule-artifact test file was the only conflict, both sides' tests kept) and adds 868045fd, which keeps #175's new optional fold fields in binary encodings so the companion's postcard catalog view decodes again. Both sides' pins move to 868045fd. - jolt-akita: main's multi-chunk one-hot families (#1976) and native trace batch (#2012) are taken as is; they subsume this branch's akita-params import moves. The prepared verifier is ported onto OneHotFamily: AkitaOneHotBackendScheme gains from_verifier_view and verifier_for_selection, the chunked schedule-artifact variants carry PreparedBytes, and AkitaVerifierSetup reads a flavor's catalog from its prepared view or its artifact in one place (catalog_source). - main's legacy_single_setup_keeps_its_transcript pinned bincode compatibility of single-profile verifier setups. This branch's prepared field and optional payload bytes change that encoding, so the test keeps its transcript pin and variant check (single_profile_setup_keeps_its_transcript) and drops the byte-equality assertions. - jolt-claims lattice strategy: main's native-batch v8 layout digest, hashed with the shared Blake2b256. - CI: main's job name with this branch's 90-minute timeout. - Fiat-Shamir inventories re-blessed; fs_obligations keeps this branch's absorb-method list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh Fibonacci proof at this revision accepts at 78,896,208 rows (76,805,832 verification cycles), 11,787,344 over 2^26. Input mode accepts at 86,254,204 rows and the tampered opening proof is rejected after 60,145,138. The increase over 67,622,320 is in the Akita trace-batch opening's root fold under main's native trace batching (#2012); the guest still verifies through its prepared payloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports main onto the argument-string transcript: the native Akita trace batching (#2012), backends bound to execution contexts (#2028), unified trace rows (#1996), whole-bytecode commitments (bytecode chunking removal), the binary fields and their sum-check (#2034 and the binary backend), and the clear proof-type cleanup, which this branch already subsumes. Binary fields gain the spongefish codecs every transcript atom carries, and main's new tests are rewritten for argument strings. Akita's runtime witness-chunking policy (LayerZero-Labs/akita#246, now in akita#185) moves chunking out of the commitment config, so each Jolt catalog family fixes its own through `CatalogChunking`, and the schedule generator preplans the direct rows below the setup-offloading cutover.
* feat(field,inlines): field-inline guest kernels and hash/NTT inlines Fp128 and Fr dot, weighted-row dot, and multiply kernels over the field-inline ISA for RISC-V guests, with canonical readout checks. A digest adapter over the Blake2b inline, used by the transcripts and the shared Blake2b-256 hasher. A 64-point i32 NTT and six-product pointwise dot inline expanded into existing proved instructions. The tracer fixes the unit's modulus, so a guest selects the one field that routes through it: field-inline-guest-bn254 (Fr) or field-inline-guest-fp128 (Prime128OffsetA7F7). Every other field keeps the software path. * feat(sdk,platform): guest runtime for verifier-as-guest workloads Size-class allocator for std guests, word-wise memset/memcmp and an asm-load memcpy, write(2) and clock_gettime(2) trap shims, and an execute-with-output host entry point. * perf(claims,verifier): shape verifier algebra for guest costs Derived leaves for batching powers, direct output-claim value walks, indexed claim lookups, the factored Spartan outer clear check, and column-dot bytecode folds. The preprocessing digest hashes through the shared Blake2b-256 hasher, and the wire form is public for verifiers whose trust root fixes the digest. * feat(akita): prepared verifier for recursion guests AkitaVerifierSetup::prepare_verifier carries the expanded key, a selected-row catalog view, and the terminal NTT cache for the row a proof selected; detach/attach moves the payloads out of the record so a guest views them in place. Byte payloads serialize through serde_bytes. The backend pool is behind a default parallel feature. * feat(recursion): Akita verifier guest with embedded setup The recursion example verifies an Akita field-inline proof as a guest. Embedded mode bakes the setup, compiled bytecode rows, and the preprocessing digest into the image. trace --expect checks the verdict; CI requires acceptance and rejection of a tampered opening. Adds the design note. * perf(claims,poly,transcript): cheaper verifier bookkeeping for the guest - Bytecode read-RAF stage values fold against the address eq table by decoded flag class: rows sharing a flag set share one gamma bucket, and register operands accumulate into per-register buckets. The flag-to-gamma mapping has one owner, read_raf_flag_terms; the flag-class table uses word-sized slots. - The stage-1 outer remainder reads its produced openings off its Az and Bz factors instead of expanding tau*Az*Bz; every expanded term is a distinct unit-coefficient monomial, and a test pins the result to the expansion. - Contiguous sparse MLE runs read their low eq factor from one table. - The digest transcript updates one hasher in place instead of threading it through chain_update; transcript bytes are unchanged. * perf(field,inlines,akita): guest kernels, inline tuning, and the companion pin - jolt-field: shared-operand dot_rows, four-factor sum_of_products4, and register-resident signed sums (Field::signed_sum) on the field-inline guest. - jolt-inlines-ntt: butterfly sums reduce by a Montgomery product with the stage's first twiddle (the Montgomery form of 1), 5 rows instead of a 7-row conditional reduction; the registered expansion fixture is regenerated. - jolt-inlines-blake2: Blake2b::update_block_eager compresses a full non-final block now, so a hasher sharing a constant first block can be prepared once. - Recursion guest: the Keccak inline backs Akita's SHAKE sampling (hash-inlines feature). - Akita companion pinned at markosg04/akita@6faec6c78: an inline Blake2b transcript sponge byte-identical to spongefish's Blake2b512 (checked by jolt-akita against spongefish), word-window Golomb-Rice decoding, coefficient-major terminal folds, doubleword NTT input stores, inline proof-atom encoding, and batched compression-column evaluation. * perf(transcript)!: absorb opening claims and round coefficients as one message Sumcheck round coefficients and each batch of opening claims now absorb as one labeled message carrying the count and the big-endian values, instead of one message per scalar. This changes the transcript, and so the proof bytes, for every proof. Prover, verifier, and BlindFold absorb through the shared append_round_coefficients and append_opening_claims helpers in jolt-sumcheck, whose transcript-facing bounds move from AppendToTranscript to CanonicalBytes. The Fiat-Shamir absorb- and challenge-site inventories are re-blessed, the checked-in jolt-verifier fuzz proof bundles are regenerated by their documented ignored tests, and the sumcheck compressed-round differential reference frames rounds through the shared helper. The standalone sumcheck consumer's field implements CanonicalBytes. jolt-blindfold's pairwise and lag-one correlation checks used a fixed 0.25 bound, under 3 sigma at 128 samples, which also fails for transcript-independent projections at other seeds; they now use 4 sigma, 4/sqrt(n) over n samples. * docs(recursion): record the guest-cost mechanisms and the 2^26 ladder * build(akita): pin canonical LayerZero-Labs/akita The Akita companion moves from the personal markosg04/akita fork to LayerZero-Labs/akita branch markos/recursion-integration: akita main 2607265b2 plus the recursion verifier-guest PRs (LayerZero-Labs/akita#186-#190). Repin to akita main once those merge. Akita main moved schedule, geometry, and dispatch types into a new akita-params crate and renamed AkitaScheduleLookupKey to ScheduleLookupKey; jolt-akita imports them from there. The trace-packed one-hot source implements the new OpeningBatchKernel::evaluate_and_fold_batch by folding each source. Akita main's guided planner now admits the four-group and two-full-width batches the schedules test expected it to reject. Neither shape reaches the full-planner fallback, which still admits only one full-width increment plus at most two advice groups, so the test now asserts that they plan through guided planning. The guest accepts at 66,175,726 rows (was 66,116,859 on the fork); the ported companion validates the setup descriptor and prefix registry and decodes the catalog view with postcard. * fix(recursion): close review findings on trust boundaries and guest paths Adversarial review of the recursion guest PR: - Prepared Akita payloads: the backend key and terminal cache are used unchecked, so an inline copy decoded from a setup record is refused there; only payloads this process prepared or a guest attached serve. Attached bodies are akita TrustedBytes tokens, so the one unchecked assumption (canonical key words) is made where the token is built, in the guest or host, and jolt-akita stays free of unsafe code. detach_prepared_payloads checks every payload before moving any. The host verifies proofs through the same detach-and-attach path the guest takes, and an integration test pins it. - Field-inline selectors are exclusive on riscv64 (a compile error otherwise); the unit's modulus contract and the reserved FR registers are documented. Row kernels (dot_base_rows, weighted_dot_base_rows) require matching row shapes on every path, as the guest kernels do. - Blake2b: jolt-transcript and jolt-claims use the inline hasher only on riscv64, so a host build with blake2-inline no longer panics. - The clear Spartan outer check accepts only shapes with affine terms, the shapes its factored form matches. - tamper-opening flips a bit inside the Akita opening proof, so CI's reject case runs through the PCS verifier (rejected after ~47.8M rows rather than at stage 1). - Guest runtime: zero-length write shim guarded; allocator and heap-split comments corrected; assume_static is an unsafe fn. - Docs: flag-class soundness guard, opening-claim message boundaries, non-additive jolt-sdk akita feature, spec measurements at this revision. - Akita pin: LayerZero-Labs/akita markos/recursion-integration, main plus the reviewed LayerZero-Labs/akita#186-#190. * chore(verifier): drop the redundant bn254 feature on jolt-crypto jolt-verifier's library code uses only jolt-crypto's ungated commitment traits. The BN254 types appear only in its unit tests, and jolt-blindfold, a non-optional dependency, enables jolt-crypto/bn254 itself, so the explicit feature changed nothing in the resolved build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): share one size-class arena between Rust and musl in std guests Under guest-size-class-alloc, std guests split the heap at boot: ZeroOS's kernel heap kept a fixed heap_size/8 and the Rust arena the rest. The kernel heap backs every musl mmap (malloc arenas, pthread stacks, C allocations), so a guest that mapped more than an eighth of its heap failed with ENOMEM even when the Rust side had room. std guests on the size-class allocator now register it as ZeroOS's kernel heap, as no_std guests already do, and kinit hands it the whole heap. The Rust global allocator draws from the same arena. The allocator's SAFETY comment now states why calls cannot overlap with threads enabled. A guest runtime test maps a 3 MiB malloc and a 3 MiB pthread stack beside a 4 MiB Rust allocation on a 16 MiB heap; it failed on the split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(field): rename fr_inline to field_inline The guest kernels serve whichever field the field-inline unit computes in (Fr or Fp128), so the module and its comments use the field-inline terminology: field_inline.rs, "field registers", and the field-inline instruction profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(claims): list read-RAF and digit-zero output openings directly The default expected_output_openings expands output_expression only to collect its opening ids, and the clear verifier's output-shape check calls it before verification builds the expression again. Read-RAF and the digit-zero claim reduction have large expansions. Both outputs are sums of distinct monomials, so their openings are listed directly; a test pins each list to the expanded expression, as for the stage-1 outer remainder. The recursion guest drops 813,367 rows on the Fibonacci proof (66,254,853 to 65,441,486). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(platform,sdk): drop the fast-mem guest routines Remove jolt-platform's word-wise memcpy, memset, and memcmp overrides (the fast-mem feature) and jolt-sdk's guest-fast-mem, so guests use musl's routines. Owning libc replacements is not worth it here; the sub-word access cost they dodge belongs in the ISA (Tiers 1 and 2 of specs/byte-addressable-memory.md, #2013). The recursion guest's Fibonacci trace grows from 65,441,486 to 69,059,130 rows, 1,950,266 over 2^26. The following commits recover part of that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(inlines): pack Blake2b input into message words The Blake2b SDK staged input through a 128-byte byte buffer. On a guest, each update's variable-length copy and each finalize's padding fill lowered to libc memcpy/memset calls, and every hasher clone copied the whole 216-byte struct. The Jolt digest transcript and Akita's transcript sponge both hash through this type. The buffer is now 16 little-endian message words whose bytes past the buffered length stay zero. Input is ORed in word by word (one aligned load per word when the source is aligned), finalize needs no padding pass, and Clone copies only the buffered words. Volatile word accesses keep LLVM from lowering these loops back into libc calls. Output bytes are unchanged; a new test checks every source alignment and split point against the blake2 crate. On its own, this saves the recursion guest 232,593 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(platform): copy whole words when size-class realloc moves a block Both blocks are class-aligned and span whole words, so realloc copies 8-byte words instead of calling memcpy, which a std guest's libc performs partly in sub-word loads and stores. On its own, this saves the recursion guest 61,164 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(cli): inline constant-size guest copies and fills up to 32 stores LLVM's RISC-V defaults lower constant-size memcpy/memset above a few stores to libc calls. In a guest those calls move data partly in sub-word loads and stores, each a multi-row sequence, so guest builds now raise the inline limits to 32 stores (-max-store-memcpy, -max-store-memset). On its own, this saves the recursion guest 948,480 rows; btreemap, alloc, collatz, the stdlib and large-alloc guests each drop slightly. 64 and 128 measured worse on the recursion guest than 32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(spec): record recursion-guest rows without fast-mem The guest now accepts the Fibonacci inner proof at 67,622,320 rows, 513,456 over 2^26. Record the post-rebase rows, mark the target as unmet, and list cheaper sub-word memory as the lever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(inlines): keep the Blake2b word-packing helper out of the absorb inventory The Fiat-Shamir inventory scanner treats any call named `absorb*` as a transcript absorb site, so the Blake2b hasher's input-packing helper, named `absorb` by db157e7, left fs_obligations failing on an unlisted site. It packs hash input into message words and touches no transcript; rename it `or_into_words` and drop its inventory entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(spec): record recursion-guest rows after merging main A fresh Fibonacci proof at this revision accepts at 78,896,208 rows (76,805,832 verification cycles), 11,787,344 over 2^26. Input mode accepts at 86,254,204 rows and the tampered opening proof is rejected after 60,145,138. The increase over 67,622,320 is in the Akita trace-batch opening's root fold under main's native trace batching (#2012); the guest still verifies through its prepared payloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): name jolt-sdk's akita feature when it breaks a provable host build jolt-sdk's `akita` feature compiles out the Dory host helpers, because jolt-prover's `akita` compiles out `jolt_prover::dory`. `#[jolt::provable]` still expanded calls to them, so any host build that unified the feature with a provable crate (`--all-features`, or the recursion example's `akita` alongside another example) failed with unresolved paths into the missing Dory API: six errors for the fibonacci guest alone. The macro now wraps its Dory prove and verify functions in `jolt::__dory_host_items!`. jolt-sdk passes them through, except with both `host` and `akita` enabled, where it replaces them with a single compile error that names the feature and points at `jolt::jolt_prover::akita`. Guest builds and tracing helpers are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(field): generalize sum_of_products4 to sum_of_products<K> Field::sum_of_products::<K> computes Σ_i Π_k terms[i][k] for any arity (an empty product is one). On a field-inline guest the kernel loads each term's K factors into the register file with K - 1 multiplies and reads the sum out once, as the four-factor kernel did. Akita's compression evaluation, its one caller, compiles to the same per-term sequence: the recursion guest accepts at 78,895,414 rows (was 78,896,208). sum_of_products4 forwards to it until the Akita companion calls sum_of_products; the repin that follows removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * build(akita): repin the companion and drop sum_of_products4 markos/recursion-integration now calls Field::sum_of_products directly (LayerZero-Labs/akita 38d8deb6, which also pins Jolt at e19eda7), so the four-factor forwarder has no caller left. The recursion guest accepts at 78,895,975 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(riscv): make flag_class name every row field The verifier's folded read-RAF evaluation reads each flag class's flags from one row, so a row field that a flag reads but flag_class omits breaks soundness, and the class test would not vary a new field. flag_class now destructures the row without `..`: adding a field to JoltInstructionRow fails to compile there until it is keyed or explicitly excluded. Flags starting to read the already excluded address or operands remain guarded only by flag_class_determines_read_raf_flag_terms. Guest rows are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): emit trapped stdout writes in one host call The trap handler answered write(2) to fds 1 and 2 by calling putchar per byte, one host print per byte. The tracer decodes each print as UTF-8, so every non-ASCII character reached the host as replacement characters: a std guest's `println!("σ→²")` printed seven U+FFFD. The shim intercepts these writes before ZeroOS's console, so it bypassed #1960's single-call fix for every std guest. It now calls __platform_stdout_write, the console's single-call path, which also covers a null or empty buffer. The comment notes that fds 1 and 2 reach the host even if the guest redirected them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(guests): document what std::time returns in a guest std guests' clock_gettime is answered by the runtime with a zero timestamp for every clock, so Instant::now and SystemTime::now succeed but never advance. The guest page now says so under Standard Library, the security model's no-clock rule links to it, and the recursion spec states what its trap shims return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(verifier): repin the ZK muldiv BlindFold shape at trace length 512 The jolt CLI's inline-store limits (83b9472) compile the muldiv guest to fewer instructions, so it now runs in under 512 cycles and its padded trace length halves. The golden-shape audit pinned 1024, which failed CI's ZK job on every push since the branch could run CI again (from 179e7a6). With the CLI built without those two flags the old pins pass, so the change is the fixture, not the protocol. At 512 the BlindFold shape has 221 coefficient rows (was 227: one fewer committed round in each of six cycle sumchecks); the other counts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(field): bind the field-inline unit's modulus at guest boot jolt-field's guest kernels range-check readouts against the selected field's modulus, which assumes the tracer's field-inline unit computes in that field. Nothing checked it: a BN254-selected guest traced under the fp128 unit computed 3*5 in Fr as a wrong value that still read out canonically, and returned it without error. jolt_field::bind_field_inline_modulus accumulates the selected field's modulus into a cleared field register and asserts zero, proving that the unit's prime divides it and so equals it. jolt-sdk's std runtime calls it once from __platform_bootstrap, before main; it is a no-op without a selector. The same probe guest now fails at trace time ("FIELD_ASSERT_ZERO of nonzero field register 4"), and under the matching unit it returns the right product. Binding at boot keeps readouts free. Checking a static flag on every readout cost the recursion guest 2.33M rows; this path costs nothing measurable (78,892,856 rows, was 78,895,975). jolt-field has no no_std build, so its kernels only run in std guests, and jolt-sdk takes jolt-field under guest-std only, without its default BN254 field. Fr::MODULUS_LIMBS and Fp128::MODULUS_LIMBS match #1995's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(field,poly): keep signed_sum's accumulator safe from its iterator - field_inline::signed_sum holds its partial sum in REG_ACC while it pulls terms, so an iterator that called dot (or any accumulating kernel) overwrote the sum. The accumulators are now marked lent until the readout; Fp128 dispatch then takes the software path for dot, dot_rows, weighted dot rows, sum_of_products, and a nested signed_sum. The guard costs about 9,000 rows on the recursion guest. - sparse_mle_msb advanced its index past the final block, which overflowed for a run ending at index u128::MAX; it now returns after the last block. * build(akita): repin to the reviewed LayerZero-Labs/akita#186-#190 The companion moves to recursion-integration 78d31e124: Akita main 401e7972 plus the review revisions of #186-#190. - jolt-akita's config presets follow main's RingDimensionSchedule (#192). - Akita's guest transcript is now spongefish's own Blake2b sponge over the inline digest adapter, so the jolt-akita test pinning the hand-written sponge and Blake2b::update_block_eager, which only that sponge used, are removed. - specs/recursion-guest.md records a fresh proof at 79,348,402 rows. * docs(recursion): record rows after merging main and the Akita review fixes * docs(recursion): record rows after merging main * fix(recursion): follow main's sumcheck transcript and Akita prove APIs * docs(recursion): record rows after merging main * test(sumcheck): drop the external consumer's unused opening-claim imports * ci(recursion): run the Akita guest verdicts as their own job * docs(recursion): re-measure rows with an isolated guest build * Fix transcript feature selection after main merge * Adapt recursion code to main API renames * Reject malformed recursion records without panicking Use checked framing, bounded record decoding, and fallible proof and device reads. Return verdict zero for input errors while retaining distinct failures for corrupt embedded preprocessing. Exercise the guest parser on the host with truncations, excessive lengths, invalid padding, noncanonical fields, and malformed devices. (cherry picked from commit 3e308a58ac0861db2041222a5266dfc733111261) * Authenticate input setup against an image-fixed digest Bake the complete framed setup digest into input-mode guests and check it before setup decoding or trusted payload attachment. Cover the setup record and every detached key, catalog, and terminal-cache body; reject absent pins and substitutions. Keep embedded setup bound directly by the image. (cherry picked from commit 4bb679f41f8f8393dd546d41861a94639fe14534) * Require nonempty recursion batches and complete input consumption Reject zero proofs and trailing bytes after the final device record. Document the exact statement established by the unchanged one-word verdict and the need for consumers to bind the intended count and devices through the runtime input. (cherry picked from commit 0e3816c2e297a0443865125b9714d1035b66b658) * Size recursion input regions from the runtime proof section Use one checked input capacity for the generated guest macro and tracer configuration, including alignment and serialization overhead. Cover embedded muldiv in both commitment builds and check framing across length-prefix boundaries for every example. (cherry picked from commit f5b9684e907607d671dd327ba923a0496ae4ca41) * Document and pin the current Akita setup encoding State the incompatible optional-payload and prepared-verifier encoding and the required regeneration of stored preprocessing. Restore a frozen decode fixture covering absent and present prepared state, detached bodies, and decoded payload provenance. No independent setup-format version exists to bump. (cherry picked from commit 85a44076c6ba8e0f5f87a69ffe2545b60b54a41d) * Exercise recursion rejection boundaries and field kernel tails Add typed sumcheck, opening-claim, device-output, panic-bit, and empty-batch fixtures, plus input-mode and two-proof acceptance in CI. Compare compiled field arithmetic with native software folds across all row and element tails, including nested accumulator use and boundary operands. Run the checks through the existing guest build and tracer path for both field selectors. (cherry picked from commit 105e9e841b0891ef7b023efccf01193687848cf1) * Describe the Akita opening-body tamper accurately Identify the PCS proof body as the mutation target and state that the command requires an Akita build. Keep the separate Stage1 claim mutation documented under the typed tamper command. (cherry picked from commit fe2121ac8503ffe9e5705e51884c0aaa84941bf4) * Assert matching field dot-product lengths in debug builds Check the equal-length contract in the default Field method and the Fp128 override so neither dispatch silently hides a shape mismatch during development. (cherry picked from commit ff6877f7080c2782bae6a21a969c5dbd9a3cc969) * Reject conflicting field accumulator loans in release builds Keep the signed-sum accumulator availability check in optimized guests so an unexpected nested kernel entry fails closed instead of overwriting a live sum. (cherry picked from commit aee7062319b221015a46106f74a15925431f29a1) * Define the setup pin in fresh guest builds * Preserve the lattice test round geometry * Reject malformed recursion input lengths (cherry picked from commit e352ad8585b2a7c4bd31aa34ab1b557f398ba6fa) * Reject nonzero recursion transport padding (cherry picked from commit 94224503199ecd9f0a3b4304944a546ada357614) * Select the field instruction profile for Dory inner proofs (cherry picked from commit 1d37c54a55ae3dbcd90b9d5ce6f73d1bffa5324f) * Acquire lent field accumulators atomically (cherry picked from commit 2acd6a2ec404327203958334266f750c67eab708) * Cover mixed proof batches and Dory tamper rejection (cherry picked from commit 517df4adb9024d30157825680ff1aefdf7b95863) * Derive recursion record limits when building the image (cherry picked from commit a2a5fb2a0e3f75e06bbbd110fc4575f9a6f0c541) * Fix merged Blake2 finalization and field instruction dispatch * Revert "Assert matching field dot-product lengths in debug builds" This reverts commit 4baee14. * Pin Akita to main LayerZero-Labs/akita#279 is merged; Akita main 1160b0a8 has the same tree as the previously pinned #279 head. * Regenerate verifier fuzz fixtures and lock for the Akita pin The six verifier fuzz bundles are regenerated from the merged protocol and pass decode and verification in clear and ZK builds. Cargo.lock resolves the Akita main pin. * Apply recorded formatting fixes * Fix imports and lint findings after main merge --------- Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: acentelles <centelles.alberto@gmail.com>
… at inner 2^12 (22.5% below main, 15.6% below #1911) (#2143) * perf(blake2): reuse packed Spongefish prefix compressions * perf(recursion): forward Akita's factored compression-weight feature l3-compression-weights on jolt-akita, the recursion host and the recursion guest selects Akita's factored evaluation of the compression relation weights (same field values). Feature-off guests compile byte for byte as before: only Cargo feature tables and host-only code change. * perf(recursion): turn factored compression weights on by default The recursion example enables l3-compression-weights by default. The feature forwards weakly (jolt-akita?/l3-compression-weights) and the host adds the guest feature only together with akita, so Dory builds are unchanged. --no-default-features turns it off. Host-side Cargo and cfg changes only. * perf(recursion): forward Akita's terminal quotient certificate feature Adds l2-terminal-quotient to jolt-akita (enabling akita-pcs's feature), the recursion host and the verifier guest, the host's guest-feature line, and a tamper-l2 tool for the rejection fixtures (quotient flip, noncanonical, extra, short, response flip). Feature-off guest sources are untouched. * perf(recursion): turn the terminal quotient certificate on by default The recursion example enables l2-terminal-quotient by default next to l3-compression-weights. The feature forwards weakly (jolt-akita?/l2-terminal-quotient), and the host's guest-feature line, the tamper-l2 command and its helpers are compiled only together with akita, so Dory builds are unchanged and Akita builds prove and verify with the quotient certificate. --no-default-features turns both off. Host-side Cargo and cfg changes only. * perf(field,transcript): word-sized Fp128 decoding and transcript scalars Adds the word-decode and word-transcript features: Fp128 proof elements are deserialized from fixed 16-byte tuples with register-sized accumulators, and transcript scalars can be absorbed as whole words. Both are off by default. * Define canonical big-endian bytes for transcript feature callers * Gate Solinas encoding tests before lint expectations * perf(recursion): turn word decoding on by default The recursion example enables word-decode by default next to the factored compression weights and the terminal quotient certificate. The feature forwards weakly (jolt-akita?/word-decode) and the host forwards it to the guest only together with akita, so Dory builds are unchanged. --no-default-features turns all three off. Host-side Cargo and cfg changes only. * perf(verifier): reuse instruction read RAF public inputs * style: rustfmt the instruction read RAF tests * Add opt-in RV64 word memory routines for recursion * Preserve assembler sections around word memory routines * perf(recursion): turn word memory routines on by default The recursion example enables word-memory by default next to the factored compression weights, the terminal quotient certificate and word decoding. The host forwards it to the guest only together with akita, so Dory builds are unchanged. --no-default-features turns all four off. Host-side Cargo and cfg changes only. * build(akita): pin the recursion verifier changes on the Akita fork The recursion example's default features use Akita changes that are not in LayerZero-Labs/akita yet. Pin the Akita crates to the fork commit that carries them so a fresh checkout builds the measured configuration. * perf(recursion): build the recursion verifier guest with inline-threshold 1000 and one codegen unit by default The recursion host now builds the verifier guest with ZEROOS_GUEST_RUSTFLAGS=-Cllvm-args=-inline-threshold=1000 and CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 (new default feature guest-codegen). The settings apply to the verifier guest build only; the inner guests and their proofs are unchanged. A value the caller already set for either variable wins. RECURSION_GUEST_CODEGEN=off, or building without the feature (--no-default-features), restores the stock guest build. Host-side Cargo and source changes only. * perf(recursion): raise the recursion verifier guest inline threshold to 1750 The guest-codegen default for the recursion verifier guest build moves from -Cllvm-args=-inline-threshold=1000 to -Cllvm-args=-inline-threshold=1750, still with one codegen unit. Thresholds of 2000 and above fail to link the guest. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * perf(recursion): enable GVN hoisting and DFA jump threading in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-enable-gvn-hoist and -Cllvm-args=-enable-dfa-jump-thread to -Cllvm-args=-inline-threshold=1750, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * perf(recursion): use ExtTSP block placement without tail merging in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-enable-ext-tsp-block-placement and -Cllvm-args=-enable-tail-merge=false to the existing inline threshold, GVN hoisting and DFA jump threading flags, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * test(jolt-sdk): skip the Dory verifier fixture test under akita The verifier_api test verifies Dory fixtures with VerifierPCS (Dory). With jolt-sdk's akita feature, jolt_verifier::verify is the Akita path, whose OneHotTrace metadata bounds Dory does not implement, so the test target failed to compile (E0277) whenever akita was unified into jolt-sdk, for example through the recursion example's akita feature. Gate the test to builds without akita, like verifier_preprocessing_from_prover. * perf(recursion): use size-oriented spill splitting in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-split-spill-mode=size to the existing inline threshold, GVN hoisting, DFA jump threading, ExtTSP block placement and no tail merging flags, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * perf(recursion): disable the RISC-V register cost-per-use model in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-riscv-disable-cost-per-use=true to the existing inline threshold, GVN hoisting, DFA jump threading, ExtTSP block placement, no tail merging and size-oriented spill splitting flags, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * Forward optional no-carry tensor contractions to recursion guests * perf(recursion): turn no-carry tensor contractions on by default The recursion host enables tensor-no-carry by default (weak dependency on jolt-akita, as the other default verifier arms) and forwards it to the verifier guest. The guest's Akita separates dense residual equality weights into a high-part sum and a no-carry low span; the field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * build(akita): pin the Akita fork commit that adds no-carry tensor contractions Moves the Acentelles/akita-lz pin from 9db4ee25 to a6a34dcf, which is 9db4ee25 plus the optional no-carry tensor contraction (feature tensor-no-carry). Cargo.lock changes only the git source revisions. * build(akita): fetch the Akita pin from LayerZero-Labs/akita The Akita crates keep rev a6a34dcf (the previous pin 9db4ee25 plus the optional no-carry tensor contraction) and are now fetched from LayerZero-Labs/akita, which serves the commit by hash, instead of a fork URL. Cargo.lock changes only the git source URLs. * perf(recursion): split every critical edge in PHI elimination in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-phi-elim-split-all-critical-edges=true to the existing inline threshold, GVN hoisting, DFA jump threading, ExtTSP block placement, no tail merging, size-oriented spill splitting and no cost-per-use flags, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * perf(field-inline): hold weighted-dot row pointers in registers (default off) Behind the jolt-field feature `field-inline-rowptr` (recursion guest feature `rowptr-registers`), `weighted_dot_rows` copies each block's row slices into locals before its element loop, so the row base pointers stay in registers across the field-inline asm blocks instead of being reloaded from `block_rows` on every term. Arithmetic, operand order and results are unchanged. The feature-off build keeps every source line number. * fix(field-inline): wrap the weighted-dot block macro body in a block The row-pointer copies under field-inline-rowptr are statements, and the macro is invoked in expression position, so its body must be a block. The feature-off expansion keeps the same loop inside a block and every source line number. * perf(recursion): hold the weighted-dot row pointers in registers by default in recursion The recursion host enables rowptr-registers by default and forwards it to the verifier guest, whose jolt-field keeps each block's row base pointers in registers across the field-inline element loop instead of reloading them on every term. Field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * perf(recursion): keep PHI-elimination live-out checks, eliminate spill copies and schedule after register allocation in the recursion verifier guest build The guest-codegen default for the recursion verifier guest build adds -Cllvm-args=-no-phi-elim-live-out-early-exit=true, -Cllvm-args=-enable-spill-copy-elim=true and -Cllvm-args=-enable-post-misched=true to the existing inline threshold, GVN hoisting, DFA jump threading, ExtTSP block placement, no tail merging, size-oriented spill splitting, no cost-per-use and critical-edge splitting flags, still with one codegen unit. A caller value for ZEROOS_GUEST_RUSTFLAGS still wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. Host-side source change only; the inner guests and their proofs are unchanged. * build(recursion): optionally leave unchanged generated guest sources untouched With RECURSION_WRITE_IF_CHANGED set, the host compares each generated guest source (provable_macro.rs, embedded.bin, embedded_bytecode.rs, embedded_bytes.rs) with the file on disk and skips the write when the bytes match, so an unchanged embedded setup no longer bumps mtimes and forces the fat-LTO guest rebuild. Unset, behaviour is unchanged. Tooling only: the written bytes, guest image, rows and verdict are the same either way. * build(recursion): optional content-keyed cache for the verifier guest ELF With RECURSION_GUEST_ELF_CACHE=<dir> set, the host computes a content key of the verifier-guest build (workspace tree and diff, every file under examples/recursion including the generated guest sources, the Cargo git checkouts, the toolchain and jolt CLI, this host binary, the guest build environment and the target directory) and reuses <dir>/<key>.elf instead of running the guest build; a fresh build is stored under its key. Unset, behaviour is unchanged. Tooling only: a hit reuses an ELF built from the same inputs, so rows, image and verdict are the same. * fix(recursion): key the guest ELF cache on every CARGO_PROFILE_ and CARGO_BUILD_ variable The environment filter of the cache key required '=' right after the CARGO_PROFILE_ and CARGO_BUILD_ prefixes, so no such variable entered the key and a changed codegen-units setting could reuse a stale ELF. Match the full variable names. * build(recursion): leave unchanged generated guest sources untouched by default Generated guest sources whose bytes already match the file on disk are no longer rewritten, so an unchanged embedded setup does not force the fat-LTO guest rebuild. RECURSION_WRITE_IF_CHANGED=off restores the unconditional rewrite. Tooling only: the bytes on disk, guest image, rows and verdict are the same. * build(recursion): key-only probe for the guest ELF cache With RECURSION_GUEST_ELF_CACHE and RECURSION_GUEST_ELF_CACHE_PROBE set, the host logs the guest ELF cache key and whether the lookup hits, then exits without building, so a key change can be checked without a guest build. Tooling only; unset, behaviour is unchanged. * perf(recursion): build the recursion verifier guest without debug information by default The guest-codegen defaults add CARGO_PROFILE_RELEASE_DEBUG=0 to the verifier-guest build only (the inner guests keep the workspace release profile, debug = 1). Line-table debug information is not codegen-neutral in LLVM; without it the verifier guest executes fewer rows. Proofs and transcripts are unchanged. A caller value wins, and RECURSION_GUEST_CODEGEN=off restores the stock guest build. * perf(recursion): forward the optional tensor equality run feature to the verifier guest * style(recursion): one statement per line in the guest feature forwarding Formatting only (the rustfmt reflow of the tensor-eq-runs forwarding line in the host); no behaviour change. * perf(recursion): traverse constant-high equality runs by default in recursion The recursion host enables tensor-eq-runs by default (weak dependency on jolt-akita, as the other default verifier features) and forwards it to the verifier guest, whose Akita materializes dense tensor equality weights by traversing their constant-high runs. The field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * build(akita): pin Akita to the tensor equality run accumulation The Akita crates move from rev a6a34dcf to 178e2f0f, which is a6a34dcf plus the optional tensor equality run accumulation (LayerZero-Labs/akita#274) and line-neutral rustfmt skip attributes, still fetched from LayerZero-Labs/akita by hash. Cargo.lock changes only the git source revisions. * perf(recursion): forward the optional structured setup-scan sums of products to the verifier guest * perf(recursion): sum the structured setup-scan contractions by default in recursion The recursion host enables setup-sop-structured by default (weak dependency on jolt-akita, as the other default verifier features) and forwards it to the verifier guest, whose Akita sums the cached structured E, T and Z contractions of the setup scan through sums of products. The field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * build(akita): pin Akita to the structured setup-scan sums of products The Akita crates move from rev 178e2f0f to f238e0e2, which is 178e2f0f plus the optional structured setup-scan sums of products (LayerZero-Labs/akita#276), still fetched from LayerZero-Labs/akita by hash. Cargo.lock changes only the git source revisions. * perf(recursion): add optional segment-setup and terminal-contraction features Forwards two optional Akita verifier features through jolt-akita and the recursion example: segment-setup (the ratio-one, single-functional reduced setup scan evaluated once over its shared linear functional, segment by segment) and terminal-contraction (signed 16-bit and weighted-row dot products in jolt-field, with a field-inline guest path). Both are off here. With either feature off, every existing source line keeps its location, so the verifier guest image is unchanged. * perf(recursion): evaluate the shared reduced setup scan by default in recursion The recursion host enables segment-setup by default (weak dependency on jolt-akita, as the other default verifier features) and forwards it to the verifier guest, whose Akita evaluates the ratio-one, single-functional reduced setup scan once over its shared linear functional, segment by segment. The field values, proofs and transcripts are unchanged. The terminal-contraction feature stays off. Turn it off with --no-default-features. * build(akita): pin Akita to the segment-setup scan The Akita crates move from rev f238e0e2 to 334379a1, which is f238e0e2 plus the optional segment-setup and terminal-contraction scans, still fetched from LayerZero-Labs/akita by hash. Cargo.lock changes only the git source revisions. * perf(field-inline): evaluate geometric weighted dots by Horner's rule (default off) With the new jolt-field feature field-inline-horner, the Fp128 field-inline weighted dot first checks whether its 64 powers are 1, alpha, alpha^2, ... and, when they are and there are at least five rows, evaluates each row by a reverse Horner recurrence with alpha held in a field register, five rows at a time. Any other input takes the existing kernel. The recursion example forwards the optional weighted-dot-horner feature to the verifier guest. * test(field-inline): type the geometric-power recognition test by the public field alias * style(field-inline): match formatter spacing in the weighted-dot kernel without moving source lines * perf(recursion): evaluate geometric weighted dots by Horner's rule by default in recursion The recursion host enables weighted-dot-horner by default and forwards it to the verifier guest, whose field-inline weighted dot checks that its 64 powers are 1, alpha, alpha^2, ... and, for at least five rows, evaluates each row by a reverse Horner recurrence with alpha held in a field register; any other input takes the unchanged kernel. The field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * feat(verifier): evaluate stage claim expressions from optional precomputed recipe tables With the new immutable-recipes feature (off by default; jolt-field, jolt-claims, jolt-verifier, jolt-verifier-derive, jolt-sdk and the recursion example), a stage's symbolic claim expression can be evaluated from a recipe found by relation and phase in a generated table: a list of coefficient-weighted products of openings, challenges and derived values. A recipe is used only in a non-zk Full-mode verification with the Fp128 field-inline guest field; a key absent from the table, or any other context, takes the canonical expression path. The native recorder that observes the canonical expressions and writes the tables is behind immutable-recipes-record. * Fix recipe macro lint violations * Fix recipe test panic and stale lint expectation * Place recipe macros before final test modules * Place recursion recipe macros before the test module Move the immutable_recursion_program macros, their pub(crate) use and the immutable_recipe_generation module above mod tests in examples/recursion/src/main.rs, clearing clippy::items_after_test_module. Layout only; no logic change. * Enable syn visit-mut only with immutable recipes jolt-verifier-derive turned on syn's visit-mut feature unconditionally. That changes syn's build metadata for every crate that depends on syn, including serde_derive, so the feature-off recursion guest was linked in a different order and executed 93 more rows than its base. Move visit-mut behind a new jolt-verifier-derive/immutable-recipes feature, forwarded from jolt-verifier/immutable-recipes, and keep it as a dev-dependency feature for the crate's own tests. Without the feature the recipe attributes are never applied, and batch_companions returns the driver unchanged, as its companions are compiled out anyway. * Name the failing check in recipe Representation errors Canonical recipe generation fails at inner 2^12 and 2^20 with CaptureError::Representation, which eight different checks return. Give the variant the name of the failing check and one detail value (the factor count or the offending index) so that a generation failure identifies its cause. The recorder is native-only and behind immutable-recipes-record, so guest builds are unaffected. * Format the named Representation errors Apply rustfmt's layout to the error sites added in the previous commit, as reported by cargo fmt --check. No other change. * Report the relation tag and phase of an over-wide recipe term The more-than-12-factors check now also packs the recipe key's relation tag and the phase into its detail value, so the failing relation can be read from the error. Native recorder only; guest builds are unaffected. * Fall back to canonical evaluation for over-wide recipe keys A recipe term with more than 12 factors cannot be represented in the compact form. Generation used to fail on the first such term; the composed bytecode recipe has one with 62 factors (gamma^4 times stage5_gamma^57 times one opening). Instead, leave such a key out of the generated tables and list it, with its phase, widest term and observation count, in capture.json as fallback_keys. The coverage check accepts a listed fallback for a required tag and phase. Guests need no change: a key absent from the tables already evaluates canonically before any recipe parsing or callback. * Reject a recipe key seen both narrow and over-wide A key and phase could be recorded from a narrow observation and also listed as a fallback from an over-wide one. The table would then carry the narrow recipe and the guest would apply it to every observation. Return Conflict in both directions: when recording a key already listed as a fallback, and when listing a key already recorded. Also bound the fallback list at MAX_KEYS entries, like the records. * Format the fallback coverage check Apply rustfmt's layout to the coverage condition added with the over-wide fallback, as reported by cargo fmt --check. No other change. * Write recipe coefficients as decimal strings in capture.json capture.json is built with serde_json, which cannot represent integers wider than 64 bits. Canonical coefficients are Fp128 values, so publishing the capture panicked with "number out of range" once generation got past capture. Serialize the coefficient list as decimal strings. The generated recipe source is unaffected. * Emit generated recipe tables from an inline const slice * Format the inline-const table emitters * Generate recipe tables in process before the recursion guest build With immutable-recipes, the recursion host now verifies every proof of the stream it embeds, natively and inside one recording session, before the verifier guest is built. When every proof verifies and the capture closes, it renders the tables; otherwise, or with RECURSION_IMMUTABLE_RECIPES=off, it uses three empty tables, so every lookup misses and the guest keeps its canonical expression path. Either file is written by content digest under the guest target directory and named in JOLT_IMMUTABLE_RECIPES_RS for that build only, so the caller never has to set the variable. A caller-set variable is kept. The host feature now carries the native recording code it needs; the publication path stays behind immutable-recipes-record. * Key the guest ELF cache on the recipe tables file contents The optional verifier-guest ELF cache keyed on the environment and the example sources but not on the immutable recipe tables, so a hit could reuse an ELF built with other tables. The key now includes the sha256 of the bytes of the file named by JOLT_IMMUTABLE_RECIPES_RS (or a fixed marker when it is unset), by content and not by path. * docs(recursion): add immutable-recipes to the recursion reproduce commands The recursion flow's stock feature list is now akita,field-inline,ntt-inline,immutable-recipes. Cargo's default features are unchanged, and CI keeps its own feature list. * fix(claims): define the CircuitFlags recipe ids in the Spartan flag carrier The protocol boundary test confines field-inline feature gates to the common ISA flag carriers and the composed module. The recipe id list for CircuitFlags gated its field instruction flags in immutable_recipes/flags.rs. Move that list, unchanged, into a macro in protocols/jolt/geometry/spartan.rs, which already mirrors CircuitFlags with the same gates, and expand it from flags.rs as before. The generated impl and its tokens are unchanged. * style(recipes): use imported names for the immutable recipe paths Import the types, traits and constants that the immutable recipe code and its derive helpers spelled with qualified paths (syn and proc-macro types, fmt, io and slice types, PhantomData, the field-inline Fp128 modulus, the recipe key traits). Paths inside generated code are bound once with quote! so the expansions keep the same tokens. In the guest-compiled files the new imports are placed so that no existing line moves except after the last item that can panic. * style(toml): taplo-format the jolt-akita, jolt-claims, jolt-transcript and jolt-verifier manifests * test(fs): inventory the word-transcript append_scalars absorption site append_scalars has a word-sized branch under the word-transcript feature that absorbs the same message bytes (label word, then each scalar big-endian) with one append_bytes call. The source inventory sees it as a second site; record it next to the default branch's site. * style(toml): taplo-format the recursion example, its guest and jolt-sdk manifests * style(recursion): import std::process::Command in the guest ELF cache key * build(akita): move the Akita pin to bcc1f30c bcc1f30c is the previous pin 334379a1 plus five Akita commits: the fused setup-scan job, its job loop and its row collection kept inline when terminal-contraction is enabled, and an optional, default-off rebuild of a byte-equal verifier view from prevalidated values (prevalidated-catalog). Only the pin and the lockfile sources change. * Keep the field-inline weighted dot and its kernel inline when terminal contraction is enabled With terminal-contraction both the field-inline weighted dot and the kernel it calls are marked inline(always), so the kernel stays inside the setup-scan row kernel in the guest. The attributes sit on the existing signature lines; feature-off builds keep every source line. * Keep the Fp128 weighted dot product inline under terminal contraction The Fp128 weighted dot product that the terminal contraction adds is marked inline(always), so it stays inside its caller in the guest. The file is only compiled with the feature. * feat(recursion): contract the terminal relations by default The recursion host enables terminal-contraction by default and forwards it to the verifier guest and to the host's Akita, so the stock feature list builds with it. The guest contracts the terminal ring relations with signed 16-bit coefficients, and the fused setup scan, its jobs and the weighted dots stay inline. The field values, proofs and transcripts are unchanged. Turn it off with --no-default-features. * build(recursion): link the verifier guest with its main entry first in .text ZeroOS's weak __main_entry stub sits at the start of .text and reaches __default_main_entry with j, whose reach is 1 MiB. The verifier guest can place more than 1 MiB of code between the two, and its link then fails with an out of range jump. The recursion host now passes an lld symbol ordering file that lists __default_main_entry to the verifier guest build only, through ZEROOS_GUEST_RUSTFLAGS, so that function's section is placed next to the stub. The guest code and the ZeroOS pin are unchanged, and the inner guests are built and linked as before. RECURSION_GUEST_LINK_ORDER=off links without the file. * Rebuild the recursion guest's one-hot catalog view from a build-time record behind a default-off feature prevalidated-catalog: before the verifier guest build, the recursion host loads the one-hot catalog view of the setup section it embeds through Akita's canonical loader and writes the recorded values to a generated file named in JOLT_PREVALIDATED_CATALOG_RS. The guest uses the record only for view bytes equal to the recorded ones (length, bytes, then policy digest); any other view takes the unchanged canonical path. In guest-compiled files the only changed line is the one-hot catalog match arm in adapters.rs (same-line attribute); everything else is appended after the last original line or before the final test module. * Instantiate the prevalidated catalog rebuild for the guest's own family only The generated file names its family, so the guest instantiates one rebuild. The rebuild and the dispatch are kept out of line. The host dispatch still covers every family and checks each family's config against its variant at compile time. * Make the recursion host's prevalidated catalog effective only with akita The prevalidated-catalog feature now reaches jolt-akita through a weak dependency edge, like the other Akita features, and the host's catalog module, its call sites and the guest forwarding are compiled only with akita as well. Builds that enable akita resolve the same features as before; builds without akita no longer pull akita in through this feature. * feat(recursion): rebuild the guest's catalog view from the host record by default The recursion host enables prevalidated-catalog by default, so the stock feature list records the embedded setup's one-hot catalog view and the verifier guest rebuilds a byte-equal view from that record instead of validating it again; any other view takes the canonical path. Proofs, Akita proof bytes and transcripts are unchanged. Turn it off with --no-default-features. * style(toml): taplo-format the prevalidated-catalog feature lists * Add a default-off three-coefficient step to the Horner weighted dot The field-inline Horner weighted dot evaluates five rows of 64 two-limb elements with register-resident accumulators. With the new jolt-field feature `field-inline-horner-triplet`, each full five-row block advances every row by three coefficients per pointer and branch group: one base pointer covers three consecutive elements through the offsets of the existing load-accumulate instruction. Other block shapes keep the existing path. Field values are unchanged. The recursion host gains `weighted-dot-horner-triplet` (implies `weighted-dot-horner`) and forwards it to the verifier guest, whose feature of the same name enables the jolt-field feature. Default off in this commit. * feat(recursion): use the three-coefficient Horner step by default The recursion host enables weighted-dot-horner-triplet by default and forwards it to the verifier guest, so the stock feature list builds with it. Inside each full five-row block of 64 two-limb elements, the guest's Horner weighted dot advances every row by three coefficients per pointer and branch group. Field values, proofs, Akita proof bytes and transcripts are unchanged. Turn it off with --no-default-features. * style(jolt-field): rustfmt the terminal-contraction attribute lines Put each attribute of the terminal-contraction items in algebra.rs, field_inline.rs and solinas/fp128.rs on its own line, as cargo fmt --check requires. Formatting only; no code change. * style(jolt-akita): import the one-hot types in the host stub of the prevalidated catalog * build(akita): move the Akita pin to b90491fa b90491fa is the previous pin bcc1f30c plus four optional, default-off verifier features and one comment-only commit: lazy-scan-errors (the setup-scan kernels build InvalidProof only on the failure path), digest-nozero (the prevalidated verifier view copies its row digests without zero-filling first), golomb-word (doubleword table and packed doubleword stores in the terminal z Golomb-Rice decoder) and fill-ingress (each bounded equality-fill run is scaled through Field::scale_slice_into). With the features off the Akita sources keep every line. Only the pin, its comment and the lockfile sources change. * feat(recursion): add five default-off verifier guest features Each feature keeps the field values, proofs and transcripts and is forwarded from the recursion host to the verifier guest (and to the host's Akita) only when `akita` is enabled: - lazy-scan-errors: Akita's setup-scan kernels build InvalidProof only on the failure path. - digest-nozero: with prevalidated-catalog, the verifier view rebuild copies its row digests without zero-filling first. - golomb-word: doubleword trailing-ones table and packed doubleword stores in Akita's terminal z Golomb-Rice decoder. - bytecode-fold (jolt-claims): the stage 6b bytecode read-RAF fold indexes its flag classes through a direct word table, with open addressing kept for keys beyond it; same classes, sums and first error. - fill-ingress (jolt-field, Akita): Field::scale_slice_into, which a field-inline Fp128 guest serves by loading the scale once per slice; Akita's bounded equality fill scales each run through it. All five are off by default. * feat(recursion): turn the five verifier guest features on by default lazy-scan-errors, digest-nozero, golomb-word, bytecode-fold and fill-ingress join the recursion host's default features, after weighted-dot-horner-triplet. Builds without `akita` do not pull Akita in; `--no-default-features` turns all of them off. * style(jolt-field): end the fill-ingress forwarding call with a semicolon Clippy's semicolon_if_nothing_returned (pedantic, denied by -D warnings) flags the unit-valued tail call in Fp128's scale_slice_into. Adding the semicolon does not change the generated code. * build(akita): move the Akita pin to b215e829 b215e829 is the previous pin b90491fa plus the optional, default-off setup-lane-streams root setup scan (each lane streamed with its row scales hoisted; implies terminal-contraction) and its import gate. With the feature off the Akita sources keep every line. Only the pin, its comment and the lockfile sources change. * feat(recursion): add the default-off setup-lane-streams verifier guest feature jolt-akita forwards setup-lane-streams to akita-pcs. The recursion host reaches it through a weak dependency edge and forwards it to the verifier guest only with akita, so builds without akita do not pull akita in. Field values, proofs, Akita proof bytes and transcripts are unchanged. * feat(recursion): turn setup-lane-streams on by default The recursion host enables setup-lane-streams by default and forwards it to the verifier guest, so the stock feature list builds with it. Field values, proofs, Akita proof bytes and transcripts are unchanged. Turn it off with --no-default-features. * fix(jolt-akita): align the embedded prevalidated catalog view to 8 bytes The generated prevalidated catalog file stored the view bytes as an alignment-1 array. The run-time check compares them with the setup copy, which is 8-aligned, and the comparison takes its word loop only when both addresses agree modulo 8. Depending on how the guest data happened to be laid out, the comparison could fall into its byte loop. Store the bytes in an 8-aligned wrapper so the comparison stays on the word path. The bytes, digests and accept set are unchanged. * build(akita): move the Akita pin to d04bf51f d04bf51f is the previous pin b215e829 plus the optional, default-off compiled carry-state graphs for the eq-pair tensor recurrences (akita-algebra/carry-graph). With the feature off the Akita sources keep every line. Only the pin, its comment and the lockfile sources change. * feat(recursion): add the default-off carry-graph verifier guest feature With `carry-graph` (and `akita`), the host reads the padded trace length shared by the inner proofs in the stream it is about to verify, emits Akita's fixed carry-state graph source for that size, and names the file in JOLT_CARRY_GRAPH_RS for the verifier guest build only. The guest then evaluates the eq-pair tensor recurrences through the compiled graphs. The graphs depend only on the size, never on a proof's values. If the proofs do not share one supported size, or RECURSION_CARRY_GRAPH=off, the file holds no graph and the guest keeps the recurrence path. The graph file is part of the guest build cache key. * feat(recursion): turn carry-graph on by default * build(akita): move the Akita pin to 9f778c0c 9f778c0c is the previous pin d04bf51f plus two optional, default-off verifier features: MLE leaf tiles (akita-algebra/mle-leaf-tiles) and signed-byte challenge evaluation (akita-challenges/signed-byte-sum). With both features off the Akita sources keep every line. Only the pin, its comment and the lockfile sources change. * feat(recursion): add the default-off mle-leaf-tiles and signed-byte-sum verifier guest features Two optional verifier features, both default off and both effective only with `akita`; each is forwarded to the verifier guest and to the host's Akita. Same field values, proofs and transcripts. - mle-leaf-tiles: Akita evaluates low-variable multilinear extensions by fixed leaf tiles (akita-pcs/mle-leaf-tiles). - signed-byte-sum: Akita evaluates a sparse challenge at powers by taking its signed byte coefficients in through one field sum. jolt-field gains the matching default-off feature `signed-byte-sum`: Field::sum_signed_bytes (a generic fold) and, in the field-inline guest, an Fp128 override that accumulates each nonzero coefficient's magnitude in the field accumulator register. tests/signed_byte_sum.rs checks the integer contract, including i8::MIN and the empty sum, for both 128-bit Solinas primes. * feat(recursion): turn mle-leaf-tiles and signed-byte-sum on by default Both features join the recursion example default list. Turn them off with --no-default-features plus the other defaults. * build(akita): move the Akita pin to 13128559 13128559 is the previous pin 9f778c0c plus two optional, default-off verifier features: setup-weight tiles in the direct setup scan (akita-verifier/setup-weight-tiles) and word-level challenge decode (akita-challenges/challenge-word-decode). With both features off the Akita sources keep every line. Only the pin, its comment and the lockfile sources change. * feat(recursion): add the default-off setup-weight-tiles verifier guest feature New feature jolt-field/setup-weight-tiles: Field::add_scaled_slice adds scale * src[i] to dst[i] over the shorter slice. The default is the plain loop; the field-inline Fp128 guest path keeps the scale in a field register and adds each product to its destination through the field register add, four elements per tile, then checks every result as a canonical value. Same field values; tests/setup_weight_tiles.rs compares it with the plain loop on random and boundary inputs for both 128-bit primes. The feature is forwarded recursion -> jolt-akita -> akita-pcs (whose direct setup scan uses it) and to the verifier guest. Default off. * feat(recursion): add the default-off challenge-word-decode verifier guest feature Forwards Akita's akita-challenges/challenge-word-decode (through jolt-akita and akita-pcs) to the recursion host and the verifier guest. With it on, sampling a signed sparse challenge decodes positions and signs from whole 64-bit SHAKE output words instead of byte by byte; same consumption, rejection and challenges. Default off. * feat(recursion): turn setup-weight-tiles and challenge-word-decode on by default Both features join the recursion default list after signed-byte-sum. They are forwarded in the weak form (jolt-akita?/...), so --no-default-features builds are unchanged and the defaults take effect only with akita. No Akita default changes. * perf(instruction): compute native quadratic coefficients directly (#2230) * perf(kernels): factor RAM products with a common zero endpoint (#2231) * perf(kernels): reuse equal categorical quartet values (#2232) * perf: reuse zero-prefix range-check moments across address phases (#2224) * perf(spartan): reuse upstream product claims in uniskip (#2225) * perf(spartan): reuse upstream claims for product base nodes * perf(kernels): iterate product base nodes without feature-specific range lint * refactor(kernels): share uniskip node geometry and name the claim check Derive the product uni-skip base offset from the centered domain starts, the same law the outer uni-skip uses (correct for even domains too), and say where agreement between the reused stage-1 openings and the witness is enforced now that the uni-skip round sum holds by construction. --------- Co-authored-by: Quang Dao <qvd@andrew.cmu.edu> * perf(instruction): accumulate operand claims from native scalars (#2227) * perf(bytecode): detect repeated work across longer loops (#2229) * perf(bytecode): detect repetitions across longer loops * refactor(bytecode): reuse the long repeat window's merge cache per worker - grouped_evals keeps the same per-batch task split, but reuses one merge cache per rayon split via map_init instead of allocating 2048 entries (8192 slots) per batch per round; drain() already leaves the cache empty. - CycleGrouping carries min_groups instead of identifying the short plan by its entry count, and names the long sizes. The long window keeps the same threshold (one full task): a higher gate measured slower on SHA-2. The per-group merge loop is unchanged. --------- Co-authored-by: Quang Dao <qvd@andrew.cmu.edu> * perf(akita): prepare sparse shift views once per batch (#2226) * Prepare bounded sparse commitment source views before tile accumulation * refactor(akita): one chunked digit-window kernel for sparse shift batches Fold the prepared-view fast path and the old per-tile window/shift walk into one kernel. accumulate_slots resolves full-length shifted views into a stack array of VIEW_BATCH (64) thin slices and runs the tile loop once per full chunk, so batches above 64 shifts take extra passes over dst instead of falling back to a second copy of the tile loop. This removes the bool return, the >64 fallback, and the impossible first_chunk-failure branch (now an expect on the 2*D digit layout). Every production batch (<= D/16 <= 32 from commit.rs, < 60 from ntt_commit.rs) is one chunk, so the hot path is unchanged: the same view collection, the same tile loop, and the same per-tile work as before. --------- Co-authored-by: Quang Dao <qvd@andrew.cmu.edu> * perf(spartan): group weighted products by repeated guard endpoints (#2233) * perf(spartan): reuse guard folds during remainder preparation * perf(spartan): group weighted products by repeated guard endpoints * refactor(kernels): back spartan guard endpoints with RepeatCache Consolidate the outer-remainder guard grouping from #2222/#2233: - Delete `fold_group`, which restated `fold_guards` + `fold_values`. The constant-tail row and field-inline rows now call those two directly (`RowGroupValues::fold_b` / `FieldGroupValues::fold_b` own the B folds). - `GuardEndpoints` stores its groups in the shared `RepeatCache` (same 128 slots: 32 entries x 4) instead of a hand-rolled slot array. The cache is allocated once per rayon split via `map_init` (once for the serial path) and `finish(self)` drains it, so blocks no longer zero-initialize a 22-43 KB stack array each. The slot hash stays a single multiply (byte swapped so `RepeatCache`'s low-bit mask sees the product's high bits) rather than `repeat_hash`'s three. - Active field-inline rows go through `add` (their A side is the same integer guard fold), so `add_direct` is private to the out-of-range fallback. - Add `remainder_matches_reference_with_repeated_guard_rows` (log_t = 12, period 48) so hits, multi-row groups, and collision flushes in the real `prepare` path are checked against the reference kernel. The per-row hot loop is unchanged: same row decode, B folds, lookup, and two accumulator fmadds per row. --------- Co-authored-by: Quang Dao <qvd@andrew.cmu.edu> * feat(recursion): Akita field-inline verifier guest on main (#1911) * feat(field,inlines): field-inline guest kernels and hash/NTT inlines Fp128 and Fr dot, weighted-row dot, and multiply kernels over the field-inline ISA for RISC-V guests, with canonical readout checks. A digest adapter over the Blake2b inline, used by the transcripts and the shared Blake2b-256 hasher. A 64-point i32 NTT and six-product pointwise dot inline expanded into existing proved instructions. The tracer fixes the unit's modulus, so a guest selects the one field that routes through it: field-inline-guest-bn254 (Fr) or field-inline-guest-fp128 (Prime128OffsetA7F7). Every other field keeps the software path. * feat(sdk,platform): guest runtime for verifier-as-guest workloads Size-class allocator for std guests, word-wise memset/memcmp and an asm-load memcpy, write(2) and clock_gettime(2) trap shims, and an execute-with-output host entry point. * perf(claims,verifier): shape verifier algebra for guest costs Derived leaves for batching powers, direct output-claim value walks, indexed claim lookups, the factored Spartan outer clear check, and column-dot bytecode folds. The preprocessing digest hashes through the shared Blake2b-256 hasher, and the wire form is public for verifiers whose trust root fixes the digest. * feat(akita): prepared verifier for recursion guests AkitaVerifierSetup::prepare_verifier carries the expanded key, a selected-row catalog view, and the terminal NTT cache for the row a proof selected; detach/attach moves the payloads out of the record so a guest views them in place. Byte payloads serialize through serde_bytes. The backend pool is behind a default parallel feature. * feat(recursion): Akita verifier guest with embedded setup The recursion example verifies an Akita field-inline proof as a guest. Embedded mode bakes the setup, compiled bytecode rows, and the preprocessing digest into the image. trace --expect checks the verdict; CI requires acceptance and rejection of a tampered opening. Adds the design note. * perf(claims,poly,transcript): cheaper verifier bookkeeping for the guest - Bytecode read-RAF stage values fold against the address eq table by decoded flag class: rows sharing a flag set share one gamma bucket, and register operands accumulate into per-register buckets. The flag-to-gamma mapping has one owner, read_raf_flag_terms; the flag-class table uses word-sized slots. - The stage-1 outer remainder reads its produced openings off its Az and Bz factors instead of expanding tau*Az*Bz; every expanded term is a distinct unit-coefficient monomial, and a test pins the result to the expansion. - Contiguous sparse MLE runs read their low eq factor from one table. - The digest transcript updates one hasher in place instead of threading it through chain_update; transcript bytes are unchanged. * perf(field,inlines,akita): guest kernels, inline tuning, and the companion pin - jolt-field: shared-operand dot_rows, four-factor sum_of_products4, and register-resident signed sums (Field::signed_sum) on the field-inline guest. - jolt-inlines-ntt: butterfly sums reduce by a Montgomery product with the stage's first twiddle (the Montgomery form of 1), 5 rows instead of a 7-row conditional reduction; the registered expansion fixture is regenerated. - jolt-inlines-blake2: Blake2b::update_block_eager compresses a full non-final block now, so a hasher sharing a constant first block can be prepared once. - Recursion guest: the Keccak inline backs Akita's SHAKE sampling (hash-inlines feature). - Akita companion pinned at markosg04/akita@6faec6c78: an inline Blake2b transcript sponge byte-identical to spongefish's Blake2b512 (checked by jolt-akita against spongefish), word-window Golomb-Rice decoding, coefficient-major terminal folds, doubleword NTT input stores, inline proof-atom encoding, and batched compression-column evaluation. * perf(transcript)!: absorb opening claims and round coefficients as one message Sumcheck round coefficients and each batch of opening claims now absorb as one labeled message carrying the count and the big-endian values, instead of one message per scalar. This changes the transcript, and so the proof bytes, for every proof. Prover, verifier, and BlindFold absorb through the shared append_round_coefficients and append_opening_claims helpers in jolt-sumcheck, whose transcript-facing bounds move from AppendToTranscript to CanonicalBytes. The Fiat-Shamir absorb- and challenge-site inventories are re-blessed, the checked-in jolt-verifier fuzz proof bundles are regenerated by their documented ignored tests, and the sumcheck compressed-round differential reference frames rounds through the shared helper. The standalone sumcheck consumer's field implements CanonicalBytes. jolt-blindfold's pairwise and lag-one correlation checks used a fixed 0.25 bound, under 3 sigma at 128 samples, which also fails for transcript-independent projections at other seeds; they now use 4 sigma, 4/sqrt(n) over n samples. * docs(recursion): record the guest-cost mechanisms and the 2^26 ladder * build(akita): pin canonical LayerZero-Labs/akita The Akita companion moves from the personal markosg04/akita fork to LayerZero-Labs/akita branch markos/recursion-integration: akita main 2607265b2 plus the recursion verifier-guest PRs (LayerZero-Labs/akita#186-#190). Repin to akita main once those merge. Akita main moved schedule, geometry, and dispatch types into a new akita-params crate and renamed AkitaScheduleLookupKey to ScheduleLookupKey; jolt-akita imports them from there. The trace-packed one-hot source implements the new OpeningBatchKernel::evaluate_and_fold_batch by folding each source. Akita main's guided planner now admits the four-group and two-full-width batches the schedules test expected it to reject. Neither shape reaches the full-planner fallback, which still admits only one full-width increment plus at most two advice groups, so the test now asserts that they plan through guided planning. The guest accepts at 66,175,726 rows (was 66,116,859 on the fork); the ported companion validates the setup descriptor and prefix registry and decodes the catalog view with postcard. * fix(recursion): close review findings on trust boundaries and guest paths Adversarial review of the recursion guest PR: - Prepared Akita payloads: the backend key and terminal cache are used unchecked, so an inline copy decoded from a setup record is refused there; only payloads this process prepared or a guest attached serve. Attached bodies are akita TrustedBytes tokens, so the one unchecked assumption (canonical key words) is made where the token is built, in the guest or host, and jolt-akita stays free of unsafe code. detach_prepared_payloads checks every payload before moving any. The host verifies proofs through the same detach-and-attach path the guest takes, and an integration test pins it. - Field-inline selectors are exclusive on riscv64 (a compile error otherwise); the unit's modulus contract and the reserved FR registers are documented. Row kernels (dot_base_rows, weighted_dot_base_rows) require matching row shapes on every path, as the guest kernels do. - Blake2b: jolt-transcript and jolt-claims use the inline hasher only on riscv64, so a host build with blake2-inline no longer panics. - The clear Spartan outer check accepts only shapes with affine terms, the shapes its factored form matches. - tamper-opening flips a bit inside the Akita opening proof, so CI's reject case runs through the PCS verifier (rejected after ~47.8M rows rather than at stage 1). - Guest runtime: zero-length write shim guarded; allocator and heap-split comments corrected; assume_static is an unsafe fn. - Docs: flag-class soundness guard, opening-claim message boundaries, non-additive jolt-sdk akita feature, spec measurements at this revision. - Akita pin: LayerZero-Labs/akita markos/recursion-integration, main plus the reviewed LayerZero-Labs/akita#186-#190. * chore(verifier): drop the redundant bn254 feature on jolt-crypto jolt-verifier's library code uses only jolt-crypto's ungated commitment traits. The BN254 types appear only in its unit tests, and jolt-blindfold, a non-optional dependency, enables jolt-crypto/bn254 itself, so the explicit feature changed nothing in the resolved build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): share one size-class arena between Rust and musl in std guests Under guest-size-class-alloc, std guests split the heap at boot: ZeroOS's kernel heap kept a fixed heap_size/8 and the Rust arena the rest. The kernel heap backs every musl mmap (malloc arenas, pthread stacks, C allocations), so a guest that mapped more than an eighth of its heap failed with ENOMEM even when the Rust side had room. std guests on the size-class allocator now register it as ZeroOS's kernel heap, as no_std guests already do, and kinit hands it the whole heap. The Rust global allocator draws from the same arena. The allocator's SAFETY comment now states why calls cannot overlap with threads enabled. A guest runtime test maps a 3 MiB malloc and a 3 MiB pthread stack beside a 4 MiB Rust allocation on a 16 MiB heap; it failed on the split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(field): rename fr_inline to field_inline The guest kernels serve whichever field the field-inline unit computes in (Fr or Fp128), so the module and its comments use the field-inline terminology: field_inline.rs, "field registers", and the field-inline instruction profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(claims): list read-RAF and digit-zero output openings directly The default expected_output_openings expands output_expression only to collect its opening ids, and the clear verifier's output-shape check calls it before verification builds the expression again. Read-RAF and the digit-zero claim reduction have large expansions. Both outputs are sums of distinct monomials, so their openings are listed directly; a test pins each list to the expanded expression, as for the stage-1 outer remainder. The recursion guest drops 813,367 rows on the Fibonacci proof (66,254,853 to 65,441,486). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(platform,sdk): drop the fast-mem guest routines Remove jolt-platform's word-wise memcpy, memset, and memcmp overrides (the fast-mem feature) and jolt-sdk's guest-fast-mem, so guests use musl's routines. Owning libc replacements is not worth it here; the sub-word access cost they dodge belongs in the ISA (Tiers 1 and 2 of specs/byte-addressable-memory.md, #2013). The recursion guest's Fibonacci trace grows from 65,441,486 to 69,059,130 rows, 1,950,266 over 2^26. The following commits recover part of that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(inlines): pack Blake2b input into message words The Blake2b SDK staged input through a 128-byte byte buffer. On a guest, each update's variable-length copy and each finalize's padding fill lowered to libc memcpy/memset calls, and every hasher clone copied the whole 216-byte struct. The Jolt digest transcript and Akita's transcript sponge both hash through this type. The buffer is now 16 little-endian message words whose bytes past the buffered length stay zero. Input is ORed in word by word (one aligned load per word when the source is aligned), finalize needs no padding pass, and Clone copies only the buffered words. Volatile word accesses keep LLVM from lowering these loops back into libc calls. Output bytes are unchanged; a new test checks every source alignment and split point against the blake2 crate. On its own, this saves the recursion guest 232,593 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(platform): copy whole words when size-class realloc moves a block Both blocks are class-aligned and span whole words, so realloc copies 8-byte words instead of calling memcpy, which a std guest's libc performs partly in sub-word loads and stores. On its own, this saves the recursion guest 61,164 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(cli): inline constant-size guest copies and fills up to 32 stores LLVM's RISC-V defaults lower constant-size memcpy/memset above a few stores to libc calls. In a guest those calls move data partly in sub-word loads and stores, each a multi-row sequence, so guest builds now raise the inline limits to 32 stores (-max-store-memcpy, -max-store-memset). On its own, this saves the recursion guest 948,480 rows; btreemap, alloc, collatz, the stdlib and large-alloc guests each drop slightly. 64 and 128 measured worse on the recursion guest than 32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(spec): record recursion-guest rows without fast-mem The guest now accepts the Fibonacci inner proof at 67,622,320 rows, 513,456 over 2^26. Record the post-rebase rows, mark the target as unmet, and list cheaper sub-word memory as the lever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(inlines): keep the Blake2b word-packing helper out of the absorb inventory The Fiat-Shamir inventory scanner treats any call named `absorb*` as a transcript absorb site, so the Blake2b hasher's input-packing helper, named `absorb` by db157e75a, left fs_obligations failing on an unlisted site. It packs hash input into message words and touches no transcript; rename it `or_into_words` and drop its inventory entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(spec): record recursion-guest rows after merging main A fresh Fibonacci proof at this revision accepts at 78,896,208 rows (76,805,832 verification cycles), 11,787,344 over 2^26. Input mode accepts at 86,254,204 rows and the tampered opening proof is rejected after 60,145,138. The increase over 67,622,320 is in the Akita trace-batch opening's root fold under main's native trace batching (#2012); the guest still verifies through its prepared payloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): name jolt-sdk's akita feature when it breaks a provable host build jolt-sdk's `akita` feature compiles out the Dory host helpers, because jolt-prover's `akita` compiles out `jolt_prover::dory`. `#[jolt::provable]` still expanded calls to them, so any host build that unified the feature with a provable crate (`--all-features`, or the recursion example's `akita` alongside another example) failed with unresolved paths into the missing Dory API: six errors for the fibonacci guest alone. The macro now wraps its Dory prove and verify functions in `jolt::__dory_host_items!`. jolt-sdk passes them through, except with both `host` and `akita` enabled, where it replaces them with a single compile error that names the feature and points at `jolt::jolt_prover::akita`. Guest builds and tracing helpers are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(field): generalize sum_of_products4 to sum_of_products<K> Field::sum_of_products::<K> computes Σ_i Π_k terms[i][k] for any arity (an empty product is one). On a field-inline guest the kernel loads each term's K factors into the register file with K - 1 multiplies and reads the sum out once, as the four-factor kernel did. Akita's compression evaluation, its one caller, compiles to the same per-term sequence: the recursion guest accepts at 78,895,414 rows (was 78,896,208). sum_of_products4 forwards to it until the Akita companion calls sum_of_products; the repin that follows removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * build(akita): repin the companion and drop sum_of_products4 markos/recursion-integration now calls Field::sum_of_products directly (LayerZero-Labs/akita 38d8deb6, which also pins Jolt at e19eda725), so the four-factor forwarder has no caller left. The recursion guest accepts at 78,895,975 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(riscv): make flag_class name every row field The verifier's folded read-RAF evaluation reads each flag class's flags from one row, so a row field that a flag reads but flag_class omits breaks soundness, and the class test would not vary a new field. flag_class now destructures the row without `..`: adding a field to JoltInstructionRow fails to compile there until it is keyed or explicitly excluded. Flags starting to read the already excluded address or operands remain guarded only by flag_class_determines_read_raf_flag_terms. Guest rows are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): emit trapped stdout writes in one host call The trap handler answered write(2) to fds 1 and 2 by calling putchar per byte, one host print per byte. The tracer decodes each print as UTF-8, so every non-ASCII character reached the host as replacement characters: a std guest's `println!("σ→²")` printed seven U+FFFD. The shim intercepts these writes before ZeroOS's console, so it bypassed #1960's single-call fix for every std guest. It now calls __platform_stdout_write, the console's single-call path, which also covers a null or empty buffer. The comment notes that fds 1 and 2 reach the host even if the guest redirected them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(guests): document what std::time returns in a guest std guests' clock_gettime is answered by the runtime with a zero timestamp for every clock, so Instant::now and SystemTime::now succeed but never advance. The guest page now says so under Standard Library, the security model's no-clock rule links to it, and the recursion spec states what its trap shims return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(verifier): repin the ZK muldiv BlindFold shape at trace length 512 The jolt CLI's inline-store limits (83b94726f) compile the muldiv guest to fewer instructions, so it now runs in under 512 cycles and its padded trace length halves. The golden-shape audit pinned 1024, which failed CI's ZK job on every push since the branch could run CI again (from 179e7a605). With the CLI built without those two flags the old pins pass, so the change is the fixture, not the protocol. At 512 the BlindFold shape has 221 coefficient rows (was 227: one fewer committed round in each of six cycle sumchecks); the other counts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(field): bind the field-inline unit's modulus at guest boot jolt-field's guest kernels range-check readouts against the selected field's modulus, which assumes the tracer's field-inline unit computes in that field. Nothing checked it: a BN254-selected guest traced under the fp128 unit computed 3*5 in Fr as a wrong value that still read out canonically, and returned it without error. jolt_field::bind_field_inline_modulus accumulates the selected field's modulus into a cleared field register and asserts zero, proving that the unit's prime divides it and so equals it. jolt-sdk's std runtime calls it once from __platform_bootstrap, before main; it is a no-op without a selector. The same probe guest now fails at trace time ("FIELD_ASSERT_ZERO of nonzero field register 4"), and under the matching unit it returns the right product. Binding at boot keeps readouts free. Checking a static flag on every readout cost the recursion guest 2.33M rows; this path costs nothing measurable (78,892,856 rows, was 78,895,975). jolt-field has no no_std build, so its kernels only run in std guests, and jolt-sdk takes jolt-field under guest-std only, without its default BN254 field. Fr::MODULUS_LIMBS and Fp128::MODULUS_LIMBS match a16z/jolt#1995's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(field,poly): keep signed_sum's accumulator safe from its iterator - field_inline::signed_sum holds its partial sum in REG_ACC while it pulls terms, so an iterator that called dot (or any accumulating kernel) overwrote the sum. The accumulators are now marked lent until the readout; Fp128 dispatch then takes the software path for dot, dot_rows, weighted dot rows, sum_of_products, and a nested signed_sum. The guard costs about 9,000 rows on the recursion guest. - sparse_mle_msb advanced its index past the final block, which overflowed for a run ending at index u128::MAX; it now returns after the last block. * build(akita): repin to the reviewed LayerZero-Labs/akita#186-#190 The companion moves to recursion-integration 78d31e124: Akita main 401e7972 plus the review revisions of #186-#190. - jolt-akita's config presets follow main's RingDimensionSchedule (#192). - Akita's guest transcript is now spongefish's own Blake2b sponge over the inline digest adapter, so the jolt-akita test pinning the hand-written sponge and Blake2b::update_block_eager, which only that sponge used, are removed. - specs/recursion-guest.md records a fresh proof at 79,348,402 rows. * docs(recursion): record rows after merging main and the Akita review fixes …
Mirrors LayerZero-Labs#51 (originally opened by @RadNi), retargeted at
mainnow that the Akitae2c49edbump (#2006) has landed.Summary
Replace the selector-packed Akita trace polynomial with one native commitment group containing the actual trace columns. Every column has
log_T + log_Kvariables and opens at the same point; the prover and verifier share the canonical group claim. Native batching establishes first-fold cycle locality: each chunk owns the same cycle range across all trace columns.Later folds still halve one flat recursive witness, so boundary blocks and the tail can cross chunk owners from the second fold onward. Recursive ownership alignment is tracked separately in Akita #175, which is outside this PR's pinned revision. Adopting that change requires a later pin upgrade and regeneration of the affected Jolt multi-chunk catalogs.
Changes
Intentionally carry the Akita pin upgrade in this PR, from
e2c49ed450f1999a743e7fd4a648f230ce45472fto its immediate successor83574331d4e51f8cce1d8689d05592fa4ef4c138. The successor merges Akita #169, adding batched opening preparation and source evaluation, including batch-only source kernels; the fused trace opening uses this batch dispatch.Import lightweight column views over one shared trace owner. Fuse commitment, evaluation/folding, decomposition, and coefficient packing across columns while retaining the streaming kernels, rotations, SIMD paths, deferred reductions, and position tiling. Source coefficient materialization remains unavailable.
Remove trace selector reduction from stage 8, retain one trace commitment slot and one joint PCS proof, and keep auxiliary object layouts.
Carry the native group layout and actual polynomial count through setup and scheduling; retain K=16 production coverage plus explicit fixtures, and restrict native K=256 trace keys to the exact benchmark, cutover, advice, and forced-guest fixtures, and update layout digests and transcript domains. The ten checked-in catalogs contain 1,611 rows (1,548 one-hot and 63 dense), totaling 20,256,534 bytes. The updated base's one- and two-polynomial adapter/planner grids are retained alongside the native trace keys, including smaller multi-chunk arities. The generator and key-membership tests share the admitted keys. Shipped K=256 native trace keys provide fixture and benchmark coverage only; the scalar adapter/planner grid remains available. They do not provide a general production trace range. Other K=256 shapes require a deployment-owned catalog containing the exact shape; grouped setup rejects missing shapes with guidance to use production K=16 or supply that catalog.
Preserve the updated base's chunk-profile validation and transcript label, conservative dense producer catalogs, cross-profile advice commitment reuse, and grouped-planner diagnostic.
Use the checked-out SDK in both generated-project CI jobs so fork PR merge commits are not fetched from
a16z/jolt.Review follow-ups
RingVec, removing the intermediate per-column copies while preserving fused trace traversal and tiled accumulation.Akita; freeze the unchanged binary enum encoding. Retain terminology for actual auxiliary prefix layouts and coefficient packing, and mark historical format investigations explicitly.Testing
Post-review follow-up validation:
hostandhost,zk; Akita/field-inline/profiling/prover-fixtures/FS-audit Clippy; formatting and repository style checks.The exhaustive production-grid tests run real schedule adaptation per key. Local runtimes were 1.5 s for Single, 6.6 minutes for W8R2, 13.2 minutes for W4R2, and 20.7 minutes for W2R2.
Validation after merging base revision
45fc2e03a:hostandhost,zk; Akita/field-inline/prover-fixtures/FS-audit Clippy across adapter, prover, and verifier targets; formatting and repository style checks.Catalog freshness enforcement was run locally:
gen_jolt_schedules crates/jolt-akita/schedules k256 --checkreplanned all 12 rows across the four K=256 catalogs and reproduced every artifact byte for byte. A negative check against a stale temporarydense-fullcatalog rejected it withstale schedule artifacts, confirming content drift fails the check. A complete ten-catalog--checkreplan and CI enforcement remain follow-ups.Performance
Measured 2026-10-06 on an Apple M4 Max, 16 workers, 64 GiB RAM, macOS 26.5.2, Rust 1.95.0. Exact PR base
45fc2e03aversus headf00ec0b5c, including the intentional Akita pin upgrade. Both useci,akita,profiling, optimized backend, and tracing disabled. Three fresh-process samples per revision/case, alternating base/head, head/base, base/head; tables show medians. All 48 proofs passed both 16-worker and one-worker verification (96 successful calls); guest ELF hashes and raw trace lengths match across revisions.The level-3 witness growth is real: 2,514,944 → 8,831,232 coefficients (3.51×).
At the measured W8R2/2^24 shape, total proving changes by
+8.1%, peak RSS by +43.9%,
parallel verification by +51.7%, and single-threaded
verification by +74.2%. Its proof changes from
97,657 to 99,173 bytes.
The first recursive input shrinks while subsequent schedules change; the
level-3 ratio alone does not predict whole-proof time or process memory.
The measured W8R2/2^24 packing-versus-batching regression is tracked in Akita #191, related to the planner cost-model investigation in Akita #183. Both measured schedules have six recursive folds; native batching adds a second setup-prefix group and changes per-fold geometry. This is a suspected schedule-cost issue, not a demonstrated cheaper valid native schedule. Per-fold timing/allocation attribution and alternative-schedule benchmarks are needed to establish the cause and fix.
PCS setup is measured separately; it ranges from 20.9–203.1 ms at base and 88.2–2249.7 ms at head. Guest compilation, tracing, witness construction, catalog loading, and other preprocessing are outside the prove timer. RSS/footprint are process lifetime peaks. The host had about 8.94 GiB of swap in use, unchanged between the before/after readings; these are three-sample observations, not confidence intervals. Full ranges, setup timings, witness lengths, reproduction patches, and binary hashes are in the benchmark report, with all 48 individual samples in the CSV. Source snapshots, binaries, and process logs are retained under
benchmark-runs/pr51-performance-20261006/.Security Considerations
The common-point claim assembler checks canonical column order and arity. Batch construction checks shared trace ownership, dimensions, and source order. Native decomposition indexes challenges by column and block and aggregates by witness chunk. Existing verifier and tamper tests cover the changed opening statement; transcript domains and the trace layout digest change with the new geometry.
Breaking Changes
The obsolete Rust/textual config name
CommitmentConfig::PackedbecomesCommitmentConfig::Akita, and commitment-absorption helper names follow suit. The binary enum ordinal remains unchanged and is pinned by a wire-format test.Jolt Akita proof and preprocessing compatibility changes. Setup now uses the actual native column arity and count. The trace source API and grouped schedule parameters change accordingly; there is one current trace path without a packing/batching runtime switch.