Skip to content

refactor: add precommitted polynomial reductions#17

Open
RadNi wants to merge 21 commits into
amir/bytecode-stack/01-stage6-splitfrom
amir/bytecode-stack/02-precommitted
Open

refactor: add precommitted polynomial reductions#17
RadNi wants to merge 21 commits into
amir/bytecode-stack/01-stage6-splitfrom
amir/bytecode-stack/02-precommitted

Conversation

@RadNi
Copy link
Copy Markdown

@RadNi RadNi commented May 21, 2026

Generated stack PR from amir/bytecode-commitment-merged.

Depends on spec PR: a16z#1565

Stack position: 02
Base branch: amir/bytecode-stack/01-stage6-split

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

This PR is expected to be updated manually when amir/bytecode-commitment-merged is resliced.

@github-actions
Copy link
Copy Markdown

Warning

This PR has more than 500 changed lines and does not include a spec.

Large features and architectural changes benefit from a spec-driven workflow.
See CONTRIBUTING.md for details on how to create a spec.

If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message.

@github-actions github-actions Bot added the no-spec PR has no spec file label May 21, 2026
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from d2b422b to b561ac0 Compare May 21, 2026 01:44
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 5386e59 to 4b2423f Compare May 21, 2026 01:44
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from b561ac0 to e528eda Compare May 21, 2026 01:51
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 4b2423f to 3de7f26 Compare May 21, 2026 01:51
@RadNi RadNi changed the title Add precommitted advice reductions [02/05] Add precommitted advice reductions May 21, 2026
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 3de7f26 to 5217190 Compare May 21, 2026 01:56
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from e528eda to be768fc Compare May 21, 2026 15:37
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 5217190 to 9e4300e Compare May 21, 2026 15:37
@RadNi RadNi changed the title [02/05] Add precommitted advice reductions [02/05] Add precommitted reductions May 21, 2026
@RadNi RadNi changed the title [02/05] Add precommitted reductions [02/05] Add precommitted polynomials reductions May 21, 2026
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from be768fc to 4624ea6 Compare May 21, 2026 18:02
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 9e4300e to e2c9276 Compare May 21, 2026 18:02
@RadNi RadNi marked this pull request as ready for review May 21, 2026 18:10
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e2c9276. Configure here.

Comment thread jolt-core/src/zkvm/prover.rs Outdated
match DoryGlobals::get_layout() {
DoryLayout::AddressMajor => OpeningPoint::<BIG_ENDIAN, F>::new(
[r_cycle_stage6.as_slice(), r_address_stage7.as_slice()].concat(),
),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AddressMajor opening order mismatch

High Severity

AddressMajor Stage-8 now constructs opening_point as [r_cycle || r_address], while earlier reduction claims (for RA polynomials) are still cached at [r_address || r_cycle]. With reorder_opening_point_for_layout removed from DoryCommitmentScheme, those claims are combined against a different point, so batched opening claims no longer correspond to committed polynomial evaluations.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e2c9276. Configure here.

@RadNi RadNi changed the title [02/05] Add precommitted polynomials reductions refactor: add precommitted polynomial reductions May 21, 2026
};

pub type JoltFieldWrapper = ArkFr;
type DenseTier1Setup = (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think we need to name this type

Comment thread jolt-core/src/zkvm/verifier.rs Outdated
candidates
}

fn stage8_opening_point(&self) -> Result<OpeningPoint<BIG_ENDIAN, F>, ProofVerifyError> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is almost identical to the stage8_opening_point in prover.rs. We should DRY into one function

@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch 2 times, most recently from d340832 to 6c29ef5 Compare May 22, 2026 17:30
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from 0eddf1c to 3e44c13 Compare May 22, 2026 17:30
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from a5ed82a to a6bfc73 Compare May 22, 2026 19:53
@RadNi RadNi force-pushed the amir/bytecode-stack/01-stage6-split branch from 3e44c13 to 4175c7a Compare May 25, 2026 18:46
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from 0f357e1 to 5ca9b21 Compare May 25, 2026 18:46
RadNi and others added 6 commits May 25, 2026 20:36
…rifier

Adopt embedded-main Dory scheduling with shared precommitted claim-reduction plumbing so stage 6/8 can handle dominant precommitted contexts consistently in both zk and non-zk flows.

Made-with: Cursor
(cherry picked from commit d7b160b)

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the precommitted scale when rebuilding advice claim-reduction state from bound coefficients so GPU cycle-phase handoff remains consistent across dummy rounds.

(cherry picked from commit e58c0df)
Compute the verifier advice equality evaluation in the same precommitted
opening order used by the prover, while keeping the cycle-phase skip scale
separate from the full address-phase scale.

Avoid reading Dory main_t when the precommitted schedule does not need it,
so unit tests that do not initialize Dory globals can still construct the
schedule.

(cherry picked from commit f19c179)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
RadNi and others added 15 commits May 25, 2026 20:36
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>
…tack

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Use the cycle/address ordering expected by the active Dory layout when the main trace domain anchors Stage 8, so precommitted advice openings verify in AddressMajor mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the PR 02 Stage 8 verifier fix byte-for-byte aligned with the final merged branch while preserving the AddressMajor advice proof fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use local type inference for the dense AddressMajor setup tuple to avoid carrying an intermediate-only alias.

Made-with: Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Move the common Stage 8 Dory opening-point selection into the commitment scheme module so prover and verifier use the same layout logic.

Made-with: Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Cache real cycle-phase opening points for precommitted advice reductions so verifier phase transitions reconstruct the address phase from accumulator state.

Made-with: Cursor

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>
@RadNi RadNi force-pushed the amir/bytecode-stack/02-precommitted branch from e0ed5d6 to c41f679 Compare May 26, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-spec PR has no spec file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants