Skip to content

refactor(akita)!: remove bytecode table chunking - #56

Closed
omibo wants to merge 1 commit into
mainfrom
omid/akita-single-bytecode
Closed

omibo wants to merge 1 commit into
mainfrom
omid/akita-single-bytecode

Conversation

@omibo

@omibo omibo commented Oct 9, 2026

Copy link
Copy Markdown

Summary

Akita now commits and opens the entire bytecode table as one polynomial group. This removes the bytecode partitioning inherited from Dory, whose commitment geometry can require splitting a bytecode table when it is larger than the execution trace. Akita already supports separate group geometries, so the bytecode group can exceed the trace arity. Dory retains its existing bytecode chunking.

The implementation and protocol rationale are documented in specs/akita-single-bytecode-object.md.

Changes

  • Replace Akita's indexed bytecode groups, chunk-count parameters, commitments, and claim vectors with a single ProgramBytecode object and scalar claim reductions.
  • Carry the whole-bytecode geometry through preprocessing, witness construction, the shared claim relations, and prover/verifier stages 0 and 6b–8. Validate group and schedule capacity before allocating the dense object.
  • Introduce Akita preprocessing digest domains for the new layout and update transcript inventories, tampering coverage, and serialization tests.
  • Preserve Dory chunking, its digest vectors, internal bytecode address decomposition, and Akita's Single/Two/Four/Eight response profiles.

Testing

  • Ran affected claims, kernels, prover, verifier, and Akita schedule tests.
  • All six guest acceptance matrices passed: ordinary and field-inline profiles, each in clear, ZK, and Akita modes.
  • Committed-bytecode proofs passed with bytecode arity larger than trace arity, all four Akita response profiles, serialized preprocessing/proof round trips, and claim/phase tampering rejection.
  • Dory committed-program fixtures, BlindFold checks, frozen digest vectors, and the frozen Fiat–Shamir inventory passed.
  • Both required full-workspace Clippy commands passed with host and host,zk; affected Akita targets also passed Clippy with and without field-inline.
  • cargo fmt, repository style invariants, and git diff --check passed.

Full crate suites remain for CI. Performance has not been benchmarked; this PR makes no speedup claim.

Security Considerations

The bytecode opening still uses the canonical shared claim relations and geometry. The verifier checks the single named bytecode commitment, scalar claim, and expected cycle/address phase state. Group capacity is checked before dense materialization. Updated transcript domain separation prevents old Akita preprocessing from being reused with the new object layout. Tests cover altered bytecode claims and malformed phase states, and the changed transcript absorption inventory was reviewed and checked without snapshot blessing.

Breaking Changes

All existing Akita preprocessing and proofs must be regenerated, including full-program proofs. Akita committed-program APIs no longer accept a bytecode chunk count, and their serialized commitments and claim carriers change. Dory's bytecode chunking and preprocessing digest domains are preserved.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

📏 PR diff

Note

Actual code changed: 1,332 lines

🟢 +844 added    🔴 −488 removed

Tests, docs, fixtures, and helper scripts excluded.

Category 🟢 Added 🔴 Removed
⌨️ Actual code +844 −488
🧪 Tests +248 −168
📚 Docs +542 −98
📦 Fixtures 0 0
🔧 Helper scripts 0 0
Total diff +1,634 −754

Every changed line is classified once.

@github-actions github-actions Bot added spec PR contains a spec implementation PR contains implementation of a spec labels Oct 9, 2026
@omibo omibo changed the title Remove bytecode table chunking from Akita refactor(akita)!: remove bytecode table chunking Oct 9, 2026
@omibo omibo closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

implementation PR contains implementation of a spec spec PR contains a spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant