Skip to content

docs: add akita lattice specs#1606

Open
markosg04 wants to merge 19 commits into
prover-stack/10-jolt-proverfrom
prover-stack/11-akita-specs
Open

docs: add akita lattice specs#1606
markosg04 wants to merge 19 commits into
prover-stack/10-jolt-proverfrom
prover-stack/11-akita-specs

Conversation

@markosg04

@markosg04 markosg04 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Part of the draft Jolt prover stack.

Base: prover-stack/10-jolt-prover
Head: prover-stack/11-akita-specs

Adds the AKITA lattice specification stack under specs/akita/.

Validation before submission:

  • cargo fmt -q -- --check
  • cargo metadata --no-deps --format-version 1
  • local gh stack push simulation against a temporary bare remote
  • forbidden-path scan for handoffs/, old STACK.md, stack/, and old stack workflow

@github-actions github-actions Bot added the spec Tracking issue for a feature spec label Jun 9, 2026
@markosg04 markosg04 changed the title docs: add AKITA lattice specs docs: add akita lattice specs Jun 9, 2026
@moodlezoup moodlezoup force-pushed the prover-stack/10-jolt-prover branch from 068b024 to 240e724 Compare June 12, 2026 18:53
markosg04 and others added 6 commits June 17, 2026 00:29
- impl_inline_instruction: accept cfg attrs from for_each_instruction_kind
- jolt-riscv: restore trace_row module/exports, from_bits, thiserror dep
  (accidentally dropped while rebasing onto JoltTraceRow foundation)
- jolt-riscv: drop dead test-utils feature and unused rand dep (machete)
- jolt-sdk/macros: restore committed-bytecode preprocessing from main,
  re-apply field-inline hook additively
- tracer/cpu: restore interrupt_enabled match from main
- guests: declare field-inline feature (silences unexpected_cfgs)
- jolt-lookup-tables prefixes: lint-clean ported prefix_mle code
  (unwrap_or defaults, let-else, redundant else, unreachable!)
- taplo fmt
Remove prefix_mle and update_prefix_checkpoint from SparseDensePrefix,
the Prefixes dispatch, and all 40 prefix implementations, along with the
Option-based PrefixCheckpoint alias. Prefixes are now computed solely via
per-phase materialization: evaluate() at binary points builds a dense
table at phase start, the table is bound during the phase's sumcheck
rounds, and the fully bound value becomes the next phase's checkpoint.

Rewrite prefix_suffix_test to exercise that flow end-to-end: materialize,
bind HighToLow with random challenges, check combine(prefixes, suffixes)
against the table MLE every round at c in {0,2}, chain checkpoints from
bound values, and compare the final claim against evaluate_mle over the
full 128-variable point, for both RPP=16 and RPP=8 prover configs.
- Decode FIELD_ASSERT_EQ with rd:None to match the tracer shape and avoid the
  rd=x0 virtual-register rewrite (bytecode/trace operand divergence).
- Add FIELD_STORE_TO_X to field_inline_handles_rd_zero so store-to-x0 stays a
  legal no-op instead of producing an out-of-range x-register.
- Reject out-of-range field-register indices in the emulator (was silently
  clamping, hiding fr16-31 misuse until proving).
- Deduplicate the operand-shape match: expose field_inline_operand_shape_for_op
  in jolt-riscv; jolt-program and the tracer x_register_role delegate to it.
- Replace the duplicated &TraceRow JoltCycle impl with a blanket impl for &T.
- Delete the orphaned tracer inline_helpers.rs (undeclared, dead InstrAssembler).
- Drop the unused centralized LookupTables::required_prefixes table.
- Document the inv(0) and store-to-x truncation trace contracts.
- Enforce the FieldRegister bound on deserialize via a real Valid::check and
  re-run FieldInlineBytecodeMetadata::validate() on the deserialize path.
- Fix OwnedTrace::next_row so the field-inline feature actually compiles
  (TraceRow is not Copy under field-inline).
The field-inline feature is not part of host/zk/default, so no existing CI
job compiled or tested it — the feature could regress while CI stayed green.
Add an explicit clippy invocation and a nextest run over the crates that
define it (tracer, jolt-program, jolt-riscv, jolt-lookup-tables).
@0xAndoroid 0xAndoroid force-pushed the prover-stack/10-jolt-prover branch from 2fa6989 to eaa8020 Compare June 17, 2026 05:50
@0xAndoroid

0xAndoroid commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Stack maintenance — Pika is rebasing this PR onto #1605 (prover-stack/10-jolt-prover) and fixing CI as part of the prover stack (#1596#1606). Rebase + CI summary to follow.

@0xAndoroid 0xAndoroid force-pushed the prover-stack/11-akita-specs branch from f28e02b to ea30d97 Compare June 17, 2026 06:17
@0xAndoroid 0xAndoroid marked this pull request as ready for review June 17, 2026 06:20
@0xAndoroid 0xAndoroid added the claude-review-request Request a review from Claude Code label Jun 17, 2026
@0xAndoroid

0xAndoroid commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Stack maintenance — rebased onto #1605 (prover-stack/10-jolt-prover); CI green. Ready for review.

📚 Stack A: #1596#1597#1598#1599#1600#1601#1602#1603
📚 Stack B: #1596#1597#1604#1605#1606 (this PR)

#1596 and #1597 are shared by both stacks; each PR targets the one before it.

Conflict resolution

  • crates/jolt-claims/src/protocols/jolt/formulas/{bytecode.rs,claim_reductions/advice.rs,error.rs} and crates/jolt-claims/src/protocols/jolt/ids.rs — skipped the duplicate already-applied feat: extend Jolt claim protocol formulas #1597 formula commit instead of reapplying conflicting foundation changes.
  • crates/jolt-poly/src/{dense.rs,eq.rs,lagrange.rs} and crates/jolt-transcript/** — skipped the duplicate already-applied R1CS/transcript foundation commit.
  • crates/jolt-claims/src/protocols/dory_assist/formulas/miller_loop.rs, crates/jolt-dory/src/{streaming.rs,types.rs}, crates/jolt-verifier/** — skipped the duplicate already-applied PCS-assist/verifier foundation commit.
  • Cargo.lock, crates/jolt-backends/**, crates/jolt-prover/** — skipped the duplicate already-applied feat: add Jolt prover and CPU backend #1605 prover/backend commit.
  • specs/akita/*.md — applied the AKITA lattice spec docs cleanly on top of feat: add Jolt prover and CPU backend #1605.

Local validation

  • cargo fmt -q
  • cargo clippy --all --features host -q --all-targets -- -D warnings
  • cargo clippy --all --features host,zk -q --all-targets -- -D warnings
  • cargo build -q
  • cargo nextest run -p jolt-core muldiv --cargo-quiet --features host
  • cargo nextest run -p jolt-core muldiv --cargo-quiet --features host,zk

@github-actions

Copy link
Copy Markdown
Contributor

Claude code review session started: https://claude.ai/code/session_01MvcVGF1XTpcLKwLNQFxwAE

@moodlezoup moodlezoup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-only PR adding the AKITA lattice PCS spec stack (specs/akita/0007). Read all eight specs end to end. The design is internally consistent — the cell-count/dimension math agrees across 00, 03, and 05 (23 byte facts → 5888 cells/row → n+13; fused increments 7938 → n+13; split 9988 → n+14), the masked-view soundness distinction (RamInc(r) != StoreFlag(r)·SignedInc(r), requiring a row-summed translation relation) is correctly identified and carried through 04/05, and the Store·RdPresent = 0 disjointness for AMO/RMW is explicitly flagged for audit rather than assumed. No soundness or correctness blockers at the spec level. Two small clarifications inline (identifier naming, claim-field injectivity); the rest is appropriately deferred to the Questions sections.


Generated by Claude Code


```text
1. collect enabled fact families from verifier config.
2. sort by stable PackedFamilyId.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two names are used for the family identifier: PackedFamilyId here (and in the jolt-claims implementation plan at line 284) versus FactId in the FactFamily struct (line 313), the planner (sort families by FactId, line 346), and the streaming source (line 402). 04 and the invariants then refer to "fact family ordering." Pick one name so the sort key and the struct field are unambiguous for whoever implements the layout — the ordering invariant is load-bearing (it drives offsets and the digest), so the identity of the key shouldn't be guessable.


Generated by Claude Code

to_akita_claim(F_jolt) -> F_akita

Required:
injective over all values that appear in claims.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "injective over all values that appear in claims" contract is only meaningful once the claim field is pinned down. Sumcheck opening claims range over the full Jolt scalar field (BN254 Fr, ~254 bits), so injectivity forces |F_akita| >= |Fr|. That's automatic in base-field mode (identity), but it rules out any "claim field" smaller than Fr — which is the usual reason a lattice PCS wants a small base ring. Worth stating explicitly as an invariant here (claim field must embed all of Fr) so the extension-field mode in 02-Q1 doesn't accidentally pick a lossy conversion. Otherwise it reduces to the "implicit modular reduction" case this section already rejects.


Generated by Claude Code

moodlezoup and others added 9 commits June 17, 2026 08:54
Introduce the jolt-witness crate: the witness-generation layer producing
committed and virtual polynomials for the Jolt VM, dory-assist, wrapper, and
blindfold protocols.

Consolidates follow-up refactors:
- Split the jolt_vm witness module by stage and polynomial family
  (spartan_outer, stage2/3/6, registers, ra, ram, trace, streams, provider).
- Share require_unique_ids / power_of_two_log_rows helpers across the wrapper
  and dory_assist providers via protocols/util.rs.
- Tighten the core witness data-access API: log_rows-only WitnessDimensions,
  ViewRequirement-based oracle_view, and removal of dead encodings, policies,
  and builder indirection.
- Document the core witness vocabulary types.
- Restore the 1604 workspace build.
Mechanical adaptation to the prover-stack/09-jolt-witness API tightening:

- WitnessDimensions::new takes only log_rows; .dimensions.rows is now the
  derived rows() method.
- OracleViewRequest was folded into ViewRequirement: oracle_view /
  try_evaluate_oracle_view take the requirement directly.
- try_collect_ra_family_cycle_indices moved to the RaFamilyCycleIndexSource
  capability trait: bound added on collect_ra_cycle_indices, the
  materialize_sumcheck_ra_pushforward / stage7_hamming_state trait methods and
  their cpu impls, plus an empty impl for the RaPushforwardTestWitness mock.
- WitnessBuilder was removed: the e2e harnesses construct
  TraceBackedJoltVmWitness::new(config, inputs) directly.

Verified: jolt-backends + jolt-witness compile clean and pass 114/114 tests.
jolt-prover's adaptation is compile-blocked by pre-existing tracer and
jolt-blindfold breakage on this branch (unrelated to these changes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
crates/jolt-riscv/src/trace_row.rs existed in the tree but was never declared in lib.rs, leaving tracer's trace_row consumer with unresolvable imports. Declare and re-export the module, add the from_bits flag-set constructors it needs, and add the missing thiserror dependencies to jolt-riscv and tracer (ported from prover-stack/01-field-inline-tracing, identical to main). Update jolt-sdk's provable macro to the current preprocessing API (also from prover-stack/01). Adapt jolt-blindfold's protocol.rs, which called build_with_sources as a method while this crate defines the identical function as a free function in r1cs.rs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Finishes the adaptation to the jolt-witness RA fast-path capability trait: the bound is threaded through stage 7's hamming-state preparation and the prover/api entry-point witness bound chains.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These paths compile (and therefore lint) for the first time now that the stack builds end to end: discard the unit results of rayon::join in the cpu RA table scaling, collapse nine interrupt-mask match arms into pattern guards in the emulator, and drop a clone of the now-Copy ViewRequirement in stage 6 batching.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-review-request Request a review from Claude Code spec Tracking issue for a feature spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants