Repository navigation
Conversation
Akita main (includes LayerZero-Labs/akita#37): akita-transcript on spongefish 0.7.4 rev ef974134 (u64 squeeze counters, pointer-width independent challenges). One workspace spongefish source; jolt-poly joins the a16z/jolt path patch because akita now depends on it via git.
akita db5efa20 (akita#37) replaces the typed batched proof and its transcript with Spongefish argument bytes keyed by a session label, moves the CPU prover behind an owning CpuBackend with CommitmentHandles, and verifies through AkitaVerifier. Bridge Jolt's statement-bound challenge into the session bytes, commit via CpuBackend::import_source/commit, keep the retained source in the handle instead of a second copy in the hint, cache prepared AkitaVerifiers per flavor, and port TracePackedOneHot to the akita_pcs::custom_source contracts. The proof-shape guard goes away with the structured proof layer; only the commitment payload guard remains.
The akita_prover groups commit through CpuBackend::commit and prove to Spongefish argument bytes; sources are imported once outside the timed region. akita-prover and akita-transcript are no longer direct dependencies of jolt-dory.
cargo metadata per sub-workspace; no wholesale update.
akita#37 changed the planner policy identity (cost model NativeNoncePayloadAndSetupEnvelopeV2, selection objectives V5/V6), so the checked-in .aks envelopes no longer pass the policy-digest check. Rows: k16 46 (37 changed), k256 64 (38 changed), dense 42 (40 changed); no rows added or removed, and the direct/offloaded cutover is unchanged.
An Akita CommitmentHandle proves only on the CpuBackend that committed it, and advice / committed-program objects are committed on their own transparent setups' dense backends. Import each precommitted handle into the trace one-hot backend before the grouped batched_prove; Akita recomputes the dense commitment from the retained source and checks it against the shared public matrix. The trailing-garbage fold_paths test now expects Akita's own EOF rejection (VerificationFailed) since the adapter no longer deserializes the proof.
a16z#1941 rewrote the K<D commit accumulate on digit windows and added a streamed-vs-materialized commit test built on akita-internal hooks (compile_commitment_request, ComputeBackendSetup::prepare_setup, commit_resolved_inner_host) that db5efa20 keeps crate-private or dropped. commit_packed now takes the expanded setup directly, and the test's oracle is the single-digit inner map over Akita's canonical one-hot table.
… bridged_akita_session
… independent challenges)
📏 PR diffNote Actual code changed: 548 lines🟢 +351 added 🔴 −197 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 (548 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. |
RadNi
force-pushed
the
amir/akita-batch
branch
2 times, most recently
from
October 6, 2026 20:54
1ef80d5 to
2e3ed2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Trace one-hot commitment repeatedly prepares the same setup-matrix A entries across trace blocks. Share A preparation within bounded block groups and use canonical 16-bit paired digit tables for K16 accumulation. On Apple M4 Max, the latest SHA2-chain K16/D512 trace-2^28 comparison reduced commitment time from 40.18 s to 35.13 s (12.6%) and total proving time from 163.08 s to 156.48 s (4.1%). Opening time increased from 17.98 s to 18.45 s (2.6%).
These current measurements use one fresh baseline run and the best unsampled verified candidate run; they are not a repeated-run statistical estimate. The requested 30% commitment reduction has not been demonstrated. The older multi-scale sweep below measures an earlier snapshot with different profile selection.
Changes
Current K16 measurements
SHA2-chain, trace length 2^28 (268,435,456 rows), K16/D512, 57 columns, 128 trace blocks, n_a=1, and 65,536 A positions per block. Apple M4 Max, 64 GiB RAM, release builds with identical
akita,profilingfeatures and schedules, 16 prover workers.Baseline: target
eca990e4f6d795df946190d0f18ce3d5573b37a0, freshly rerun with the saved baseline binary. Optimized: selectedcandidate-u16binary; final source at167e24f95af88712f11a7d573cf4a1ae1ca66467differs from the benchmarked patch only by a private-method/test rename and discarding a test-only return value for linting.Both runs passed parallel and single-worker verification. Serialized proof size was unchanged at 98,070 bytes. Commitment and opening use the same span definitions as the historical table below; total proving excludes guest tracing and PCS setup.
Measurement caveat: one fresh baseline run is compared with the best unsampled verified run of the selected candidate. This does not establish a repeated-run average or a 30% commitment reduction. The earlier 46.95 s baseline would imply 25.2%, but the fresh measured baseline gives 12.6%, which is the comparison reported here.
Baseline binary SHA-256:
00c8410237375843fb687074687bbe764ad92d4f74686fdd63c7c1ecac6eeaa0. Candidate binary SHA-256:b27ed2dab2c450306eaf5c8d6f24e8b4dc5fda457b4b923f4958b8ba868d593f. Raw samples and consolidated results are retained locally inbenchmark-runs/akita-k16-block-groups-20261004/.Historical measurements (earlier snapshot)
Benchmark provenance: the tables below measure the original patch on
amir/akita-batchat2f48e7fad, which used four-coefficient tiles on ARM. Before publishing, this single optimization commit was transplanted onto the current targeteca990e4f6d795df946190d0f18ce3d5573b37a0, preserving that target's eight-coefficient ARM tile and expanded K16 schedules. The rebased PR head is validated separately below; these historical benchmark numbers are not measurements of the rebased head. Its timing and profile selection need a fresh benchmark before extrapolating these gains to the latest target.Baseline:
amir/akita-batchat2f48e7fad7b7f4d911bd73c2f23234ce185747f7. Akita dependency:83574331d4e51f8cce1d8689d05592fa4ef4c138.Apple M4 Max, 64 GiB RAM, release builds with identical
akita,profilingfeatures and schedules, 16 prover workers. Sequential paired runs alternated version order each repetition. Four runs per version and scale (56 proofs total); discard minimum/maximum independently for every metric and average the middle two. All 56 proofs verified with both 16-worker and single-worker verification (112 successful verification checks).Arrows mean baseline → optimized. Commitment is
akita_main_commit_with_precommitted, opening isakita_main_batched_prove, and prove time is the full root prover span, excluding guest tracing and PCS setup. Times are seconds; verification times are milliseconds. Proof bytes are the complete serialized Jolt proof size, unchanged between versions at every scale.Verification time (milliseconds). Parallel verification uses 16 workers; single verification uses one.
Prover process memory in GiB. Commit/opening RSS is the peak sample during stages 0/8, sampled every 100 ms and including live trace/witness storage.
The branch's selected profile is K256/D512 at scales 28, 26, and 25; K256/D256 at scale 27; and K16/D512 at scales 24, 23, and 22. Memory is sampled process RSS during stages 0/8 every 100 ms, including live trace/witness storage; lifetime RSS and physical-footprint peaks are also reported above. Memory samples vary with macOS compression, so timing gains should not be interpreted as a general memory reduction.
The local audit checked all 56 unique sample identities, matching binary/source/schedule identities and trace geometry, and independently recomputed every trimmed mean. It found no suspension-sized gaps in the accepted runs. Stale-build and superseded scalar-shortcut diagnostic candidates were excluded. Raw samples, summaries, Chrome traces, build identities and the consolidated report are retained locally under
benchmark-runs/akita-shared-a-batch-20261003/; benchmark binaries and trace artifacts are not committed.Testing
The checks below were rerun after transplanting the patch onto
eca990e4fand preserving the current ARM tile. The full benchmark sweep belongs to the original snapshot described above.cargo nextest run -p jolt-akita --cargo-quiet— 85 passed, 0 failed, 0 skipped.cargo clippy -p jolt-akita --all-targets -q -- -D warnings.cargo clippy --all --features host -q --all-targets -- -D warnings.cargo clippy --all --features host,zk -q --all-targets -- -D warnings.cargo fmt -qandgit diff --check.Security Considerations
The change reorganizes prover-side evaluation of the same commitment; verifier relations, transcript absorption, proof encoding, setup parameters, and commitment output ordering are unchanged. Canonical negacyclic digits preserve field negation, and the existing wide-accumulation bound is carried across tile boundaries and enforced before accumulation. Materialized/algebraic tests check commitment values independently of the optimized kernel, and every benchmark proof passed both verifiers.
Breaking Changes
None.