refactor(zkvm): canonicalize PI transcript/opening flow via instance_value + PublicValues#1277
Open
refactor(zkvm): canonicalize PI transcript/opening flow via instance_value + PublicValues#1277
Conversation
Replace raw public-input transcript absorption with circuit-driven instance_value indexing in prover, native verifier, and recursion verifier. Also add instance_value tracking in ConstraintSystem::query_instance and fix mutability/borrow fallout in public-value query helpers and RAM table address setup.
313fbf3 to
d00c2aa
Compare
d00c2aa to
7099d2c
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.
This PR refactors how public inputs (PI) are represented and consumed across zkVM proving/verification so that PI handling is circuit-driven and consistent end-to-end.
Related to #1263.
Design rationale
Previously, PI transcript absorption and some verifier checks depended on broader/raw PI containers, which made ordering and indexing assumptions harder to audit and keep consistent across:
This PR moves PI consumption to a canonical, circuit-defined path:
instance_valuesdefines which scalar PI values a circuit observes (and in what order).instance_openingsdefines which PI MLE columns are opened.PublicValuesMLEs, rather than ad-hoc/raw vectors.This reduces ambiguity in PI ordering/indexing and aligns transcript-visible PI handling with circuit semantics.
soundness fix
This PR also fixed a soundness issue by removing
wit_in_evalsandfixed_in_evalsfrom the proof payload. Instead of trusting prover-supplied values for these evaluations, the verifier now deterministically derives them from the sumcheck evaluations during verification. This prevents a malicious prover from introducing mismatches between claimed eval vectors and the actual sumcheck-consistent values.