Skip to content

[01/05] Split stage 6 sumchecks#1564

Closed
RadNi wants to merge 18 commits into
a16z:mainfrom
LayerZero-Research:amir/bytecode-stack/01-stage6-split
Closed

[01/05] Split stage 6 sumchecks#1564
RadNi wants to merge 18 commits into
a16z:mainfrom
LayerZero-Research:amir/bytecode-stack/01-stage6-split

Conversation

@RadNi
Copy link
Copy Markdown
Contributor

@RadNi RadNi commented May 21, 2026

Posted by Cursor assistant (model: GPT-5.5) on behalf of the user (Amirhossein Khajehpour) with approval.

Replacement for LayerZero-Research#16 so the first stack PR targets a16z/jolt:main directly.

Stack position: 01/05
Base branch: a16z/jolt:main
Source implementation reference: amir/bytecode-commitment-merged@a351d5078b83577db8f3264fa53dfaddcf5ed687

Owned paths:

specs/1344-committed-bytecode-program-image.md
jolt-core/src/subprotocols/booleanity.rs
jolt-core/src/subprotocols/mod.rs
jolt-core/src/poly/opening_proof.rs
jolt-core/src/zkvm/bytecode/read_raf_checking.rs
jolt-core/src/zkvm/proof_serialization.rs
jolt-core/src/zkvm/prover.rs
jolt-core/src/zkvm/verifier.rs
jolt-core/src/zkvm/transpilable_verifier.rs
jolt-core/src/zkvm/witness.rs
transpiler/src/symbolic_proof.rs

The stack plan is preserved in this PR description instead of being checked into the repository. The checked-in spec source of truth is specs/1344-committed-bytecode-program-image.md.

Committed Bytecode Stack Plan

Source implementation reference: amir/bytecode-commitment-merged@a351d5078b83577db8f3264fa53dfaddcf5ed687

Stack base: a16z/jolt:main

Goal: split the current committed bytecode/program-image branch into smaller stacked PRs while preserving the final behavior of the source branch.

Stack

Position Branch suffix Scope Depends on
00 stack-plan Stack plan plus the final committed-bytecode feature spec. a16z/jolt:main
01 stage6-split Split Stage 6 into Stage 6a/6b for bytecode read-RAF and booleanity. 00
02 precommitted Add shared precommitted scheduling, Dory embedding support, and advice reductions. 01
03 program-foundation Add committed program preprocessing plus standalone bytecode/program-image claim-reduction sumchecks. 02
04 bytecode-program-reduction Wire committed program reductions into Stage 6b/7/8 and the SDK/WASM/transpiler surfaces. 03
05 surface-docs Add book docs, examples, and final public-surface cleanup. 04

Slice Checklist

00: Stack Plan

Owned paths:

specs/1344-committed-bytecode-program-image.md

Checklist:

  • Create the stack base from the mirrored a16z/main branch.
  • Add the final committed-bytecode feature spec so reviewers can read the end-state design from the first PR.
  • Preserve this stack plan in the PR description, not as a checked-in repository file.
  • Do not include implementation code.

01: Stage 6 Split

Owned paths:

jolt-core/src/subprotocols/booleanity.rs
jolt-core/src/subprotocols/mod.rs
jolt-core/src/poly/opening_proof.rs
jolt-core/src/zkvm/bytecode/read_raf_checking.rs
jolt-core/src/zkvm/proof_serialization.rs
jolt-core/src/zkvm/prover.rs
jolt-core/src/zkvm/verifier.rs
jolt-core/src/zkvm/transpilable_verifier.rs
jolt-core/src/zkvm/witness.rs
transpiler/src/symbolic_proof.rs

Checklist:

  • Replace monolithic Stage 6 proof fields with stage6a_sumcheck_proof and stage6b_sumcheck_proof.
  • Split bytecode read-RAF into address and cycle phases.
  • Split booleanity into address and cycle phases.
  • Update prover, verifier, transpilable verifier, proof serialization, and BlindFold stage accounting.
  • Keep committed bytecode/program-image reductions out of scope.

02: Precommitted

Owned paths:

jolt-core/src/zkvm/claim_reductions/precommitted.rs
jolt-core/src/zkvm/claim_reductions/advice.rs
jolt-core/src/zkvm/claim_reductions/mod.rs
jolt-core/src/poly/commitment/dory/
jolt-core/src/poly/one_hot_polynomial.rs
jolt-core/src/poly/opening_proof.rs
jolt-core/src/poly/rlc_polynomial.rs
jolt-core/src/zkvm/prover.rs
jolt-core/src/zkvm/transpilable_verifier.rs
jolt-core/src/zkvm/verifier.rs

Checklist:

  • Add the shared precommitted scheduling abstraction.
  • Add Dory setup sizing and embedding support for precommitted polynomials.
  • Port trusted and untrusted advice reductions onto the shared precommitted flow.
  • Wire advice through Stage 6b, Stage 7, and Stage 8 as dense precommitted polynomials.
  • Derive the Stage 8 opening point according to the active Dory layout so AddressMajor advice openings verify.
  • Exclude BytecodeChunk, ProgramImageInit, and committed-program reductions.
  • Keep jolt-core/src/subprotocols/sumcheck.rs exactly equal to origin/main.

03: Program Foundation

Owned paths:

jolt-core/src/zkvm/program.rs
jolt-core/src/zkvm/bytecode/chunks.rs
jolt-core/src/zkvm/bytecode/mod.rs
jolt-core/src/zkvm/claim_reductions/bytecode.rs
jolt-core/src/zkvm/claim_reductions/program_image.rs
jolt-core/src/zkvm/claim_reductions/precommitted.rs
jolt-core/src/zkvm/claim_reductions/mod.rs
jolt-core/src/poly/opening_proof.rs
jolt-core/src/poly/rlc_polynomial.rs
jolt-core/src/zkvm/witness.rs
jolt-core/src/zkvm/proof_serialization.rs

Checklist:

  • Add ProgramMode and ProgramPreprocessing.
  • Add full and committed program preprocessing variants.
  • Add program metadata and verifier-facing committed preprocessing.
  • Add bytecode chunk coefficient construction and bytecode chunk commitments.
  • Add program-image commitment derivation.
  • Add committed preprocessing serialization and chunking validation.
  • Add standalone bytecode and program-image claim-reduction params/provers/verifiers.
  • Add supporting opening IDs, virtual/committed polynomial tags, and module exports needed by those reductions.
  • Keep committed-program reductions unthreaded from prover/verifier execution until PR 04.

04: Bytecode Program Reduction

Owned paths:

jolt-core/src/zkvm/claim_reductions/precommitted.rs
jolt-core/src/zkvm/claim_reductions/mod.rs
jolt-core/src/zkvm/bytecode/read_raf_checking.rs
jolt-core/src/zkvm/bytecode/mod.rs
jolt-core/src/zkvm/ram/mod.rs
jolt-core/src/zkvm/ram/val_check.rs
jolt-core/src/zkvm/claim_reductions/hamming_weight.rs
jolt-core/src/poly/opening_proof.rs
jolt-core/src/poly/commitment/dory/wrappers.rs
jolt-core/src/poly/rlc_polynomial.rs
jolt-core/src/utils/errors.rs
jolt-core/src/zkvm/config.rs
jolt-core/src/zkvm/mod.rs
jolt-core/src/zkvm/program.rs
jolt-core/src/zkvm/prover.rs
jolt-core/src/zkvm/transpilable_verifier.rs
jolt-core/src/zkvm/verifier.rs
jolt-core/src/zkvm/witness.rs
jolt-core/src/guest/prover.rs
jolt-core/src/guest/verifier.rs
jolt-core/benches/e2e_profiling.rs
jolt-sdk/macros/src/lib.rs
jolt-sdk/src/host_utils.rs
src/build_wasm.rs
transpiler/src/main.rs

Checklist:

  • Thread the PR 03 bytecode claim reduction over staged BytecodeValStage(i) values.
  • Thread the PR 03 program-image claim reduction over ProgramImageInitContributionRw.
  • Extend precommitted families with bytecode chunks and program image.
  • Wire committed reductions through Stage 6b and Stage 7.
  • Add committed bytecode chunks and program image to Stage 8 RLC construction.
  • Add verifier homomorphic commitment combination for committed bytecode/program-image openings.
  • Add committed opening IDs and coefficients for BlindFold.
  • Expose committed preprocessing and bytecode chunk-count configuration through SDK, guest, WASM, transpiler, profiling, and benchmark surfaces.
  • Add committed-program e2e coverage in standard and ZK modes.

05: Surface And Docs

Owned paths:

book/src/how/architecture/opening-proof.md
examples/fibonacci/src/main.rs
examples/muldiv/src/main.rs
jolt-core/src/poly/commitment/dory/mod.rs

Checklist:

  • Add committed-bytecode example paths.
  • Add book documentation for the committed-bytecode opening path.
  • Re-export final Dory opening proof hint surface needed by downstream callers.

Note

High Risk
High risk because it introduces a new polynomial commitment scheme and substantially refactors jolt-program’s instruction decoding/expansion and program-image building, which are correctness-critical for proof generation and verification.

Overview
Adds a new PCS implementation. Introduces crates/jolt-hyperkzg, implementing HyperKZG (Gemini-to-KZG reduction) with batch open/verify, error/types, benches, fuzz targets, and integration tests.

Refactors program image + expansion pipeline. jolt-program now builds programs using JoltInstructionProfile and stores expanded bytecode as JoltInstructionRow (not NormalizedInstruction), adds a serialization feature (enabled by default) gating serde/ark-serialize on trace types, and rewrites expansion to a two-phase recipe/materialization model with stricter allocator tracking (bitset, recursion-depth/capacity checks) and new error cases.

Updates RISC-V lookup-table integration and CI. jolt-lookup-tables switches to JoltInstructionRow/JoltInstructionRowData, enables jolt-riscv’s serialization feature, and test helpers are updated accordingly; CI now conditionally enables test-utils when present and runs tracer tests with --features test-utils.

Housekeeping. Bumps workflow typos action, updates dependencies (blake3, sysinfo, alloy crates, etc.), and updates README test command to cargo nextest run -p jolt-core --features host.

Reviewed by Cursor Bugbot for commit 4624ea6. Configure here.

Made with Cursor

RadNi and others added 18 commits May 20, 2026 10:49
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Update the stack spec to match the final branch slices, moved claim-reduction implementation scope, and expanded local CI coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the feature spec text to its original contents; only the stack plan should describe the updated PR split and local CI scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the stack plan focused on PR scope and ownership; verification details are tracked outside this spec.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use phase-specific stage6a/stage6b sumcheck params and proof wiring so zk transcript and constraints stay aligned after splitting stage6. This preserves the split design while fixing zk failures without introducing bytecode-commitment features.

Made-with: Cursor

(cherry picked from commit e9ec21c)

Co-authored-by: Amirhossein Khajehpour <khajepour.amirhossein@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added spec Tracking issue for a feature spec implementation PR contains implementation of a spec labels May 21, 2026
@RadNi RadNi closed this May 21, 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 Tracking issue for a feature spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants