Repository navigation
Conversation
…ime wasm Mainnet runs spec 153 (chain v1.0.2-Qm) with qp-wormhole 4.3.0 at 7 leaves per private batch and 53 private batches per public batch. The recorded traces only covered sizes 2 and 4. - Record the private-batch wrapper trace at n = 7 and the public-batch wrapper trace at n_inner = 53 over 7-leaf batches. - Add formal/deployed/*.bin, the private- and public-batch verifier data that occur verbatim in the v153 runtime wasm, and a test that fails if this branch stops generating those bytes. - Document the deployed release, hashes and re-check commands in formal/SPEC.md.
n13
left a comment
There was a problem hiding this comment.
Verdict: Approve
Reviewer: GPT-6.1 Sol
Reviewed head 7c7731111d91b5d991c723030e388814792c2ad4 against base fa5f57dc1a1b755ff1b7f4fdb4309e1e06669ba2. No blocking findings.
The new traces use the production wrapper builders. The public trace correctly records 53 verifiers of the 7-leaf private wrapper, each with 162 public inputs, and 5,206 public outputs. The anchor test regenerates the actual circuit stack and compares all four verifier/common artifacts byte for byte.
Validation:
timeout 60 cargo test --locked -p qp-wormhole-aggregator --lib wrapper_n -- --nocapture: all six trace freshness tests passed.timeout 60 cargo test --locked --release -p qp-wormhole-circuit-builder --lib generated_circuits_are_the_deployed_ones -- --nocapture: passed.cargo +nightly fmt --all -- --checkandgit diff --check: passed.- Independently downloaded the v1.0.2-Qm runtime release: its compact wasm SHA-256 matches the documented
1401e066…f0d4a47c; all four fixtures occur verbatim in it. The srtool metadata confirms the chain commit and spec 153. - Mainnet RPC at
https://rpc1-mainnet.quantus.comindependently returned spec 153 and:codehash78389c85e3698b7e24cf292907f2eec0657297fd8a4d82669cf357974f15ec56, matching the release's compressed runtime hash.
GitHub format, Clippy/docs, Lean spec, and security-audit checks passed. Ubuntu/macOS workspace tests and the slow crypto job were still running at review time. Generated Lean proofs in the companion qp-plonky2 PR are outside this review.
Why
Mainnet runs runtime spec 153 (chain
v1.0.2-Qm). That runtime embeds theqp-wormhole4.3.0 circuits at 7 leaves per private batch and 53 private batches per public batch. The Lean proofs do not cover those circuits today:mainmodels the proof-of-burn leaf (Leaf as proof of burn: move outputs and fee to the private batch #198), which is not deployed.This PR records the deployed sizes and ties them to the bytes on chain. The generated Lean proofs are in Quantus-Network/qp-plonky2#125.
Base branch
n13/rt153-baseisfa5f57d(#194), the last commit before the leaf redesign. This is not meant to be merged intomain.Changes
formal/traces/private_batch_wrapper_n7.jsonandformal/traces/public_batch_wrapper_n53.json(53 inners over 7-leaf batches), with the usual*_trace_is_currenttests.check_public_batch_wrapper_tracenow takes the leaf count instead of hard-wiring 2.formal/deployed/*.binare the private- and public-batch verifier and common data.generated_circuits_are_the_deployed_onesfails if this branch stops generating those bytes.wormhole_aggregator::deployed::{NUM_LEAF_PROOFS, NUM_PRIVATE_BATCH_PROOFS}is the single source for 7 and 53.formal/SPEC.mdgets a "Deployed circuits" section with the release, hashes and the commands to re-check the anchor.How the deployed circuits were identified
:codeblake2-256 on mainnet equals the srtool hash of thev1.0.2-Qmrelease wasm. Later releases (v1.0.3 to v1.0.5) are node-only.Cargo.lockhasqp-wormhole-*4.3.0 andpallets/wormhole/build.rsdefaults to 7 and 53.common.binandverifier.binare byte-identical between tagv4.3.0and this branch.formal/deployed/occur verbatim inquantus-runtime-v153.compact.wasm. The leaf verifier key is a constant of the private-batch circuit, so that circuit's digest covers it.Steps 3 and 4 can be re-run with the commands in
formal/SPEC.md.Testing
cargo test -p qp-wormhole-aggregator --lib: 107 passed, including the six trace tests.cargo test -p qp-wormhole-circuit-builder: 11 passed, including the new anchor test.cargo clippy --workspace --all-targets --all-features --locked -- -D warningsandcargo +nightly fmt --all -- --checkare clean.Merge order
Quantus-Network/qp-plonky2#125 pins
wormholeSpecat this branch's head (7c77311). After this one is squash-merged, that pin has to move to the merge commit.