Skip to content

refactor(zkvm): canonicalize PI transcript/opening flow via instance_value + PublicValues#1277

Open
hero78119 wants to merge 5 commits intomasterfrom
feat/pi_observe
Open

refactor(zkvm): canonicalize PI transcript/opening flow via instance_value + PublicValues#1277
hero78119 wants to merge 5 commits intomasterfrom
feat/pi_observe

Conversation

@hero78119
Copy link
Collaborator

@hero78119 hero78119 commented Mar 25, 2026

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:

  • prover
  • rust verifier
  • recursion verifier.

This PR moves PI consumption to a canonical, circuit-defined path:

  • instance_values defines which scalar PI values a circuit observes (and in what order).
  • instance_openings defines which PI MLE columns are opened.
  • PI openings are derived from PublicValues MLEs, 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_evals and fixed_in_evals from 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.

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.
@hero78119 hero78119 changed the title refactor: use instance_value-indexed PI evals in zkvm transcripts refactor(zkvm): canonicalize PI transcript/opening flow via instance_value + PublicValues Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant