docs: rewrite proof-system page to current accumulator model - #42
Conversation
Replace the superseded v0 description (global Commitment-SMT + Merkle Mountain Range) with the normative model: two PCD circuits (per-account compliance C, publisher batch-aggregation C_batch), three proof types including AggregateBatchProof, and the nullifier accumulator as the only global structure anchored on Bitcoin via BatchInscription roots plus the off-chain k=3 BatchBundle. Removes the stale superseded-design note now that the page reflects current spec sections 1.6, 2.2, and 3.7.
- Point BatchBundle links to the section that defines it (§4.6 data availability / replication) instead of §3.1 (the on-chain object, which defines the BatchInscription). - Fix the requirement label: Requirement 10 is 'Node portability', not 'rebuildability'.
TaprootFreak
left a comment
There was a problem hiding this comment.
Review
Inhaltlich ein starker V2-Rewrite. Two-circuit-Modell sauber eingeführt, Three-Type-Tabelle mit Circuit-Spalte matcht §2.2, "What the batch proof binds" deckt alle relevanten Clauses ab (per-member soundness, S2C, nf-set integrity, accumulator transition, bundle-locator), Hierarchy-Diagramm clean, Cross-Refs konsequent auf Deep-Anchors (#37-Konvention). Obsolete Commitment-SMT + MMR sind raus.
Zwei substantive Befunde — beide im pseudo-Rust Code-Block für C (Z. 37-48):
1. Important — "Verify all incoming coins (BIP-340 Schnorr signatures, Merkle inclusion)" (Z. 42)
V2 §2.1 clause 2 ist explizit: eine per-transition-Signatur durch das current_pubkey Pkᵢ, nicht per-Coin. Spec-Zitat (§1.2-Verweis):
"Input authenticity. The whole transition is authorised by the account's single transition signature — there is no per-coin key and no per-coin signature."
Der Plural "Schnorr signatures" lässt es so aussehen, als gäbe es eine Sig pro Input-Coin. Vorschlag:
// 2. Verify the single per-transition BIP-340 signature by current_pubkey (Pkᵢ)
// and each input coin's coin-history-SMT inclusion path2. Minor — "new coin commitments" (Z. 45)
V2 verwendet nicht den Begriff "coin commitments" — Outputs sind Coin-Objekte mit coin.identifier, und der globale Akkumulator hat nur Nullifier, keine Commitments. Das ist V0/V1-Terminologie die in §1.6 explizit als obsolet markiert ist (MMR — deprecated; no Merkle Mountain Range is used in v1).
Vorschlag:
// 5. Derive the spent-coin nullifiers and the output coin identifiersLob
- Die
BatchBundle-Links für Off-Chain-Nullifiers sind präzise — das Privacy-Statement "What becomes public is only the spent-coin nullifiers (carried in the off-chain, k=3-replicated BatchBundle, not on Bitcoin)" ist genau richtig (Nullifier liegen in V2 NICHT on-chain, anders als V1). - Hierarchy-Diagramm zeigt clean die zwei Trees + die Anchor-Mechanik.
- Cross-Refs alle Deep-Anchors, keine
#X--section-topDrifts.
Nach Fix von #1 + #2 (10 Zeilen Code-Block-Update): ready to merge.
- One per-transition BIP-340 signature by current_pubkey, not a per-coin signature (clause 2). - Input coins are verified by coin-history-SMT inclusion at 'received-unspent', not non-inclusion; global double-spend is enforced by the publisher's AggregateBatchProof and the receiver's accumulator non-membership check, not inside C (clauses 2, 4). - Outputs are coin identifiers, not 'coin commitments' (clause 5). - Add the per-transition spend-key rotation (clause 7).
|
Both findings fixed in ad8936d, and I extended the correction after re-checking the whole
Two additional corrections the same block needed (not in the original review, but wrong against §2.1):
Build green (anchors/links), CI green, and an independent logic pass confirms all six comment lines now map cleanly to §2.1 clauses 1-9. Back to ready. |
TaprootFreak
left a comment
There was a problem hiding this comment.
LGTM — ad8936d adressiert beide Befunde und macht den Code-Block schärfer als meine Vorschläge:
- ✅ #1 (Schnorr-Plural): jetzt explizit "SINGLE per-transition BIP-340 signature by
current_pubkey(Pkᵢ); … there is no per-coin signature". - ✅ #2 (coin commitments): "output coins and their identifiers" — V2-konsistent.
- ➕ Clause 4 präzisiert dass
Cnur in-circuit coin-history-SMT non-inclusion macht; globaler Double-Spend-Schutz kommt ausAggregateBatchProof+ Receiver-Non-Membership, NICHT ausC— exakte V2-Semantik aus §2.1 clause 4. - ➕ Clause 7 ergänzt (spend-key rotation
Pkᵢ → Pkᵢ₊₁,send_counter++, coin-history-SMT update). - ➕ Balance-Check mit Mint:
sum(inputs) + mint >= sum(outputs). - ➕ Reference-Tag "(the normative clauses are spec §2.1)" für saubere Pointer-Disziplin.
CI grün. Mergeable.
Summary
Rewrites
docs/architecture/proof-system.md, which still described the superseded v0 design (a global account-keyed Commitment-SMT plus a Merkle Mountain Range of per-block roots) and carried only a one-line "superseded" pointer note from #32.The page now reflects the current normative model:
C(producesInitialProof/AccountUpdateProof) and the publisher's batch-aggregation circuitC_batch(producesAggregateBatchProof).AggregateBatchProof.BatchInscription(prev_root → new_root); per-transition validity attested off-chain by thek = 3-replicatedBatchBundle'sAggregateBatchProof.All cross-references point into the single-page spec (§1.1, §1.6, §2, §2.2, §2.3, §3.1, §3.7, §4.6) using precise subsection anchors (#37 link convention).
Test plan
npm run buildclean locally (onBrokenLinks: throw+onBrokenAnchors: throwpass)