~/bitcoin-payments/spec
[llms.txt][github]

[!] ARCHIVED VERSION: v0 (v2.5.0-rfc) — SUPERSEDED BY v1 & v2 (v3.1.0-rfc)

This page is frozen byte-for-byte from commit 7b47b8c (SHA-256 verified) and isnot for implementation. Hostile review R7 identified fatal blockers in v0 (C-1..C-4, H-1..H-8) that triggered the zero-federationv1 pivot and the R8-hardened v2 (v3.1.0-rfc) specification.

v0 (v2.5.0-rfc) · archived baseline · superseded

zBTC: Bitcoin–Zenon Interoperability Protocol Specification

Archived byte-for-byte v0 baseline (v2.5.0-rfc, commit 7b47b8c) — superseded by v1 and v2 (v3.1.0-rfc).

Version: 2.5.0-rfc (Public RFC — iteratively hardened across 6 adversarial review rounds: HOSTILE_REVIEW.md through HOSTILE_REVIEW_R6.md, with all Round-6 findings R6-H1..H2, R6-M1..M5, R6-L1..L9, and S6-1..S6-6 resolved below)
Status: Public Request for Comment (v2.5.0-rfc) — NOT mainnet-active; gated on public/independent verification, upstream ratification (§6), and executable Signet / go-zenon artifacts (§7).
Target Networks: Bitcoin Mainnet (bip-0340/bip-0341/bip-0342 Taproot + Recursive STARK/Groth16 BitVM2) ↔ Zenon Network (go-zenon origin/release/0.0.11-rc1 f19955f / origin/dev 770e893)
Numeric Oracle: All modeled struct sizes, depth-256 witness bounds, per-block OP_HASH160 w=4 W-OTS certificate-DA + Leaf-3B SHA-256 stack/size bounds, exact integer-satoshi economics, latency-aware reachability & 180-day multi-gen timeline simulation, staggered CLTV timings, slow-block tolerances, and halving-indexed K bounds are asserted by scripts/verify_spec_bounds.py (python3 -I scripts/verify_spec_bounds.py). Unmeasured Signet BitVM2 weights, circuit counts, hashrate-growth factors, and stress prices are explicitly labeled ASSUMED STAGE 0C TARGETS (Gate G-2).

Upstream Provenance:


1. Executive Summary & Governing Invariant

This specification suite defines the protocol, cryptography, economics, and go-zenon upgrades to store native BTC in a BitVM2-constrained Taproot vault on Bitcoin, represent that BTC 1:1 as zBTC (1 base unit = 1 satoshi, 8 decimals, 21,000,000 BTC cap) via an atomic Treasury Pre-Mint SettlementContract, transfer zBTC with 0 satoshi BTC fees via Zenon's QSR Plasma / SHA3-256 PoW capacity model, verify Zenon state via 30-day BLS12-381 FinalityCommitteeRoot + StateRoot proofs, and offer peg-free, zero-vault-trust PTLC adaptor swaps and Lightning submarine-swap gateways.

1.1 The Governing Invariant (with Phase-2 Adjudication Addendum)

Consensus orders. Execution computes. Authorization admits. Settlement accounts.

Phase-2 Adjudication Addendum: Under execProfile = OPTIMISTIC, SettlementContract hosts deterministic, panic-free, bounded-CPU registered verifier plugins (VerifierRegistry, e.g., OPTIMISTIC_BTC_SPV_V1) solely to adjudicate single-step fraud challenges against BatchCommitmentV3.traceRoot. All plugins MUST return typed error values (zero common.DealWithErr panics) and support both 1-tx fast challenges (<= 12 KiB typical) and bounded Multi-Tx Witness Sessions (UploadWitnessProof = 8,676 B at max SMT depth 256, T_session = 12h, blocking FinalizeBatch while open). Under Phase 3 (ZK_VALIDITY), Settlement verifies succinct proofs only and parses zero foreign data.

Boundary Addendum: Destination chains enforce through the adapter and hash-pinned Interop Enforcement Specification bound by ChainBinding.enforcementSpecHash.


2. Normative Module Map & Authority Precedence

ModuleFileNormative Scope
MasterSPEC.mdUnified architecture, end-to-end flows, 5-assumption honest security model (§4), dev/release corpus errata (§5), Upstream Amendment Register incl. A-PILLAR-1 (§6), staged activation & executable gates (§7).
Part 1spec/01-bitcoin-taproot-vault-enforcement.mdHash-pinned Bitcoin Interop Enforcement Specification (BTC-ENFORCEMENT-V1): 4-Key Registry; 30-day BLS12-381 min-sig fixed 408 B cert DA (targetCert || handoffSlot, zero-padded for 1-cert epochs; 7 per-block checksummed OP_HASH160 w=4 W-OTS messages + 6 midstates = 1,239 digits, 29,882 vB → 30 kvB derived, 3 stack-safe inputs, Leaf-3B max 265 digits, C = 1,208); inner STARK BLS12-381 + outer BN254 Groth16 split; staggered CLTVs (T_cutoff = 46d < T_kill = 56d < T_bond_expiry = 58d, 288 > 72 trap gap, 1.476x/1.591x slow-block tolerances); normative 30-day rotation schedule (reg by day 32, re-graph by day 43, cutoff day 46, disclosed 5.0d pre-epoch DeferredLockQueue window) & RoundRetireTx + fee-UTXO CLTV exits; Q_graph transcript + published Take leaf DA → Setup Committee attestation; exact integer-satoshi F_assert = 1.45 BTC (289 kvB break-even) & Bond = 3.70 BTC; Tier 1B/2; 11-item Wind-Down Plan.
Part 2spec/02-btc-authorization-domain-and-spv.mdBitcoin Authorization Domain (d_btc_asset) & Adversarially-Bounded SPV Verifier: 17 input tags (0x00..0x10); never-pruned ActiveChainByHeight[h] (68 B); streaming SHA-256 BTC_TX_STREAM_CHUNK; multi-generation TrackedVaultRecord (<= 2 active unexpired epochs, strict duplicate/3rd-epoch rejection); SMT-absence-verified BTC_VAULT_SPEND_PROOF across ACTIVE, RELEASED, and QUARANTINED vaults + published Take-txid leaf DA; decoupled BTC_RELEASE_PROOF (admits valid fronting even if vault trapped); single-authority non-overwritable PEGOUT_SLOT_CLAIMED (lastLapsedOperatorId); VAULT_GRAPH_EPOCH_ADDED (0x0D) for ACTIVE, QUARANTINED, AND un-claimed RELEASED vaults; exact anchorExpiryTs == finalityEpochStartTs(epoch) + 58d equality; BTC_ROUND_RETIRED (0x10); Governance-only GOVERNANCE_ADD_BINDING; halving-indexed K_pilot = 14; and 29 SPV conformance vectors.
Part 3spec/03-settlement-minted-zbtc-and-feeless-rails.mdSettlement Contract, Atomic Treasury zBTC, Plasma & Peg-Free Rails: Hardened TokenContract.IssueMinted → single-use ReceiveTreasury(); never-reused batchId + parentBatchId; contiguous domainInputSeq; inductive StepTraceLeaf (328 B) + ChallengeContinuity (1,700 B); bounded Multi-Tx Sessions + ancestor-rejection refunds; latency-aware (+3.0d horizon) + reservation-aware G-21 + SyncRetiredLane + kickoff-cutoff enforcement; complete aligned Domain↔Settlement vault state machine (explicit quarantineReason + unrotatedVaultCount inc/dec, RepointTrappedPegOut, ResetFailedReimbursementSlot, SyncPendingTrapVault, SyncVaultGraphEpoch, deterministic SyncOrphanedVaultOutpoint); single-authority slot expiry + 500 ZNN SlotBondZnn + no consecutive re-claim; global <= 16 duplicate refund cap/batch; BIP-327 tweaked PTLC & LN HTLC (hashType = 1).
Part 4spec/04-bitcoin-anchoring-and-light-client.mdBitcoin Anchoring & Light Client Verification: Genesis BTC block 710,968 lower bound; timestamp-bound checkpoint anchoring for light clients; proof-format.md V1 SmtProof; 30-day BLS12-381 min-sig FinalityCommitteeRoot (IETF BLS POP distinct DSTs, depth-5 SHA-256 committee Merkle tree, 204 B fixed cert, zero CarryOverCertificate); historical-root-verified SubmitInvalidCertProof (verifies sig under cert.FinalityCommitteeRoot, then checks ALL 7 cert fields against canonical state — economically enforcing transition-height handoffs and slashing forged handoffs at ANY height!); U2 finality gadget + 72-day post-committee-service stake lock + voluntary RequestExitCommittee clean exit (A-PILLAR-1).
Part 5spec/05-go-zenon-upgrade-plan.mdDetailed go-zenon Node Upgrade Plan: All citations verified against origin/release/0.0.11-rc1 (f19955f) & origin/dev (770e893); Phases U0–U5, TokenContract.IssueMinted → ReceiveTreasury(), pillars.go BLS12-381 key + PoP + historical-root full-preimage slashing + finality gadget + 72d post-service lock & exit, GovernanceContract + MultisigContract (Stage 1B hard gate), ChallengeDepositZnn priority lane, DeleteMomentum reorg push.
Oraclescripts/verify_spec_bounds.pyExact integer-satoshi asserting oracle deriving every struct field-by-field (PegOutState = 190 B), per-block OP_HASH160 w=4 W-OTS cert-DA + 7-block Leaf-3B SHA-256 (1,239 digits, 29,882 vB → 30 kvB, Leaf-3B stack <= 265 digits, C = 1,208), depth-256 upload (8,676 B), all 17 fast paths incl. inserted keys (<= 11,300 B), F_assert = 1.45 BTC (289 kvB break-even) & Bond = 3.70 BTC, latency- & reservation-aware reachability + 180-day simulation (max_gens = 2, 5.0d pre-epoch DeferredLockQueue), staggered CLTVs (46d < 56d < 58d, 1.476x/1.591x slow-block tol), 72d lock, watcher liquidity (1.46 BTC/lane), 31,500 ZNN min op bond + 500 ZNN SlotBondZnn, exact Poisson (353/472), and halving-indexed K_pilot = 14.

2.1 Authority & Conflict Precedence

  1. Deployed Zenon L1 consensus rules and upstream Project Zeno/spec/SPEC.md (after Phase-2 Amendments §6 are ratified upstream).
  2. GENERALIZED-AUTHORIZATION-BRIDGE-FRAMEWORK.md v0.3.2 & MINTED Settlement Extension v0.1.1 (with §6 amendments).
  3. spec/03 & spec/05 (go-zenon Settlement & upgrade instantiation).
  4. spec/02 (d_btc_asset SPV verifier).
  5. Hash-pinned spec/01 (BTC-ENFORCEMENT-V1).
  6. spec/04 (anchoring and light clients).

3. End-to-End Protocol Flows

3.1 Peg-In: BTC → BitVM2 Taproot Vault → Atomic Treasury zBTC

  1. Provisional Deposit: User derives ProvisionalDepositScript (P_prov = lift_x(H_NUMS_X) + depositCommit * G, key-path unspendable; Leaf A = CommitteeIdentityKey; Leaf B = <144> OP_CSV <depositorRefundPubKey>) committing (chainBindingHash, assetId, zenonRecipient[0]==0x00, depositNonce, u64BE(D_bucket)) and broadcasts DepositTx (<= 4,096 B, non-coinbase, len != 64).
  2. Normative Two-Phase Ceremony, Transcript Attestation & Mandatory 2-Input Rollover (R5-L8):
    • Phase 1 (Trap Commitment First): Each participating Operator m delivers verified pk_m signatures on BOTH WrongDepositDisproveTx^{T1} AND WrongDepositDisproveTx^{T2} across active fresh rounds of generation g BEFORE Q_graph releases any Take signature.
    • Phase 2 (Take Release, Published Leaf DA, Transcript & Rollover): For operators passing Phase 1, Q_graph releases Take1Tx/Take2Tx signatures and signs a canonical Q_graph release transcript listing the exact sorted set of released Take txids (takeTxidsSmtRoot — proof-format.md V1 SMT keyed by SHA3-256(takeTxid) — PLUS canonical takeTxidsBlobHash committed alongside published leaf-set DA so any watcher can construct SMT absence proofs, R6-L5). The distinct Setup Committee (CommitteeIdentityKey) independently verifies the Q_graph transcript & published leaf set, signs the lock attestation (rolloverOutpoint, eligibleOperatorsBitmask, epochId = g, takeTxidsSmtRoot, takeTxidsBlobHash), and broadcasts mandatory 2-input RolloverTx_d (nSequence = 0xfffffffd, Reserve In 1, Out 0 = TerminalVaultUTXO_d paying Q_vault_d). New deposits after gen g+1 registration MUST carry a g+1 graph (R6-L4). If unconfirmed by h_dep + 120, Reserve MUST double-spend In 1 (depositor Leaf-B RBF fallback at h_dep + 144).
  3. SPV Proof Relay: Relayer submits BTC_HEADER_BATCH, optional BTC_TX_STREAM_CHUNK, and BTC_LOCK_PROOF (<= 7,748 B ABI). d_btc_asset verifies both txs against never-pruned ActiveChainByHeight[h] (K_pilot = 14), verifies CommitteeIdentityKey sig, records multi-epoch TrackedVaultRecord{ACTIVE, activeEpochs=[{g, takeTxidsSmtRoot}]}, and emits FOREIGN_LOCK.
  4. Chained Optimistic Batch, Rotation & Atomic Mint: Executor submits BatchCommitmentV3 (monotonic batchId, parentBatchId, PreStateRoot chaining, contiguous domainInputSeq, MaxBatchInputs = 256). After 48h (up to 60h with open challenge session), FinalizeBatch finalizes and releases exposure. RelayClaim invokes MINTED_LOCK_V1, enforces G-21 Latency-Aware Dynamic Reachable Fresh Capacity (ActiveVaultUTXOs + 1 <= Σ (ReachableRounds(now + 3.0d) - pendingReservations) - 25, blocked if unrotatedVaultCount > 0; smoothly defers mints to DeferredLockQueue during the disclosed ~5.0d pre-epoch window before gen g+1 registers at day 30–32), records per-epoch VaultUtxoSet[outpoint_d], and atomically transfers D_bucket zBTC from treasury to zenonRecipient.

3.2 Feeless zBTC Transfers on Zenon Block-Lattice

Standard zBTC user transfers pay 0 satoshis BTC fee and 21,000 base Plasma funded via refundable QSR fusion (10 QSR at floor price 1000) or SHA3-256 PoW (dev:pow/pow.go:35-47,61,118, 31.5M expected hashes at floor price; 0.1–0.3s desktop native, ~2–10s mobile/WASM). Network-wide L1 capacity is 100 blocks per 10s Momentum (`5` full send+receive user transfers/s).

3.3 Peg-Out: Atomic Burn → Anti-Censorship Fronting Slot → FrontingTx → Zenon RELEASED → BitVM2 Reimbursement

  1. RequestPegOut (open during ACTIVE, DRAINING_ROLLOVER_STOP, AND DRAINING_FINAL): User sends D_bucket zBTC with (recipientScriptPubKey, refundRecipient, timeoutHeight, pegOutFeeSats >= minOperatorFeeSats + fixedReserveFeeSats). Settlement validates tip + 640 <= timeoutHeight <= tip + 2512 && timeoutHeight < 500_000_000, pops an UNASSIGNED outpoint_d holding a live graph epoch e with >= 1 eligible active operator having ReachableRounds(e, now + 3.0d) - pendingReservations >= 1 (R6-M2), copies rec.ChainBindingHash = outpoint_d.SetupChainBindingHash, retains D_bucket zBTC, and appends PEGOUT_CREATED (0x03).
  2. Single-Authority, Anti-Censorship Fronting Slot (R6-M2, R6-M4, R6-M5) & FrontingTx: An eligible operator in a live graph epoch e of outpoint_d with ReachableRounds(e, now + 3.0d) - pendingReservations >= 1 calls ClaimFrontingSlot(outboxId) (requiring VaultUtxoSet[d].status == ASSIGNED, locking forfeitable SlotBondZnn = 500 ZNN, reserving 1 lane round, barring consecutive re-claim by lastLapsedOperatorId, and rejecting until BOTH now >= slotClaimZenonTs + 14_400 AND lastFinalizedTipHeight >= slotExpiryBtcHeight!). Appends PEGOUT_SLOT_CLAIMED (0x0A); d_btc_asset is the single authority on slot exclusivity (BestTipHeight + 24, slotClaimZenonTs + 14_400). Operator broadcasts FrontingTx and submits BTC_RELEASE_PROOF; d_btc_asset ALWAYS admits valid fronting regardless of vault trap status (R6-M3), emitting FOREIGN_RELEASE(operatorId); MINTED_RELEASE_V1 keys strictly on FOREIGN_RELEASE.operatorId, releases SlotBondZnn, and transitions PegOutRecord to RELEASED (re-pointable via RepointTrappedPegOut if another operator's substitution trapped outpoint_d!).
  3. Reachability-Checked Reimbursement & Staggered-CLTV BitVM2 Payout: Winning operator m calls ClaimReimbursementSlot(outboxId, operatorId_m, roundId) (verifies epoch(roundId) is in VaultUtxoSet[outpoint_d].epochEntries with m's bit set, roundId is registered & unused on an unretired lane, AND serial kickoff feasibility max(now, lastClaimedTs + 5.5d) <= anchorCutoffTs = E_anchor_ts + 46d, consuming its lane reservation; recoverable via ResetFailedReimbursementSlot if the claimed round expires/burns without operator fraud!) and broadcasts RoundKickoffTx_{m,l,r} (Bond = 3.70 BTC, per-field checksummed OP_HASH160 w=4 W-OTS W_kick).
    • Unchallenged (T_happy = 144): Take1Tx_{d,m,l,r} (Out 2 <pk_m> CPFP) pays 0.99899 BTC to ReimburseEscrow^{T1} (72-block CSV OR WrongDepositDisproveTx^{T1} routing 0.99899 BTC to QUARANTINED RecoveryVaultUTXO_d, burning 2.70 BTC bond, paying watcher 1.00 BTC - fee; verifier-decided SMT inclusion/absence on BTC_VAULT_SPEND_PROOF across ACTIVE/RELEASED/QUARANTINED keeps registered Takes in PENDING_TRAP for 230 blocks, mirrored via SyncPendingTrapVault!) AND 0.00100 BTC to Reserve.
    • Challenged (ChallengeTx, Out 0 = F_assert = 1.45 BTC, terminal sink): Under Assumptions #2 & #3, operator posts AssertStartTx (288) → parallel AssertCertDATx (29,882 vB → 30 kvB derived per-block OP_HASH160 w=4 W-OTS, 3 stack-safe inputs publishing the fixed 408 B targetCert || handoffSlot across 7 independently-checksummed SHA-256 blocks + 6 midstates = 1,239 digits, verified by 7 stack-safe Leaf-3B chunks <= 265 digits, C = 1,208!) + parallel AssertChunkTx_{1..32} (+72) → AssertEndTx (+72). Any failure triggers DisproveTx / BurnBond*Tx (SelfSlash <= -0.20 / -0.40 BTC, HonestOp >= +0.195 BTC @ 500 sat/vB, break-even 289 kvB), PLUS BTC_OPERATOR_SLASH_PROOF slashes 100% of Operator m's >= 31,500 ZNN bond!
    • Closed Rotation & Staggered CLTV Exit (R5-H3, R5-L3, R6-L4): Gen g+1 is registered by day 32 (E_anchor(g+1) = E_anchor(g) + 1), all live vaults (UNASSIGNED, ASSIGNED, QUARANTINED, AND un-claimed RELEASED) are re-graphed onto g+1 via VAULT_GRAPH_EPOCH_ADDED (0x0D) by day 43 (QuarantineExpiredVault unlocks at T_kickoff_cutoff + 60h = day 48.5 so finalized batches never race quarantine!); operators exit gen g bonds cleanly via RoundRetireTx (syncing BTC_ROUND_RETIRED 0x10) during [day 51.5, day 58); StaleConnB/CKillTx locks out Takes at T_kill_expiry = day 56 and StaleChainBurnTx burns unretired bonds at T_bond_expiry = day 58 (288 > 72 blocks after T_kill_expiry so traps can never be pre-empted!).
  4. Non-Delivery Refund: If no FrontingTx is admitted before checkpointH = timeoutHeight + 558 reaches K_pilot = 14, BTC_NON_DELIVERY_PROOF emits FOREIGN_NON_DELIVERY; MINTED_REFUND_V1 returns D_bucket zBTC to rec.RefundRecipient, releases the reservation, and re-enqueues outpoint_d ONLY if VaultUtxoSet[outpoint_d].status == ASSIGNED (never overwriting PENDING_TRAP, RECOVERED, or QUARANTINED!).

3.4 Peg-Free Routes (Zero Vault Trust)

Specified in spec/03 §5:

  1. PTLC Taproot MuSig2 Adaptor Swaps: Bob locks zBTC (PtlcContract.Create, T_znn >= T_btc_worst + 6h) BEFORE Alice releases her BIP-327 tweaked (x(Q_swap), PartialSigAgg incl. e·g_key·t_acc) adaptor partial signature; T_btc anchored to h_conf + 12.
  2. HTLC Atomic Swaps & Lightning Submarine-Swap Gateway: HtlcContract with hashType = 1 (dev:vm/embedded/definition/htlc.go:92), inbound Hold Invoice ACCEPTED before gateway locks zBTC.

4. Honest End-to-End Security & Threat Model (5 Explicit Tier 1A Assumptions — R5-L5)

Tier 1A BitVM2 vaults are NOT trustless. Delivered security is bounded by the weakest of FIVE explicit Tier 1A assumptions (plus optimistic claim admission):

  1. Zenon 30-Day BLS12-381 Finality Committee Honesty & Reachable Slashing Backstop (R6-H1, R6-H2, G-23): A colluding >= 21-of-30 (> 2/3 weight) Pillar supermajority in any 30-day finality epoch from E_anchor onward can forge a FinalityCertificate (or forged handoff). Deterred and bounded (subject to Assumption #3 challenging invalid kickoffs) by three coupled mechanisms:
    • Mandatory Bitcoin Certificate Publication (AssertCertDATx, 29,882 vB → 30 kvB derived): On any challenge, the operator MUST publish the fixed 408 B targetCert || handoffSlot (0x00^204 when no handoff exists) across 7 independently-checksummed OP_HASH160 w=4 W-OTS SHA-256 blocks + 6 midstates (1,239 digits), verified by 7 stack-safe Leaf-3B chunks (<= 265 digits/leaf, C = 1,208).
    • Historical-Root Full-Preimage Slashing (R6-H1): PillarContract.SubmitInvalidCertProof(cert) verifies the BLS12-381 signature under the historical Tag-15 committee matching cert.FinalityCommitteeRoot (NOT merely canonicalSigningCommitteeRoot(cert.Height)!), then compares ALL 7 certificate fields against canonical Zenon state at cert.Height (with chainId bound in the signing digest). Because CarryOverCertificate is deleted, ANY committee-E-signed forged handoff or target at ANY height in epoch E+1 (transition OR non-transition!) is slashable on Zenon when published on Bitcoin, economically enforcing the handoff pin without requiring an in-circuit oracle!
    • Staggered 56d/58d Bitcoin CLTV Expiry + U2 72-Day Post-Service Stake Lock (A-PILLAR-1): Every RoundChain expires on Bitcoin by day 58, while every Pillar's 15,000 ZNN collateral stays locked and slashable for 72 days after its last finality epoch (>= 58d + 14d grace, independent of per-Pillar % 90d revoke phase), backing the Governance supply cap (MaxRepresentationSupply * SpotPrice <= 157,500 ZNN, weekly Governance check + Guardian TWAP trigger; pilot 15 BTC @ ASSUMED 10,500 ZNN/BTC). (Note: unchallenged Take1Tx forgeries do not publish certs — prevented by Assumption #3!)
  2. 1-of-N Live Verifier Committee Honesty (Q_graph, N >= 7 Pilot): At least 1 of $N$ independent Q_graph verifier members remains honest in perpetuity (never signing unauthorized vault/connector spends, enforcing Phase-1-before-Phase-2 ceremony order, signing accurate release transcripts, and co-signing 30-day round-chain rotations & recovery re-graphing). (Per-round keys Q_round ARE deleted at round setup. Permanent loss of 1-of-N Q_graph member stops new rotations and recovery re-graphing; existing vaults remain redeemable through reachable active rounds prior to T_kickoff_cutoff under G-21, after which Governance Wind-Down applies.)
  3. 1-of-N Altruistic, Capitalized Bitcoin Watcher Liveness: Against a rational fraudulent operator who self-slashes (-0.20..-0.40 BTC burn vs -2.25..-3.70 BTC vs watcher) via private miner submission — OR under third-party miner MEV (M-03) — challenging has realistic expected value -(F_assert + f_chal) = -1.4600 BTC @ 500 sat/vB. Safety explicitly assumes at least 1 altruistic / stakeholder-funded watcher with liquid capital >= 1.46 BTC per concurrently-fraudulent lane (14.60 BTC worst-case simultaneous fraud across all 10 pilot lanes, plus small tx fee for StaleConn{B,C}Kill fallback). Operator fraud is strictly deterred by Bitcoin burn (-0.20..-2.70 BTC even self-slashed) PLUS 100% slashing of OperatorBond_ZNN >= 31,500 ZNN (>= 3.0 BTC equivalent) + deactivation of all lanes!
  4. 1-of-N Honest Setup Committee (CommitteeIdentityKey, N >= 7 Pilot, Distinct from Q_graph — R5-L5): At least 1 of $N$ Setup Committee members honestly verifies Q_graph release transcripts and RolloverTx / RoundGenesisTx artifacts before signing DepositTx Leaf A, BTC_LOCK_PROOF, OPERATOR_ROUND_REGISTERED, and VAULT_GRAPH_EPOCH_ADDED. (All-$N$ compromise of CommitteeIdentityKey alone cannot spend existing Q_vault_d vaults, but can divert in-flight deposits, register phantom rounds inflating G-21, attest manipulated takeTxidsSmtRoots delaying raw-sweep halts by 230 blocks, or activate quarantined vaults with invalid graphs.)
  5. Groth16 BN254 Outer-Wrapper Trusted Setup (CRS): Soundness of vk_bitvm depends on 1-of-K honesty in the public Phase-2 CRS ceremony (K >= 50 contributors, transcript pinned in enforcementSpecHash).
  6. Optimistic Claim Admission & Anti-Frontier Boundary: <= weaker(execProfile = OPTIMISTIC, foreignProfile = LIGHT_CLIENT), MaxAggregateInFlightMint = 10.0 BTC (pilot), halving-indexed K_pilot = 14 (pre-2032 migration/cap rule), bounded Multi-Tx Sessions (T_session = 12h, 8,676 B @ depth 256), ChallengeDepositZnn-ordered priority lane, and strict prohibition of $O(k)$ bounded-frontier verification on bridge gates (docs/architecture/bounded-verification-boundries.md).

5. Reference Corpus Errata Resolved (Verified Against origin/dev 770e893 / release/0.0.11-rc1 f19955f)

  1. go-zenon baseline: Phase U0 targets origin/release/0.0.11-rc1 (f19955f) / origin/dev (770e893), carrying PtlcSpork, DynamicPlasmaSpork + EmbeddedSendBasePlasma (dev:vm/plasma.go:192), EmbeddedRefundSpork, Libp2pSpork, EpochRewardTermsSpork, composable embeddedVariants (dev:vm/embedded/embedded.go:246), and MaxDataLength = 16,384 (dev:vm/constants/plasma.go:67).
  2. TokenContract: checkToken (dev:vm/embedded/implementation/token.go:40,43), data-less Issue descendant (dev:vm/embedded/implementation/token.go:163-172) failing dev:vm/vm.go:204-226, and owner-burn (dev:vm/embedded/implementation/token.go:330). Resolved via TokenContract.IssueMinted → single-use SettlementContract.ReceiveTreasury() + Burn/UpdateToken guards.
  3. Consensus, Pillars, PoW, HTLC, Subscribe & Verifier on dev/release: 24h consensus epoch (dev:consensus/consensus.go:45,86), PillarStakeAmount = 15,000 ZNN (dev:vm/constants/embedded.go:108), per-Pillar phased (83d + 7d) revoke (dev:vm/constants/embedded.go:115-120, dev:vm/embedded/implementation/pillars.go:132-138,395-400), SHA3-256 PoW (dev:pow/pow.go:35-47,61,118), HashTypeSHA256 = 1 (dev:vm/embedded/definition/htlc.go:92), AccountBlock.ComputeHash() (dev:chain/nom/account_block.go:283), ErrMDataMustBeZero (dev:verifier/momentum.go:198), empty DeleteMomentum (dev:rpc/api/subscribe/api.go:357).
  4. Upstream doc errata: Portal v1.5 retarget max 4,838,400s, 10s Momentums, valid NUMS hex 50929b74..., mislabeled 0x1800ff80 vector, and bitcoin_anchoring.pdf §4.1 bare-OP_RETURN-in-Tapscript prohibition.

6. Upstream Amendment Register (Blocking Mainnet Registration)

IDUpstream TargetBlocking Conflict / GapNormative Amendment Required
A-SPEC-1 (U-01)SPEC.md v1.6.0 S:130,352Phase-1 reserves L1_RELAYED and defines only input_kind 0..5.Activate L1_RELAYED (inputSource = 1) + input_kind = 6 (RelayedInput) & 7 (SystemInput) in Phase-2 Profile.
A-SPEC-2 (C-08, R2-C4, U-08, U-18i)SPEC.md §19, §27.7 (S:190,1224); M:1632,2107Receipt lacks per-input roots; batch needs parentBatchId, policyVersion, traceRoot with inductive per-leaf accumulators, observedChainHeight, domainHalted.Extend BatchCommitmentV3 (versioned per SPEC.md §20) with parentBatchId, policyVersion, traceRoot, observedChainHeight, domainHalted, haltedReorgHeight.
A-SPEC-3 (U-03, U-18iii)SPEC.md S:881-889 vs M:3346SPEC.md requires MaxBatchMint & coupled mint/burn bounds; Manual uses R + P <= B.Mandate MaxBatchMint + aggregate TotalInFlightMint / MaxInFlightMintPerExecutor and codify equivalence with R + P <= B.
A-SPEC-4 (U-07, U-18ii)SPEC.md S:1186 & M:3254,3479M:3479 asks to reuse kind=1 outbox, yet RequestPegOut is a direct L1 tx and AUTHORIZATION domains MUST have empty outboxRoot (M:2115).Standardize domain-separated L1 peg-out ID SHA3-256("ZNN_L1_PEGOUT_V1" || domainId || pegOutSeq || sendBlockHash) directly on L1 PegOutRecord.
A-SPEC-5 (U-18iv)SPEC.md S:972 vs M:1504,2175Contradictory inequality direction between WithdrawalDelay and challengeWindow.Unify Phase-2 OPTIMISTIC: batchFinalizationDelay == executionChallengeWindow >= MinWithdrawalDelay (extended up to +T_session while an active challenge session is open).
A-SPEC-6 (R2-L2, U-12)SPEC.md S:296,309 vs M:1417SPEC.md uses domainClass = EXECUTION|BRIDGE|MESSAGING & PROOF_VERIFIED; Manual uses EXECUTION|AUTHORIZATION & PROOF.Reconcile enum names & 0-based ordinals normatively across SPEC.md and Manual (AUTHORIZATION, PROOF_VERIFIED).
A-BTC-1 (C-01, C-02, R2-L3)BTC-AUTHORIZATION-DOMAIN.md M:3887,4079,4304Required Bitcoin TimeoutCancelTx and relay-time bestTipHashBE in NON_DELIVERY event ID.Gate BitVM2 reimbursement strictly on Zenon PegOutRecord.State == RELEASED + ReimbursementRound; admit FOREIGN_NON_DELIVERY on deterministic K-confirmed checkpoint ActiveChainByHeight[timeoutHeight + ReleaseSubmissionGrace].
A-MINT-1 (U-18v, C-11)MINTED v0.1.1 §3 (M:3132,3225)Assumes abstract Core-internal creditOrMintZTS.Ratify TokenContract.IssueMinted → single-use SettlementContract.ReceiveTreasury() Atomic Treasury Pre-Mint realization.
A-PILLAR-1 (R5-L6)go-zenon pillars.go (dev:pillars.go:132-138,395-412)Pillars currently hold only Ed25519 keys and withdraw 15,000 ZNN immediately on their % 90d phase.Ratify Phase U2 Pillar staking terms: (1) BLS12-381 min-sig finality key + PoP (RegisterFinalityKey), (2) 72-day post-committee-service slashable lock after a Pillar's last 30-day finality epoch, and (3) voluntary RequestExitCommittee() removing the Pillar from future snapshots so Revoke withdraws cleanly as soon as the 72-day lock elapses without waiting an extra % 90d cycle!

7. Phased Delivery & Executable Verification Gates

StageScopeMandatory Exit Criteria
Stage 0A (U0–U2)Ship release/0.0.11-rc1 (f19955f), StateRootSpork (v3, proof-format.md V1), CommitteeRootSpork (v4, 30-day BLS12-381 min-sig FinalityCommitteeRoot with distinct IETF POP DSTs, U2 finality gadget, historical-root full-preimage SubmitInvalidCertProof + SubmitEquivocationProof, 72-day post-service stake lock + RequestExitCommittee, A-PILLAR-1), DeleteMomentum WS reorg push.Genesis-to-tip sync parity; smt-v1-test-vectors.json pass; MUST-fail slashing tests for committee-E forged handoff at h_trans(E+1)+1 AND committee-E target in epoch E+1 (R6-H1); Signet↔Zenon PTLC & HTLC adversarial suite (G-18).
Stage 0B (U3–U4)Ratify §6 amendments; build OffchainExecutionSpork, MintedZbtcSpork (IssueMinted → single-use ReceiveTreasury()), OptimisticRefereeSpork, panic-free vm/embedded/btcspv/ (17 tags incl. SMT absence/inclusion across ACTIVE/RELEASED/QUARANTINED 0x08, decoupled 0x06, multi-gen 0x0D incl. RELEASED, 0x10), bounded Multi-Tx Sessions + commit-reveal, zenon-executor.go-zenon unit test for IssueMinted→ReceiveTreasury() & rollbacks (G-11); all 29 SPV vectors + 15+18 MINTED vectors; adversarial ground-tree CI fuzzer proving Multi-Tx Session blocks FinalizeBatch at T-1 and succeeds at depth 256 (G-9).
Stage 0C (Signet BitVM2 + Governance)Implement inner STARK (BLS12-381 + SMT) → outer Groth16 BN254 circuit (<= 15 min GPU prover target), per-block OP_HASH160 w=4 W-OTS AssertCertDATx + 7-chunk Leaf-3B SHA-256 (G-23), closed R=8 staggered-CLTV DAG + 1p1c package relay policy tests (G-1), measure REAL assert/DA/SHA-256-chunk weights & peak stack replacing ASSUMED_STAGE_0C_TARGET_* (G-2); deploy GovernanceContract + MultisigContract (M-15 hard gate).Published Signet txids for 2-in rollover, RoundKickoffTx, RoundRetireTx, staggered StaleConnB/CKillTx (56d) & StaleChainBurnTx (58d), Take1Tx+CPFP, ChallengeTx→AssertCertDATx+AssertChunk→Take2Tx+CPFP (both 1-cert zero-handoff and 2-cert), DisproveTx (incl. Leaf-3B SHA-256 + forward-hashed digit rejection!), BurnBond*Tx, WrongDepositDisproveTx^{T1,T2}, and all MUST-fail vectors; zero single-key SporkAddress.
Stage 1A (Shadow)Publish pinned BTC-ENFORCEMENT-V1 bytes (enforcementSpecHash), Groth16 CRS ceremony transcript (>= 50 contributors), audits, funded Operations Reserve (>= 0.5 BTC). Run d_btc_asset in Status = PAUSED (SubmitInput/SubmitBatch/Challenge*/FinalizeBatch LIVE; ONLY RelayClaim/RequestPegOut disabled).>= 30 days uninterrupted mainnet header/retarget tracking & batch finalization; zero watcher divergence; published Signet permanent-failure drills.
Stage 1B (Capped Pilot)Unpause d_btc_asset via GovernanceContract exit window with D_bucket = 1.0 BTC, M >= 5 ops × 2 lanes (3.70 BTC/lane = 37.0 BTC steady / 74.0 BTC 8–28d overlap, R = 8 ⇒ 80 day-0 fresh capacity, 1.82 BTC/day) + OperatorBond_ZNN >= 31,500 ZNN/op + 500 ZNN SlotBondZnn, T_kill = 56d / T_bond_expiry = 58d, MaxRepresentationSupply = 15 BTC (weekly Governance check <= 157,500 ZNN), AggregateInFlightMint <= 10 BTC, K_pilot = 14, altruistic watcher pool (>= 1.46 BTC/lane).Live peg-in, feeless transfers, anti-censorship fronting + single-use reimbursement, routine 30-day rotation (with disclosed 5.0d pre-epoch DeferredLockQueue window), and non-delivery refund verified with zero conservation drift.

Attack this spec & submit feedback

This is a Public RFC updated to v2 (v3.1.0-rfc) in response to Consolidated Hostile Review R8 (redlining against archived v1 / v3.0.0-rfc). Humans and AI review agents are invited to run python3 -I scripts/verify_spec_bounds.py, inspect the v1 → v2 changelog & redlines, file findings, or open pull requests.