Repository navigation
Conversation
📏 PR diffNote Actual code changed: 1,246 lines🟢 +699 added 🔴 −547 removed Tests, docs, fixtures, and helper scripts excluded.
Every changed line is classified once. |
|
Warning This PR has more than 500 changed lines of actual code (857 added+removed; tests, docs, fixtures, and helper scripts are excluded) and does not include a spec. Large features and architectural changes benefit from a spec-driven workflow. If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message. |
2f48e7f to
4b9ff2f
Compare
0e7f486 to
9aa1f8c
Compare
4b9ff2f to
eca990e
Compare
|
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 |
quangvdao
left a comment
There was a problem hiding this comment.
Re-reviewed at efee957d7a. The switch to native column batching looks sound to me and I have no blocking findings. Follow-ups below.
Since my comment at eca990e4f6
- Addressed: the 64-column limit has a single owner with a test, and the K256 grid is pruned.
- Mostly addressed: the stale "packed" naming (some strings and
specs/akita-optimal-committed-data.md:283-301remain). - Partly addressed: catalog drift.
gen_jolt_schedules --checkexists, but nothing runs it. - Still open: the per-column buffer copies (
opening.rs:276,traversal.rs:346,commit.rs:299), and some test gaps (below).
Soundness of the switch (traced)
- Prover and verifier share the claim assembler (
crates/jolt-verifier/src/stages/stage8/akita.rs:379); column order comes from the plan and is bound into the layout digest. - Every column needs exactly one leaf claim and the point arity is checked.
- Commitment, point and all M evaluations are absorbed before Akita's challenges are derived (
crates/jolt-akita/src/native_batching.rs:154-199). - The
!is a real proof and setup break; I found no stale fixtures, zk+akita is still a compile error, and non-akita builds are untouched.
Findings
-
Description vs what lands. The description says packing forces cross-chunk transfers from the second fold onward and motivates the PR with that. As I read the code, and as
specs/akita-native-trace-batching.md:72-76,179says, this PR makes the first fold chunk-local; the recursive witness is still one flat polynomial halved again, so the boundary block and the tail still cross owners from the second fold on. That is fine as a step, but the title/description should say so and link the follow-up. -
No performance numbers in the PR. I measured on a 16-core M-series machine (
ciprofile, three alternating runs each, with other builds running, so treat as rough):Workload Base prove (s) Head prove (s) Peak RSS fibonacci 2^18 1.31–1.37 0.89–0.90 +8% fibonacci 2^20 4.53–4.67 4.59–4.97 +8% sha2-chain 2^20 4.37–4.43 4.38–4.48 +8% sha2-chain 2^22 16.34–16.71 16.14–16.22 −4% So prover time holds, with a 7–9% peak-memory rise up to 2^20 that is worth a line. Verifier time, proof size and multi-chunk configurations are unmeasured; the catalog shows a 3.5× larger level-3 witness for the w8r2 row at log_T=24, which I would like to see measured.
-
Catalog regeneration is not enforced. No CI job or test runs
--check, and the remaining test compares keys only.gen_jolt_schedules … k256 --checkreproduces all four artifacts byte for byte; I did not finish the K16 and dense catalogs. -
Akita pin. Head pins
83574331d4, one commit past #52'se2c49ed. Is that intended to ride here, or should #52 carry it? -
crates/jolt-akita/src/schedule_registry.rs:193: the full-width rejection lost its only test. -
Field-inline provisioning is tested at width 51 only (19 of 266 K16 keys). Not a known failure, a coverage gap.
-
K=256 traces are now provisionable for fixture shapes only.
-
trace_onehot/kernels.rs:82: the single-source kernel computes all M columns and discards all but one. Dormant at the current pin.
Test gaps
- No
jolt-akita-level test that a swapped evaluation or a permuted column order is rejected. - No test of
OpeningFoldPlan::Subfield. - No second-fold locality test (relevant once the follow-up lands).
Ran
cargo nextest run --cargo-profile ci -p jolt-akita -p jolt-claims: 303 pass.-p jolt-akita --features field-inline: 92 pass.-p jolt-prover --features akita,prover-fixtures: 31 pass, 2 skipped, including the Akita end-to-end prove/verify tests.
Not run: field-inline end to end, the full catalog --check.
|
@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: |
45fc2e0 to
e2ba202
Compare
201e9b4 to
1ef80d5
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
1ef80d5 to
2e3ed2f
Compare
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.