Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Architecture changeFrom Experimental. The page goes away when the pull request closes. |
079e734 to
313f1da
Compare
A decryption's T + 1 C6 proofs now run in one Chonk stack instead of a sequential c6_fold chain. c6_chonk_app verifies every C6 proof, checks they share the first leaf's domain and places their sk, esm, ct and d commitments by slot; c6_chonk_tube verifies the stack as a rollup proof and c6_chonk_root closes its IPA claim. A root rollup closes exactly two claims, so the root takes the tube twice under the tube key. decryption_aggregator verifies c6_chonk_root and binds the anchored C6 tree hash to hash(root key, key-list hash). The C6 tree is now hash(c6_chonk_root, c6 chain); its anchor keeps the retired c6_fold artifact path. CircuitName gains six C6 Chonk variants; C6Fold and C6FoldKernel stay as retired variants so stored encodings keep their indices. Split from #2398.
The C6 chain and the nodes fold no longer fold one leaf per step, so the Rust sequential_fold driver and the Noir sequential_fold_vk_hash have no callers.
C6 over Chonk replaces two anchor keys (c6_fold, c6_fold_kernel) with six (the tube, the root and four stack keys), so the build test seeds 27 keys and the manifest holds 45 files.
The retired c6_fold circuit no longer builds, so the immediate-key check read a file that does not exist. Also drop the C6 fold wording from the BfvDecryptionVerifier docs.
The C6 tree anchor keeps the `c6_fold` path, but `c6_fold` holds no circuit now, so `discover` no longer lists it. `hydrate` and `stage_bin` placed anchors with the circuits they walk, so `--hydrate-bin-only` and `--skip-if-built` left `circuits/bin` without `c6_fold.vk_tree_hash` (or with a stale one), and a staged pair had none. - Place both anchors by name in `refresh_anchors`, `hydrate`, `stage_bin` and `bin_markers`. - Cover the C6 anchor in the staging test.
C6 no longer folds sequentially: its Chonk stages append key hashes and `c6_chonk_root` hashes the list.
Prettier wraps prose at the column the previous commit missed.
313f1da to
bd74ce4
Compare
The C6 anchor equality with the key-list hash fails as an unsolvable program, because the failing opcode carries no assertion payload; the other rejection cases fail as a failed assertion. Both mean that the witness breaks a circuit constraint.
What and why
Split from #2398 (Zara's work). Stacked on #2531 (
large/nodes-fold-three); review that one first.A decryption aggregated its T + 1 C6 proofs (one per selected member) with a sequential fold: one
recursive proof per leaf. This aggregates them with Chonk instead, in one stack.
c6_chonk_appverifies all T + 1 C6 proofs, checks they share the first leaf's domain, and placestheir sk, esm, ct and d commitments by slot (
lib::math::c6_chonk_rows), then the init, tail andhiding kernels close the stack. T + 1 must stay within the stack's ECCVM bound (24 C3-sized
proofs). Slot indices are private witnesses; two leaves cannot share a slot, and every slot must
be written, so the ciphertext commitment is bound in all of them.
c6_chonk_tubeverifies the stack's Chonk proof as a rollup proof, andc6_chonk_rootcloses itsIPA claim. A root rollup closes exactly two claims, so the root takes the tube twice under the
tube key and states only the first; the final IPA check fails unless both are valid. The root
exposes the hash of the tube's seven key hashes (its own, the tube, the hiding kernel, C6, app,
init, tail) before the data.
decryption_aggregatorverifiesc6_chonk_rootand requiresc6_fold_key_hashto equalhash(root key, key-list hash). The C6 VK tree ishash(c6_chonk_root, hash(tube, tube, hiding kernel, C6, app, init, tail)).c6_foldartifact path and thec6_fold_key_hashinputname, so the contracts' deploy scripts and
BfvDecryptionVerifierstill read the same file.chonk_stack.rs,run_bb, the builder'schonkgroup withbb_poseidon2_hashVK hashes) is the one from the C3 PR; C6 only adds its circuits, thec6_chonkprover module and its rows library.c6_fold,c6_fold_kerneland the Rustc6_accumulatorare removed. With them the Rustsequential_folddriver and the Noirsequential_fold_vk_hashlose their last callers and areremoved too.
c6_foldandc6_fold_kernel.Verification
Only static checks ran in this branch; CI runs the tests.
nargo compileofbin/chonk,c6_chonk_tube,c6_chonk_rootanddecryption_aggregator;scripts/circuits/lint.sh;nargo fmt --checkclean.cargo check -p e3-zk-prover -p e3-zk-config -p e3-zk-build -p e3-events -p e3-aggregator -p e3-tests --all-targets;cargo clippyon the three zk crates reports nothing in the changedfiles;
cargo fmt --all --check; prettier on the changed markdown and JSON.node scripts/blueprint/check.mjs(no--fix): relative to main, no reference is newly moved orbroken.
fold_accumulators_e2e_testshas three C6 tests: theroot proves and binds the decryption aggregator; a corrupted leaf or a substituted key is
rejected next to an honest twin; the app rejects a shared slot, an out-of-range slot and a
foreign domain.
circuit_identity,e3-zk-buildVK-tree andVK_PATHStests, and thelib::math::c6_chonk_rowstests incircuits/libare updated.Compatibility
Breaking within the unreleased protocol-9 cutover (no separate counter change): drain-and-resync.
expectedC6FoldKeyHashchange, so verifiers and artifacts from before this change do not acceptthe new proofs. Partly aggregated C6 work from an E3 in flight cannot be continued: drain first.
Rollback: drain, then restore the previous binary and artifacts.
CircuitName::C6FoldandC6FoldKernelstayin place, documented as retired, so stored encodings keep their indices; the six C6 Chonk circuits
are appended. C6 Chonk proofs are never persisted or gossiped.
circuits/vk-commitments.json), the Solidity verifiers, the BFV VK-bindingfixture and the layout-lock fixtures are regenerated once, from one matrix build, in chore(circuits): regenerate the circuit outputs of the large stack #2541 (
large/circuit-outputs), near the top ofthe stack. Until then this PR's circuit, verifier and layout-lock checks
fail by design.