refactor(ecc): soundness fix of wiring ecc evaluations to gkr-circuit#1300
Merged
kunxian-xia merged 3 commits intofeat/gkr_iop_modulefrom Apr 15, 2026
Merged
refactor(ecc): soundness fix of wiring ecc evaluations to gkr-circuit#1300kunxian-xia merged 3 commits intofeat/gkr_iop_modulefrom
kunxian-xia merged 3 commits intofeat/gkr_iop_modulefrom
Conversation
Use r as the first bound variable for x/y bridge points and as the last for slope points across CPU/GPU/verifier and recursion verifier. Also enforce explicit ECC bridge selectors in layer construction and keep shard RAM ECC selectors as dedicated Whole selectors.
19d9d34 to
41d300c
Compare
Require exact structural selector count for ShardRam (r,w,zero,ecc_x,ecc_y,ecc_s), assign ECC selector columns explicitly for all rows, and add the missing clippy allowance on MainSumcheckProver trait signature.
41d300c to
7720d94
Compare
Collaborator
|
I plan to merge this first and then review them in #1299. |
…l wiring (#1301) Refactor proof wiring to remove duplicated ECC preparation logic and simplify main-eval handling. This change centralizes shared helper logic in `scheme/utils`, unifies ECC prover inputs across CPU/GPU, and streamlines proof assembly order. We also removes `n_instance` from GKR main-eval wiring so main evaluations consistently use `witin + fixed + structural_witin`. ### change highlight - dedup: move shared helpers (`extract_ecc_quark_witness_inputs`, `derive_ecc_bridge_claims`, `split_rotation_evals`, `assign_group_evals`) into common utils - api cleanup: `EccQuarkProver::prove_ec_sum_quark` now takes `(cs, input)` and returns `Option<EccQuarkProof>` (no ECC path -> `None`) - prover flow cleanup: ECC witness extraction/prep removed from call sites; ECC proving triggered via unified API - ordering update: tower-related checks/wiring happen before ECC bridge usage; verifier side aligns with this order - gkr simplification: remove `n_instance` from layer/main-eval accounting and related offsets/assertions - net effect: less duplicated code, clearer ownership of ECC bridge data, and simpler main witness/eval wiring ### summary of proving flow (simplified ascii) build_main_witness -> generate_tower_witness -> prove_tower_relation -> prove_ecc_quark (optional, if ecc ops exist) -> prove_rotation (optional) -> prove_main_constraints (inject rotation/ecc bridge evals when present) -> open_pcs -> assemble_chip_proof
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.
Also related to #1294
A follow-up soundness PR after rotation-flow refactor, focused on ECC->GKR bridge wiring and selector semantics.
What changed (high level)
This PR hardens ECC bridge integration with GKR by making point-binding semantics explicit and consistent across:
It also tightens selector invariants in
ShardRamCircuitand layer construction.Proving-flow diagram (current)