v2 (v3.1.0-rfc) · public rfc · zero-federation · not mainnet-active
Part 5: go-zenon Upgrade Plan, Zero-Hard-Fork Custody Boundary & Pre-Mainnet Conformance Gates (G1–G7)
Showing word-highlighted redline changes from archived v1 (v3.0.0-rfc) to v2 (v3.1.0-rfc). For structured finding-by-finding rationale, see theChangelog.
| @@ -1,6 +1,6 @@ | |||
| 1 | - | # Part 5: `go-zenon` Upgrade Plan, Zero-Hard-Fork Custody Boundary & 3-Stage Delivery Roadmap | |
| 1 | + | # Part 5: `go-zenon` Upgrade Plan, Zero-Hard-Fork Custody Boundary & Pre-Mainnet Conformance Gates (`G1–G7`) | |
| 2 | 2 | ||
| 3 | - | **Document Class:** Engineering Upgrade & Delivery Blueprint (`v1` / `v3.0.0-rfc` — Zero-Federation Phased Architecture; supersedes archived `v0` `v2.5.0-rfc`) | |
| 4 | - | **Reference Codebase Verified:** Local `go-zenon` clone is at `master` (`e8986a6`, `v0.0.10-alphanet`) and `origin/dev` (`770e893`). | |
| 3 | + | **Document Class:** Engineering Upgrade & Delivery Blueprint (`v2` / `v3.1.0-rfc` — Zero-Federation Phased Architecture; supersedes archived `v1` `v3.0.0-rfc` and `v0` `v2.5.0-rfc`) | |
| 4 | + | **Reference Codebase Verified:** Local `go-zenon` clone is at `master` (`e8986a6`, `v0.0.10-alphanet`) and `origin/dev` (`770e893`); Bitcoin node floor pinned to **Bitcoin Core `>= 29.0` (`v31.0` preferred)**. | |
| 5 | 5 | **Consistency Checker:** [`scripts/verify_spec_bounds.py`](../scripts/verify_spec_bounds.py) | |
| 6 | 6 | ||
| @@ -9,23 +9,24 @@ | |||
| 9 | 9 | ## 1. Architectural Upgrade Principle: Zero `go-zenon` Custody Authority & Zero Hard Fork for Stage 1A/1B | |
| 10 | 10 | ||
| 11 | - | Unlike archived `v0` (which demanded deep `go-zenon` consensus hard forks — `StateRootSpork`, `CommitteeRootSpork`, `OptimisticRefereeSpork`, ZNN slashing, and single-key governance custody controls), **`v1` decouples Bitcoin custody completely from `go-zenon` upgrades and Zenon governance**: | |
| 11 | + | Unlike archived `v0` (which demanded deep `go-zenon` consensus hard forks — `StateRootSpork`, `CommitteeRootSpork`, `OptimisticRefereeSpork`, ZNN slashing, and single-key governance custody controls), **`v2` decouples Bitcoin custody completely from `go-zenon` upgrades and Zenon governance**: | |
| 12 | 12 | ||
| 13 | 13 | | Stage | `go-zenon` Changes Required | Zenon Spork / Governance Authority Over BTC Custody | | |
| 14 | 14 | |---|---|---| | |
| 15 | - | | **Stage 0 (`Verify Bitcoin`: SPV Event Oracle + Non-Custodial PTLC/LN)** | Upstream `go-zenon` U0 release (`0aa299e` + `#239` closed) + `DynamicPlasmaSpork` (w/ 5-parameter variable bounds) + `PtlcSpork` + lightweight `BtcSpvOracleSpork` (`vm/embedded/btcspv`). | **NONE (`0 BTC` custody in Stage 0).** Oracle provides read-only Event Validity only. | | |
| 16 | - | | **Stage 1A (Right-Sized `BitVMX` `n = 8` + Sovereign ZK Rollup)** | **ZERO `go-zenon` consensus hard fork required!** Rollup sequencer/indexer reads standard `AccountBlock.Data` (`UserSend`) + Bitcoin L1 (`0x00`–`0x07`). | **ZERO!** `vk_STF` is immutably pinned on Bitcoin L1 at launch. Even total compromise of `SporkAddress` / `CommunitySporkAddress` or `100%` of Pillars cannot steal 1 satoshi or censor Bitcoin L1 `0x01` exits! | | |
| 17 | - | | **Stage 1B (`clArk` Alternative Gate)** | **ZERO `go-zenon` consensus hard fork required!** Uses open-source `Second bark/barkd` or `Ark Labs arkd` coordinated alongside Zenon indexing / Stage 0 SPV. | **ZERO!** Custody lives strictly in Bitcoin L1 `clArk` VTXO trees. | | |
| 18 | - | | **Stage 2 (Scale / BitVM3-GC / Track B Covenants)** | **ZERO `go-zenon` consensus hard fork required** for BTC custody. Optional `GovernanceContract` / `StateRoot` remain purely Zenon network UX infrastructure. | **ZERO!** Stage 1 vaults drain 1:1 via `0x01`; identical-STF scaling uses `N`-of-`N` voluntary Cohort 1 handover; backend swaps launch clean non-commingled `zBTC_v2`. | | |
| 15 | + | | **Stage 0 (`Verify Bitcoin`: SPV Event Oracle + Erlang-Hardened PTLC/LN)** | Upstream `go-zenon` mainnet release (Gate G6: `0aa299e`, `#239`/`#299`/`#312` closed, mainnet `PTLC PR #138` & `DynamicPlasmaSpork` w/ 5-param `SetPlasmaVariables` pinning, lightweight `BtcSpvOracleSpork` `vm/embedded/btcspv`). | **NONE (`0 BTC` custody in Stage 0).** Oracle provides read-only Event Validity only. | | |
| 16 | + | | **Stage 1A (Right-Sized `BitVMX` `n = 8` + Sovereign ZK Rollup)** | **ZERO `go-zenon` consensus hard fork required!** Rollup sequencer/indexer reads standard `AccountBlock.Data` (`UserSend`) + Bitcoin L1 (`0x00`–`0x07`). Requires **Bitcoin Core `>= 29.0`** (`v31.0` preferred) for `0`-sat `P2A` ephemeral dust + 1P1C package relay. | **ZERO!** `vk_STF` is immutably pinned on Bitcoin L1 at launch. Even total compromise of `SporkAddress` / `CommunitySporkAddress` or `100%` of Pillars cannot steal 1 satoshi or censor Bitcoin L1 `0x01` exits! | | |
| 17 | + | | **Stage 1B (`clArk` Alternative Gate)** | **ZERO `go-zenon` consensus hard fork required!** Uses open-source `Second bark/barkd` or `Ark Labs arkd` + automated watchtowers coordinated alongside Zenon indexing / Stage 0 SPV. | **ZERO!** Custody lives strictly in Bitcoin L1 `clArk` VTXO trees. | | |
| 18 | + | | **Stage 2 (Scale / BitVM3-GC / Track B Covenants)** | **ZERO `go-zenon` consensus hard fork required** for BTC custody. Optional `GovernanceContract` / `StateRoot` remain purely Zenon network UX infrastructure. | **ZERO!** Stage 1 vaults drain 1:1 via `0x01` (subject to `1-of-M` operator liveness); identical-STF scaling uses `N`-of-`N` voluntary Cohort 1 handover; backend swaps launch clean non-commingled `zBTC_v2`. | | |
| 19 | 19 | ||
| 20 | 20 | --- | |
| 21 | 21 | ||
| 22 | - | ## 2. Stage 0 `go-zenon` Prerequisites (`U0` Gate, `B1`, `B2`, Full Dynamic Plasma Pinning) | |
| 22 | + | ## 2. Stage 0 `go-zenon` Prerequisites (Gate G6, `B1`, `B2`, Full Dynamic Plasma Pinning, `R8-M08`) | |
| 23 | 23 | ||
| 24 | - | ### 2.1 Upstream `go-zenon` Release Gate (`0aa299e` & Issue `#239`) | |
| 24 | + | ### 2.1 Upstream `go-zenon` Mainnet Readiness Gate (`0aa299e`, `PR #138`, `#239`, `#299`, `#312`) | |
| 25 | 25 | ||
| 26 | - | - **Local Clone Honesty Disclosure:** As verified directly against the local `go-zenon` reference clone, `HEAD` (`master`) is `e8986a6` (`v0.0.10-alphanet`) and `origin/dev` is `770e893`. Upstream commit **`0aa299e`** (*post-VM hash re-verification fix for externally supplied blocks mutated by `ValidateSendBlock`*) is **not yet present in this local clone** and remains a hard upstream release prerequisite before activating Stage 0 sporks on mainnet. | |
| 27 | - | - **Close Upstream Issue `#239` (`B1` Blocking Gate for Stage 0 SPV Oracle):** | |
| 28 | - | - Embedded receives execute strictly FIFO per contract (`verifier/account_block.go:397-417`, `chain/account/sequencer.go:19-33`). On `master`, a VM panic returns `ErrVmRunPanic` (`vm/supervisor.go:228`) and aborts `pillar/worker_contract_generator.go:38-40` without advancing the sequencer, permanently stalling the contract. | |
| 29 | - | - **Normative Gate:** Every embedded method in `BtcSpvOracleContract` and `vm/embedded/btcspv/` MUST wrap execution in `defer func() { if r := recover(); r != nil { err = constants.ErrInvalidMethodParam } }()`, contain **zero** calls to `common.DealWithErr`, and rely on `#239`'s deterministic failure provenance so bounded receive retries ALWAYS terminate in a canonical failed receive (never a FIFO stall). | |
| 26 | + | - **Mainnet vs `dev` Honesty Disclosure (`R8-M08`):** Live `go-zenon` mainnet currently runs `v0.0.10` (`master` `e8986a6`, `v1` Momentums capped at `100` blocks/Momentum ≈ `8.8–10.0` blocks/s network-wide). `DynamicPlasmaSpork` (`v2`) and `PtlcSpork` (`PR #138`) are implemented on `dev`/devnet (`origin/dev` `770e893`) and await mainnet merge and spork activation. Upstream commit **`0aa299e`** (*post-VM hash re-verification fix for externally supplied blocks mutated by `ValidateSendBlock`*) is not yet present in the local reference clone. | |
| 27 | + | - **Explicit Open Upstream Issues Blocking Stage 0 Mainnet (Gate G6):** | |
| 28 | + | 1. **Issue `#239` (`B1` — Deterministic Failed Receive / FIFO Panic Stall):** Embedded receives execute strictly FIFO per contract (`verifier/account_block.go:397-417`, `chain/account/sequencer.go:19-33`). On `master`, a VM panic returns `ErrVmRunPanic` (`vm/supervisor.go:228`) and aborts `pillar/worker_contract_generator.go:38-40` without advancing the sequencer, permanently stalling the contract. Every embedded method in `BtcSpvOracleContract` and `vm/embedded/btcspv/` MUST wrap execution in `defer func() { if r := recover(); r != nil { err = constants.ErrInvalidMethodParam } }()`, contain **zero** calls to `common.DealWithErr`, and rely on `#239`'s canonical failed-receive closure. *(Provenance note: verify `#239`'s final merged commit hash against the tagged mainnet release prior to spork activation.)* | |
| 29 | + | 2. **Open `go-zenon` Issues `#299` and `#312` (`R8-M08`):** Both open upstream issues MUST be resolved and verified in the tagged mainnet release before activating Stage 0 `BtcSpvOracleSpork` or `PtlcSpork` (`PR #138`). | |
| 30 | + | 3. **`PTLC PR #138` Mainnet Merge & Spork Activation:** `PtlcSpork` (`PR #138`) MUST be merged, tagged, and activated on mainnet alongside `DynamicPlasmaSpork`. | |
| 30 | 31 | ||
| 31 | 32 | ### 2.2 `DynamicPlasmaSpork` & Full 5-Parameter `SetPlasmaVariables` Pinning (`B2`) | |
| @@ -34,9 +35,5 @@ | |||
| 34 | 35 | ||
| 35 | 36 | **Complete `SetPlasmaVariables` Lower/Upper Parameter Pinning:** | |
| 36 | - | In unmodified `origin/dev:vm/embedded/definition/plasma.go:66-84`, `SetPlasmaVariables` (controlled by single-key `SporkAddress` / `CommunitySporkAddress` at `origin/dev:vm/embedded/implementation/plasma.go:199`) permits: | |
| 37 | - | - `MaxBasePlasmaInMomentumLowerLimit = 210,000` (`L66`, blocking every SPV call `> 2,011 B` in `pillar/content_selector.go:328`), AND | |
| 38 | - | - `FusedPlasmaTargetLowerLimit = 1` (`L69`), `PowPlasmaTargetLowerLimit = 1` (`L72`), `PriceChangeDenominatorLowerLimit = 1` (`L84`). Setting `target = 1` and `denom = 1` allows a single transaction to trigger the maximum per-Momentum price jump (`1.25^52 > 100,000×` in ~10 minutes!). | |
| 39 | - | ||
| 40 | - | Therefore, `BtcSpvOracleSpork` MUST enforce **ALL FIVE** `SetPlasmaVariables` guardrails simultaneously: | |
| 37 | + | In unmodified `origin/dev:vm/embedded/definition/plasma.go:66-84`, `SetPlasmaVariables` (controlled by single-key `SporkAddress` / `CommunitySporkAddress` at `origin/dev:vm/embedded/implementation/plasma.go:199`) permits `MaxBasePlasmaInMomentumLowerLimit = 210,000` (`L66`) and `FusedPlasmaTargetLowerLimit = 1`, `PowPlasmaTargetLowerLimit = 1`, `PriceChangeDenominatorLowerLimit = 1` (allowing a `>100,000×` 10-minute price spike from a single tx!). Therefore `BtcSpvOracleSpork` MUST enforce **ALL FIVE** guardrails simultaneously: | |
| 41 | 38 | ||
| 42 | 39 | | Parameter (`vm/embedded/definition/plasma.go`) | Unmodified `origin/dev` Bound | Normative Stage 0 Spork Floor / Ceiling | Why Required | | |
| @@ -52,44 +49,49 @@ | |||
| 52 | 49 | ### 2.3 Stage 0 SPV Event Oracle & Non-Custodial Swaps (`BtcSpvOracleSpork` + `PtlcSpork`) | |
| 53 | 50 | ||
| 54 | - | 1. Activate **`PtlcSpork`**, **`EmbeddedRefundSpork`**, **`Libp2pSpork`**, and **`EpochRewardTermsSpork`** (all implemented on `origin/dev:common/types/spork.go`). | |
| 55 | - | 2. Deploy lightweight **`BtcSpvOracleContract`** (`vm/embedded/btcspv/`: `header.go`, `tx.go` with 1-/2-block coinbase midstate verification, `oracle.go` — **zero** custody, minting, or federation code!). | |
| 56 | - | 3. Add local RPC/indexer helpers (`DeleteMomentum` WebSocket `momentumsReverted` push + HTLC/PTLC `getByDestination`/`getByPointLock`/`getByHashLock`) for wallets and Stage 0 swap LPs. | |
| 51 | + | 1. Activate **`PtlcSpork` (`PR #138`)**, **`EmbeddedRefundSpork`**, **`Libp2pSpork`**, and **`EpochRewardTermsSpork`** (implemented on `origin/dev:common/types/spork.go`). | |
| 52 | + | 2. Deploy lightweight **`BtcSpvOracleContract`** (`vm/embedded/btcspv/`: `header.go`, `tx.go` with `len(strippedTx) >= 65` and 1-/2-block coinbase midstate verification, `oracle.go` — **zero** custody, minting, or federation code!). | |
| 53 | + | 3. Add local RPC/indexer helpers (`DeleteMomentum` WebSocket `momentumsReverted` push + HTLC/PTLC `getByDestination`/`getByPointLock`/`getByHashLock`) plus automated **block-72 high-fee RBF PTLC refund watchtower** software (`R8-H07`). | |
| 57 | 54 | 4. *(Recommended Non-Custodial Zenon Hygiene, Non-Blocking for BTC Custody):* Replace single-key `SporkAddress` / `CommunitySporkAddress` (`vm/embedded/implementation/spork.go:46-49, 117-119`, which can currently terminate all nodes via `os.Exit(2)` after `SporkMinHeightDelay = 6` Momentums at `chain/momentum_pool.go:53-68`) with a timelocked `GovernanceContract`. Even if un-upgraded, **`SporkAddress` compromise has `0` custody power over Stage 1A/1B BTC!** | |
| 58 | 55 | ||
| 59 | 56 | --- | |
| 60 | 57 | ||
| 61 | - | ## 3. Stage 1A / 1B Off-Chain Software Stack (Piggybacking on Open-Source Ecosystems) | |
| 58 | + | ## 3. Stage 1A / 1B Off-Chain Software Stack (Piggybacking on Open-Source Ecosystems, `R8-H05`) | |
| 62 | 59 | ||
| 63 | 60 | A small young engineering team (4–6 engineers) MUST NOT write custom Bitcoin Script Groth16 compilers or custom BitVM3 garbled-circuit frameworks from scratch. Both Stage 1 paths piggyback directly on audited/open-source Bitcoin stacks: | |
| 64 | 61 | ||
| 65 | 62 | - **Stage 1A (`BitVMX` `n = 8` Sovereign Rollup Stack — Primary Path for Pooled Fungible `zBTC`):** | |
| 66 | - | 1. **Reuse `BitVMX FORCE` / Fairgate Open-Source Core:** `BitVMX-CPU` (`RV32IM` RISC-V verifier & single-opcode Bitcoin Script evaluator) + `BitVMX-protocol` (pre-signed `n = 8` bisection graph builder & W-OTS commitment engine). | |
| 67 | - | 2. **Zenon Team's Focused Scope (Pure Rust → `RV32IM`):** | |
| 68 | - | - Deterministic Rollup STF $\mathcal{F}$ (stripped-block parser, BIP-141 witness verifier, SMT transitions, `ExitSlotUTXO` spend-or-refund, `B_zbtc` slashing) compiled cleanly to `RV32IM` (zero custom Bitcoin Script Groth16 circuits!). | |
| 69 | - | - `zbtc-sequencer` / `zbtc-batcher` daemon (reads Zenon `AccountBlock.Data`, builds `π_batch`, posts `0x02 BATCH_DA`). | |
| 70 | - | - Operator fronting & `StakeChain` daemon (`M = 3–5`) + `N = 7` Verifier watchtower daemon (monitors `KickoffTx_r` and opens simultaneous `ChallengeTx_{r,i}` in `[0, 144]`). | |
| 63 | + | 1. **Off-Chain ZK Prover (`zbtc-prover`):** Executes the full deterministic Rollup STF $\mathcal{F}$ (stripped-block scanning `<= 1 MB`, fail-closed BIP-141 witness authentication on last `0x6a24aa21a9ed` coinbase output, full stripped-`vin` tracked-UTXO scanning, SMT conservation `V_unassigned + V_assigned = C + L + E + R + A + B`, $2^M$ Hall's Marriage check, interactive heaviest-chainwork comparison) off-chain and produces a constant-size wrapped SNARK proof (`vk_STF`). | |
| 64 | + | 2. **Reuse `BitVMX FORCE` / Fairgate Open-Source Core (`RV32IM` Wrapped-SNARK Verifier Only — `R8-H05`):** `BitVMX-CPU` (`RV32IM`) executes **strictly the constant-size `vk_STF` wrapped SNARK verifier** (`<= 0.5 × 8^9` steps, Gate G2 — NEVER bare 1 MB SHA-256 block scanning!) + `BitVMX-protocol` (pre-signed `n = 8` TRUC v3 bisection graph & W-OTS commitment engine targeting **Bitcoin Core `>= 29.0`**, `v31.0` preferred). | |
| 65 | + | 3. **Operational Daemons:** | |
| 66 | + | - `zbtc-sequencer` / `zbtc-batcher` (reads Zenon `AccountBlock.Data`, enforces `500`-sat new-leaf deposit + `<= 1,000`/epoch cap + slotted batcher priority, posts `0x02 BATCH_DA`). | |
| 67 | + | - Operator fronting & `StakeChain` daemon (`M = 3–5`, manages `AdmissionTicketUTXO`s, `ExitSlotUTXO` fronting, `TransferCredit`, direct-to-miner submission rails, and `>= 144`-blk rollback snapshots for `DEEP_REORG_HALT`). | |
| 68 | + | - `N = 7` Verifier watchtower daemon (monitors `RoundTx_r`, opens simultaneous `ChallengeTx_{r,i}` + `ChalProofConnector_{r,i}` in `[0, 144]`, replicates & audits `zbtc-vault-bundle-v1` across `>= 3` public mirrors, maintains direct-to-miner P2A CPFP rails). | |
| 71 | 69 | - **Stage 1B (`clArk` Alternative Gate Stack):** | |
| 72 | - | - Fork/integrate mainnet-live **`Second bark/barkd`** or **`Ark Labs arkd`** (`2–5 BTC` active ASP liquidity) + lightweight Zenon coordination/SPV client (`~3–6` months). | |
| 70 | + | - Fork/integrate mainnet-live **`Second bark/barkd`** or **`Ark Labs arkd`** (`2–5 BTC` active ASP liquidity) + automated VTXO refresh watchtowers + lightweight Zenon coordination/SPV client (`~3–6` months). | |
| 73 | 71 | ||
| 74 | 72 | --- | |
| 75 | 73 | ||
| 76 | - | ## 4. Concrete 3-Stage Delivery Roadmap & Capital Gates | |
| 74 | + | ## 4. Concrete 3-Stage Delivery Roadmap & Capital Gates (`R8-M09`, `R8-H08`) | |
| 77 | 75 | ||
| 78 | - | | Stage | Timeline (4–6 Engineers) | Hard BTC Capital Required | Deliverables & Security Milestone | Exit / Migration Guarantee | | |
| 76 | + | | Stage | Timeline (4–6 Engineers) | Full Hard BTC Capital Required | Deliverables & Security Milestone | Exit / Migration Guarantee | | |
| 79 | 77 | |---|---|---:|---|---| | |
| 80 | - | | **Stage 0: `Verify Bitcoin` Foundation** *(Mandatory Start)* | **`0–6 months`** | **`0 BTC` bonds** (`0–5 BTC` voluntary LP) | Upstream `U0` (`0aa299e` + `#239`) + `DynamicPlasmaSpork` (5-param pin) + `PtlcSpork` + Stage 0 `BtcSpvOracleContract` (1-/2-block midstate) + non-custodial PTLC/LN swaps. Parallel Signet prototype of Rollup STF $\mathcal{F}$ on `BitVMX-CPU`. | Zero custody risk; users hold native BTC on L1/LN at all times. | | |
| 81 | - | | **Stage 1 Decision Gate** | **Month 6 Gate** | *Gate Check* | **Choose Stage 1A ONLY if** pooled fungible non-expiring `zBTC` is non-negotiable **AND** `>= 12.8–18.8 BTC` of independent bonded BTC is committed for `12–18+` months (incl. audit). **Otherwise choose Stage 1B (`clArk`)** (`2–5 BTC` active liquidity, `3–6 mo` launch) — NEVER under-bond BitVMX/BitVM2 below `500 sat/vB`! | Explicit upfront commitment; zero hidden federation fallback. | | |
| 82 | - | | **Stage 1A: Right-Sized `BitVMX` (`n = 8`, `M = 3–5`, `N = 7`) Sovereign Rollup** | **`12–18+ months`** *(incl. external Bitcoin Script + STF audit)* | **`12.8 BTC`** (`M = 3`, `Cap <= 10 BTC`) / **`18.8 BTC`** (`M = 5`, `Cap <= 15 BTC`) | Mainnet `BitVMX` `n = 8` TRUC v3 vaults (`{0.50, 0.25, 0.25}`), `0-of-N` Zenon trust (`49%–100%` proof), Bob `0.50` & Mike `0.25` L1 forced exits, `100%` positive-EV `N = 7` verifiers even under `6-of-7` collusion. | Deleted-key vaults remain 100% live forever; zero governance capture surface. | | |
| 83 | - | | **Stage 1B *(Alt)*: `clArk` + Zenon SPV/PTLC** | **`3–6 months`** | **`2–5 BTC`** active ASP liquidity (`0` bonds) | Mainnet `bark`/`arkd` VTXO rounds + Zenon coordination. Pure `0-of-N` post-round unilateral exit; honest disclosure of `arkoor` sender+ASP collusion, VTXO expiry, and discrete non-pooled VTXOs. | Users hold self-custodial pre-signed L1 exit branches at all times. | | |
| 84 | - | | **Stage 2: Zero-TTP Scale & Upgrade** | **`12+ months` post-Stage 1** | Scales with TVL (`K = 36` → `50 BTC`; `K = 144` → `200 BTC`) | (a) Identical-STF scaling (`M = 5 → 20`, `L = 1 → 4`) via voluntary `N`-of-`N` Cohort 1 handover; (b) Backend upgrade to mature reusable BitVM3-GC, BitVM2, or **Track B Pure Tier-0 Covenants (`OP_CCV + OP_TXHASH + OP_VERIFY_STARK` / `OP_CAT`)** via clean non-commingled `zBTC_v2`. | Zero dead-end migration: Stage 1 vaults drain organically 1:1 via `0x01` exits (zero deleted-key L1 rollover magic!). | | |
| 78 | + | | **Stage 0: `Verify Bitcoin` Foundation** *(Mandatory Start)* | **`0–6 months`** | **`0 BTC` bonds** (`0–5 BTC` voluntary LP) | Gate G6 (`0aa299e`, `#239`/`#299`/`#312`, mainnet `PR #138` & `DynamicPlasmaSpork` 5-param pin) + Stage 0 `BtcSpvOracleContract` (`len >= 65`, 1-/2-block midstate) + Erlang-hardened PTLC (`>= 48h`, block-72 RBF watchtower) / LN HTLC (`>= 24h`) swaps. Parallel Signet prototype of `vk_STF` on `BitVMX-CPU` & BitVM3-GC evaluation (Gate G2). | Zero custody risk; users hold native BTC on L1/LN at all times. | | |
| 79 | + | | **Stage 1 Decision Gate** | **Month 6 Gate** | *Gate Check* | **Choose Stage 1A ONLY if** pooled fungible non-expiring `zBTC` is non-negotiable **AND** **`>= 14.75–21.25 BTC`** single-dispute operational hard BTC (`12.80–18.80` locked + reserves, plus multi-dispute headroom) is committed for `12–18+` months (incl. audit). **Otherwise choose Stage 1B (`clArk`)** (`2–5 BTC` active liquidity, `3–6 mo` launch) — NEVER under-bond BitVMX/BitVM2! | Explicit upfront commitment; zero hidden federation fallback. | | |
| 80 | + | | **Stage 1A: Right-Sized `BitVMX` (`n = 8`, `M = 3–5`, `N = 7`) Sovereign Rollup** | **`12–18+ months`** *(incl. Gates G1–G5 & M-15 external audit)* | **Locked:** `12.80` (`M=3`) / `18.80 BTC` (`M=5`); **Op Baseline:** **`14.75 / 21.25 BTC`** (`~17–26+` multi-dispute) | Mainnet Core `>= 29.0` TRUC v3 vaults (`{0.50, 0.25, 0.25}`, acyclic `vault_id`, `AdmissionTicketUTXO`, $2^M$ Hall, `V=C+L+E+R+A+B`, native-L1 `Stake_r` verifier payouts `+0.0645/+0.0232 BTC` EV @ `500/750 sat/vB`), **graduated TVL ramps (`2 → 5 → 10/15 BTC`)**. | Non-expiring deleted-key vaults redeemable 1:1 via `0x01` subject to `1-of-M` operator liveness (plus voluntary unwind circuit breaker, `spec/01 §6.3`). | | |
| 81 | + | | **Stage 1B *(Alt)*: `clArk` + Zenon SPV/PTLC** | **`3–6 months`** | **`2–5 BTC`** active ASP liquidity (`0` bonds) | Mainnet `bark`/`arkd` VTXO rounds + automated watchtowers + Zenon coordination. Pure `0-of-N` post-round unilateral exit; explicit UX separation of trustless in-round VTXOs vs `arkoor` balances. | Users hold self-custodial pre-signed L1 exit branches at all times. | | |
| 82 | + | | **Stage 2: Zero-TTP Scale & Upgrade** | **`12+ months` post-Stage 1** | Scales with TVL (`K = 42` → `50 BTC`; `K = 144` → `200 BTC`) | (a) Identical-STF scaling (`M = 5 → 20`, `L = 1 → 4`) via voluntary `N`-of-`N` Cohort 1 handover; (b) Backend upgrade to mature reusable BitVM3-GC, BitVM2, or **Track B Pure Tier-0 Covenants (`OP_CCV + OP_TXHASH + OP_VERIFY_STARK` / `OP_CAT`)** via clean non-commingled `zBTC_v2`. | Zero dead-end migration: Stage 1 vaults drain organically 1:1 via `0x01` exits (zero deleted-key L1 rollover magic!). | | |
| 85 | 83 | ||
| 86 | 84 | --- | |
| 87 | 85 | ||
| 88 | - | ## 5. Mandatory CI & Conformance Verification Gates | |
| 86 | + | ## 5. Mandatory Pre-Mainnet Conformance Gates (`G1–G7`, Closing R8 §22 & M-15) | |
| 89 | 87 | ||
| 90 | - | 1. **Symbol & Line-Hash Citation CI:** Automated check pinning every `go-zenon` symbol cited in Parts 2–5 against the tagged U0 release containing `0aa299e` and `#239`. | |
| 91 | - | 2. **Panic & FIFO-Stall Fuzz Gate (`B1`):** Continuous fuzzer across all 4 Stage 0 `BtcSpvOracleContract` methods asserting zero panics, zero `common.DealWithErr` calls, and zero sequencer stalls. | |
| 92 | - | 3. **Dynamic Plasma 5-Parameter Bounds & 1-/2-Block Midstate Vectors (`B2`):** MUST-fail tests verifying `SetPlasmaVariables` rejects ANY violation of the 5 pinned bounds (`MaxBasePlasmaInMomentum < 2.1M`, `MaxPriceChangePercent > 25`, `FusedPlasmaTarget < 525k`, `PowPlasmaTarget < 525k`, `PriceChangeDenominator < 8`), plus 1-block and 2-block SHA-256 coinbase midstate vectors. | |
| 93 | - | 4. **Stage 0 PTLC/LN Adversarial Suite (`M-4`):** Signet↔Zenon tests asserting absolute Unix timestamp `now + 108,000`, `2.3×` slow-block `25.3h < 30h` margin, `>= 72`-block CSV, CPFP confirm `<= h_conf + 66`, BIP-327 odd-$y(R')$ parity, `hashType = 0` rejection, and LN Hold Invoice `ACCEPTED`-first + 5-minute cancel TTL. | |
| 94 | - | 5. **Stage 1A `BitVMX` `n = 8` & Rollup STF Conformance Suite:** Deterministic verification of `scripts/verify_spec_bounds.py` (`7.44 kvB <= 10 kvB` TRUC v3, `0.40 BTC` `F_chal` @ `500 sat/vB`, `1,104 < 1,152 < 1,296 < 1,440` timelocks, `k_collude = 0..6` positive verifier EV, `0.01 BTC` `ExitSlotUTXO` grief slash, `256`-bit Lamport `TakeTx` `<= 3.2 kvB`, real Bitcoin reorgs, and 2,000-step strict 1:1 solvency conservation). | |
| 88 | + | Mainnet deployment of Stage 0 or Stage 1A MUST remain blocked until every applicable gate below publishes publicly reproducible verification artifacts: | |
| 89 | + | ||
| 90 | + | 1. **Gate G1 — Bitcoin Core `v29.0+` (`v31.0` Preferred) `regtest` & `signet` End-to-End Graph Execution:** Execute consensus-valid serialized `DepositTx` (acyclic `vault_id` + `AdmissionTicketUTXO` consumption), active-operator `ExitSlotUTXO` (fronting, cyclic priority, `k = 20` grief burst, `EXIT_CANCEL`), `RoundTx_r`, full 20-step `n = 8` bisection with `153 vB` `0`-sat `P2A` 1P1C package relay, sibling-eviction stress + direct-to-miner rails, `TakeTx` (`<= 3,200 vB` recycling `AdmissionTicketUTXO`), `DisproveTx_{r,i}` + `ChalPayoutEscrow` native-L1 payouts, and `BurnBondTx_{r,k}` on live Bitcoin Core `>= 29.0` `regtest` and `signet` with zero policy or consensus rejections. | |
| 91 | + | 2. **Gate G2 — Compiled `RV32IM` Wrapped-SNARK Verifier Trace Proof (or Reusable `BitVM3-GC` Evaluation):** Publish reproducible Rust → `RV32IM` source and compiled ELF binary of the exact disputed `vk_STF` wrapped SNARK verifier guest, executing worst-case adversarial inputs and proving `init_steps + exec_steps <= 0.5 × 8^9 = 67,108,864` (if exceeded, bump `l = 10` or benchmark mature reusable `BitVM3-GC` + Clementine before code freeze). | |
| 92 | + | 3. **Gate G3 — Independent Execution of Extended Consistency & Bounds Checker:** Run `python3 -I scripts/verify_spec_bounds.py` (recording exact Git commit, `public/raw/SHA256SUMS.txt`, Python version, stdout, and exit code 0) verifying all Stage 0 Erlang tails, Stage 1A acyclic Lamport/TRUC v3/native-L1 EV/$2^M$ Hall/Budish/DA bounds, and `>= 2,000` (and CI `>= 100,000`-step nightly) randomized transitions exercising `V_unassigned + V_assigned == C + L + E + R + A + B`. | |
| 93 | + | 4. **Gate G4 — `vk_STF` Formal Verification & Bitcoin Core Differential Consensus Fuzzing (`R8-H08`):** Formally verify `V_unassigned + V_assigned == C + L + E + R + A + B`, the $2^M$ Hall's Marriage Invariant, fail-closed BIP-141 witness completeness (last `0x6a24aa21a9ed` coinbase output), and full stripped-`vin` tracking inside the ZK constraint system, AND differentially fuzz the Bitcoin parser against Bitcoin Core's `tx_valid`/`tx_invalid`, `CVE-2012-2459`, and `CVE-2017-12842` suites alongside an independent third-party audit (**M-15**). | |
| 94 | + | 5. **Gate G5 — Public `zbtc-vault-bundle-v1` Archival Disaster-Recovery Drill (`R8-H06`):** Destroy all private operator and presigner databases on Signet and prove `100%` recovery of both honest `TakeTx` reimbursements and `DisproveTx`/`BurnBondTx` fraud-proof slashing strictly from `>= 3` public `zbtc-vault-bundle-v1` mirrors plus Bitcoin headers. | |
| 95 | + | 6. **Gate G6 — `go-zenon` Mainnet Readiness, Panic/FIFO Fuzz & Stage 0 PTLC Suite (`R8-M08`, `B1`, `B2`, `R8-H07`):** Confirm mainnet merge, tag, and spork activation of `0aa299e`, `PTLC PR #138` (`PtlcSpork`), `DynamicPlasmaSpork` (with MUST-fail tests verifying all 5 `SetPlasmaVariables` bounds), Stage 0 `BtcSpvOracleContract` (zero-panic FIFO fuzz gate, `len(strippedTx) >= 65`, 1-/2-block coinbase midstate vectors), closure of open `go-zenon` issues `#239`, `#299`, and `#312`, and Signet↔Zenon PTLC/LN adversarial tests (`T_znn >= 48h`, `Δ_safety_sec >= 24h`, automated block-72 RBF watchtower, `hashType = 1`, LN Hold Invoice 5-min cancel TTL). | |
| 96 | + | 7. **Gate G7 — Local Repository Audit Trail & Release Integrity Pinning (`R8-L02`):** Verify every `v2` normative file against generated `public/raw/SHA256SUMS.txt` and frozen `versions/v1/SHA256SUMS.txt` & `versions/v0/SHA256SUMS.txt` in CI, keeping `CHANGELOG.md` synchronized with every `R1–R8` disposition. | |
| 95 | 97 | ||
Document Class: Engineering Upgrade & Delivery Blueprint (v2 / v3.1.0-rfc — Zero-Federation Phased Architecture; supersedes archived v1 v3.0.0-rfc and v0 v2.5.0-rfc)
Reference Codebase Verified: Local go-zenon clone is at master (e8986a6, v0.0.10-alphanet) and origin/dev (770e893); Bitcoin node floor pinned to Bitcoin Core >= 29.0 (v31.0 preferred).
Consistency Checker: scripts/verify_spec_bounds.py
1. Architectural Upgrade Principle: Zero go-zenon Custody Authority & Zero Hard Fork for Stage 1A/1B
Unlike archived v0 (which demanded deep go-zenon consensus hard forks — StateRootSpork, CommitteeRootSpork, OptimisticRefereeSpork, ZNN slashing, and single-key governance custody controls), v2 decouples Bitcoin custody completely from go-zenon upgrades and Zenon governance:
| Stage | go-zenon Changes Required | Zenon Spork / Governance Authority Over BTC Custody |
|---|---|---|
Stage 0 (Verify Bitcoin: SPV Event Oracle + Erlang-Hardened PTLC/LN) | Upstream go-zenon mainnet release (Gate G6: 0aa299e, #239/#299/#312 closed, mainnet PTLC PR #138 & DynamicPlasmaSpork w/ 5-param SetPlasmaVariables pinning, lightweight BtcSpvOracleSpork vm/embedded/btcspv). | NONE (0 BTC custody in Stage 0). Oracle provides read-only Event Validity only. |
Stage 1A (Right-Sized BitVMX n = 8 + Sovereign ZK Rollup) | ZERO go-zenon consensus hard fork required! Rollup sequencer/indexer reads standard AccountBlock.Data (UserSend) + Bitcoin L1 (0x00–0x07). Requires Bitcoin Core >= 29.0 (v31.0 preferred) for 0-sat P2A ephemeral dust + 1P1C package relay. | ZERO! vk_STF is immutably pinned on Bitcoin L1 at launch. Even total compromise of SporkAddress / CommunitySporkAddress or 100% of Pillars cannot steal 1 satoshi or censor Bitcoin L1 0x01 exits! |
Stage 1B (clArk Alternative Gate) | ZERO go-zenon consensus hard fork required! Uses open-source Second bark/barkd or Ark Labs arkd + automated watchtowers coordinated alongside Zenon indexing / Stage 0 SPV. | ZERO! Custody lives strictly in Bitcoin L1 clArk VTXO trees. |
| Stage 2 (Scale / BitVM3-GC / Track B Covenants) | ZERO go-zenon consensus hard fork required for BTC custody. Optional GovernanceContract / StateRoot remain purely Zenon network UX infrastructure. | ZERO! Stage 1 vaults drain 1:1 via 0x01 (subject to 1-of-M operator liveness); identical-STF scaling uses N-of-N voluntary Cohort 1 handover; backend swaps launch clean non-commingled zBTC_v2. |
2. Stage 0 go-zenon Prerequisites (Gate G6, B1, B2, Full Dynamic Plasma Pinning, R8-M08)
2.1 Upstream go-zenon Mainnet Readiness Gate (0aa299e, PR #138, #239, #299, #312)
- Mainnet vs
devHonesty Disclosure (R8-M08): Livego-zenonmainnet currently runsv0.0.10(mastere8986a6,v1Momentums capped at100blocks/Momentum ≈8.8–10.0blocks/s network-wide).DynamicPlasmaSpork(v2) andPtlcSpork(PR #138) are implemented ondev/devnet (origin/dev770e893) and await mainnet merge and spork activation. Upstream commit0aa299e(post-VM hash re-verification fix for externally supplied blocks mutated byValidateSendBlock) is not yet present in the local reference clone. - Explicit Open Upstream Issues Blocking Stage 0 Mainnet (Gate G6):
- Issue
#239(B1— Deterministic Failed Receive / FIFO Panic Stall): Embedded receives execute strictly FIFO per contract (verifier/account_block.go:397-417,chain/account/sequencer.go:19-33). Onmaster, a VM panic returnsErrVmRunPanic(vm/supervisor.go:228) and abortspillar/worker_contract_generator.go:38-40without advancing the sequencer, permanently stalling the contract. Every embedded method inBtcSpvOracleContractandvm/embedded/btcspv/MUST wrap execution indefer func() { if r := recover(); r != nil { err = constants.ErrInvalidMethodParam } }(), contain zero calls tocommon.DealWithErr, and rely on#239's canonical failed-receive closure. (Provenance note: verify#239's final merged commit hash against the tagged mainnet release prior to spork activation.) - Open
go-zenonIssues#299and#312(R8-M08): Both open upstream issues MUST be resolved and verified in the tagged mainnet release before activating Stage 0BtcSpvOracleSporkorPtlcSpork(PR #138). PTLC PR #138Mainnet Merge & Spork Activation:PtlcSpork(PR #138) MUST be merged, tagged, and activated on mainnet alongsideDynamicPlasmaSpork.
- Issue
2.2 DynamicPlasmaSpork & Full 5-Parameter SetPlasmaVariables Pinning (B2)
DynamicPlasmaSpork (origin/dev:dp/dp.go, origin/dev:vm/plasma.go:172-200) is a hard precondition for Stage 0 BtcSpvOracleSpork because it enables EmbeddedSendBasePlasma (tier + 68/byte past the 4-byte selector) and stale-acknowledgement rejection (origin/dev:chain/acknowledgement_recency.go).
Complete SetPlasmaVariables Lower/Upper Parameter Pinning:
In unmodified origin/dev:vm/embedded/definition/plasma.go:66-84, SetPlasmaVariables (controlled by single-key SporkAddress / CommunitySporkAddress at origin/dev:vm/embedded/implementation/plasma.go:199) permits MaxBasePlasmaInMomentumLowerLimit = 210,000 (L66) and FusedPlasmaTargetLowerLimit = 1, PowPlasmaTargetLowerLimit = 1, PriceChangeDenominatorLowerLimit = 1 (allowing a >100,000× 10-minute price spike from a single tx!). Therefore BtcSpvOracleSpork MUST enforce ALL FIVE guardrails simultaneously:
Parameter (vm/embedded/definition/plasma.go) | Unmodified origin/dev Bound | Normative Stage 0 Spork Floor / Ceiling | Why Required |
|---|---|---|---|
MaxBasePlasmaInMomentum | >= 210,000 (L66) | >= 2,100,000 | Guarantees >= 3 max ProveTxInclusion calls (591,388 Plasma) and dp.MaxContractBlocks >= 40 (dp/dp.go:259-264). |
MaxPriceChangePercent | <= 100 (L75) | <= 25 (default 10) | Caps per-Momentum adaptive step size. |
FusedPlasmaTarget | >= 1 (L69) | >= 525,000 (>= 25% of 2.1M floor) | Closes target = 1 exponential fused-Plasma price-spike DoS. |
PowPlasmaTarget | >= 1 (L72) | >= 525,000 (>= 25% of 2.1M floor) | Closes target = 1 exponential PoW-Plasma price-spike DoS. |
PriceChangeDenominator | >= 1 (L84) | >= 8 | Damps step amplification even under sustained 100% utilization. |
Honest Residual Dynamic Plasma Disclosure:
origin/dev:dp/dp.go:102-151intentionally has no absolute upper clamp onNextFusionPrice/NextWorkPrice, and fused QSR is refundable (zero burn). Even with all five bounds pinned, a well-funded QSR whale +49%malicious Pillars can still drive Zenon Plasma prices up exponentially over tens of minutes (1.10^72 ≈ 955×at default+10%/Momentum). This is explicitly safe for Stage 1A custody because Bob and Mike can always submit0x01 FORCED_EXIT/0x03 FORCED_TRANSFERdirectly on Bitcoin L1, completely bypassing Zenon Plasma!
2.3 Stage 0 SPV Event Oracle & Non-Custodial Swaps (BtcSpvOracleSpork + PtlcSpork)
- Activate
PtlcSpork(PR #138),EmbeddedRefundSpork,Libp2pSpork, andEpochRewardTermsSpork(implemented onorigin/dev:common/types/spork.go). - Deploy lightweight
BtcSpvOracleContract(vm/embedded/btcspv/:header.go,tx.gowithlen(strippedTx) >= 65and 1-/2-block coinbase midstate verification,oracle.go— zero custody, minting, or federation code!). - Add local RPC/indexer helpers (
DeleteMomentumWebSocketmomentumsRevertedpush + HTLC/PTLCgetByDestination/getByPointLock/getByHashLock) plus automated block-72 high-fee RBF PTLC refund watchtower software (R8-H07). - (Recommended Non-Custodial Zenon Hygiene, Non-Blocking for BTC Custody): Replace single-key
SporkAddress/CommunitySporkAddress(vm/embedded/implementation/spork.go:46-49, 117-119, which can currently terminate all nodes viaos.Exit(2)afterSporkMinHeightDelay = 6Momentums atchain/momentum_pool.go:53-68) with a timelockedGovernanceContract. Even if un-upgraded,SporkAddresscompromise has0custody power over Stage 1A/1B BTC!
3. Stage 1A / 1B Off-Chain Software Stack (Piggybacking on Open-Source Ecosystems, R8-H05)
A small young engineering team (4–6 engineers) MUST NOT write custom Bitcoin Script Groth16 compilers or custom BitVM3 garbled-circuit frameworks from scratch. Both Stage 1 paths piggyback directly on audited/open-source Bitcoin stacks:
- Stage 1A (
BitVMXn = 8Sovereign Rollup Stack — Primary Path for Pooled FungiblezBTC):- Off-Chain ZK Prover (
zbtc-prover): Executes the full deterministic Rollup STF $\mathcal{F}$ (stripped-block scanning<= 1 MB, fail-closed BIP-141 witness authentication on last0x6a24aa21a9edcoinbase output, full stripped-vintracked-UTXO scanning, SMT conservationV_unassigned + V_assigned = C + L + E + R + A + B, $2^M$ Hall's Marriage check, interactive heaviest-chainwork comparison) off-chain and produces a constant-size wrapped SNARK proof (vk_STF). - Reuse
BitVMX FORCE/ Fairgate Open-Source Core (RV32IMWrapped-SNARK Verifier Only —R8-H05):BitVMX-CPU(RV32IM) executes strictly the constant-sizevk_STFwrapped SNARK verifier (<= 0.5 × 8^9steps, Gate G2 — NEVER bare 1 MB SHA-256 block scanning!) +BitVMX-protocol(pre-signedn = 8TRUC v3 bisection graph & W-OTS commitment engine targeting Bitcoin Core>= 29.0,v31.0preferred). - Operational Daemons:
zbtc-sequencer/zbtc-batcher(reads ZenonAccountBlock.Data, enforces500-sat new-leaf deposit +<= 1,000/epoch cap + slotted batcher priority, posts0x02 BATCH_DA).- Operator fronting &
StakeChaindaemon (M = 3–5, managesAdmissionTicketUTXOs,ExitSlotUTXOfronting,TransferCredit, direct-to-miner submission rails, and>= 144-blk rollback snapshots forDEEP_REORG_HALT). N = 7Verifier watchtower daemon (monitorsRoundTx_r, opens simultaneousChallengeTx_{r,i}+ChalProofConnector_{r,i}in[0, 144], replicates & auditszbtc-vault-bundle-v1across>= 3public mirrors, maintains direct-to-miner P2A CPFP rails).
- Off-Chain ZK Prover (
- Stage 1B (
clArkAlternative Gate Stack):- Fork/integrate mainnet-live
Second bark/barkdorArk Labs arkd(2–5 BTCactive ASP liquidity) + automated VTXO refresh watchtowers + lightweight Zenon coordination/SPV client (~3–6months).
- Fork/integrate mainnet-live
4. Concrete 3-Stage Delivery Roadmap & Capital Gates (R8-M09, R8-H08)
| Stage | Timeline (4–6 Engineers) | Full Hard BTC Capital Required | Deliverables & Security Milestone | Exit / Migration Guarantee |
|---|---|---|---|---|
Stage 0: Verify Bitcoin Foundation (Mandatory Start) | 0–6 months | 0 BTC bonds (0–5 BTC voluntary LP) | Gate G6 (0aa299e, #239/#299/#312, mainnet PR #138 & DynamicPlasmaSpork 5-param pin) + Stage 0 BtcSpvOracleContract (len >= 65, 1-/2-block midstate) + Erlang-hardened PTLC (>= 48h, block-72 RBF watchtower) / LN HTLC (>= 24h) swaps. Parallel Signet prototype of vk_STF on BitVMX-CPU & BitVM3-GC evaluation (Gate G2). | Zero custody risk; users hold native BTC on L1/LN at all times. |
| Stage 1 Decision Gate | Month 6 Gate | Gate Check | Choose Stage 1A ONLY if pooled fungible non-expiring zBTC is non-negotiable AND >= 14.75–21.25 BTC single-dispute operational hard BTC (12.80–18.80 locked + reserves, plus multi-dispute headroom) is committed for 12–18+ months (incl. audit). Otherwise choose Stage 1B (clArk) (2–5 BTC active liquidity, 3–6 mo launch) — NEVER under-bond BitVMX/BitVM2! | Explicit upfront commitment; zero hidden federation fallback. |
Stage 1A: Right-Sized BitVMX (n = 8, M = 3–5, N = 7) Sovereign Rollup | 12–18+ months (incl. Gates G1–G5 & M-15 external audit) | Locked: 12.80 (M=3) / 18.80 BTC (M=5); Op Baseline: 14.75 / 21.25 BTC (~17–26+ multi-dispute) | Mainnet Core >= 29.0 TRUC v3 vaults ({0.50, 0.25, 0.25}, acyclic vault_id, AdmissionTicketUTXO, $2^M$ Hall, V=C+L+E+R+A+B, native-L1 Stake_r verifier payouts +0.0645/+0.0232 BTC EV @ 500/750 sat/vB), graduated TVL ramps (2 → 5 → 10/15 BTC). | Non-expiring deleted-key vaults redeemable 1:1 via 0x01 subject to 1-of-M operator liveness (plus voluntary unwind circuit breaker, spec/01 §6.3). |
*Stage 1B (Alt): clArk + Zenon SPV/PTLC* | 3–6 months | 2–5 BTC active ASP liquidity (0 bonds) | Mainnet bark/arkd VTXO rounds + automated watchtowers + Zenon coordination. Pure 0-of-N post-round unilateral exit; explicit UX separation of trustless in-round VTXOs vs arkoor balances. | Users hold self-custodial pre-signed L1 exit branches at all times. |
| Stage 2: Zero-TTP Scale & Upgrade | 12+ months post-Stage 1 | Scales with TVL (K = 42 → 50 BTC; K = 144 → 200 BTC) | (a) Identical-STF scaling (M = 5 → 20, L = 1 → 4) via voluntary N-of-N Cohort 1 handover; (b) Backend upgrade to mature reusable BitVM3-GC, BitVM2, or Track B Pure Tier-0 Covenants (OP_CCV + OP_TXHASH + OP_VERIFY_STARK / OP_CAT) via clean non-commingled zBTC_v2. | Zero dead-end migration: Stage 1 vaults drain organically 1:1 via 0x01 exits (zero deleted-key L1 rollover magic!). |
5. Mandatory Pre-Mainnet Conformance Gates (G1–G7, Closing R8 §22 & M-15)
Mainnet deployment of Stage 0 or Stage 1A MUST remain blocked until every applicable gate below publishes publicly reproducible verification artifacts:
- Gate G1 — Bitcoin Core
v29.0+(v31.0Preferred)regtest&signetEnd-to-End Graph Execution: Execute consensus-valid serializedDepositTx(acyclicvault_id+AdmissionTicketUTXOconsumption), active-operatorExitSlotUTXO(fronting, cyclic priority,k = 20grief burst,EXIT_CANCEL),RoundTx_r, full 20-stepn = 8bisection with153 vB0-satP2A1P1C package relay, sibling-eviction stress + direct-to-miner rails,TakeTx(<= 3,200 vBrecyclingAdmissionTicketUTXO),DisproveTx_{r,i}+ChalPayoutEscrownative-L1 payouts, andBurnBondTx_{r,k}on live Bitcoin Core>= 29.0regtestandsignetwith zero policy or consensus rejections. - Gate G2 — Compiled
RV32IMWrapped-SNARK Verifier Trace Proof (or ReusableBitVM3-GCEvaluation): Publish reproducible Rust →RV32IMsource and compiled ELF binary of the exact disputedvk_STFwrapped SNARK verifier guest, executing worst-case adversarial inputs and provinginit_steps + exec_steps <= 0.5 × 8^9 = 67,108,864(if exceeded, bumpl = 10or benchmark mature reusableBitVM3-GC+ Clementine before code freeze). - Gate G3 — Independent Execution of Extended Consistency & Bounds Checker: Run
python3 -I scripts/verify_spec_bounds.py(recording exact Git commit,public/raw/SHA256SUMS.txt, Python version, stdout, and exit code 0) verifying all Stage 0 Erlang tails, Stage 1A acyclic Lamport/TRUC v3/native-L1 EV/$2^M$ Hall/Budish/DA bounds, and>= 2,000(and CI>= 100,000-step nightly) randomized transitions exercisingV_unassigned + V_assigned == C + L + E + R + A + B. - Gate G4 —
vk_STFFormal Verification & Bitcoin Core Differential Consensus Fuzzing (R8-H08): Formally verifyV_unassigned + V_assigned == C + L + E + R + A + B, the $2^M$ Hall's Marriage Invariant, fail-closed BIP-141 witness completeness (last0x6a24aa21a9edcoinbase output), and full stripped-vintracking inside the ZK constraint system, AND differentially fuzz the Bitcoin parser against Bitcoin Core'stx_valid/tx_invalid,CVE-2012-2459, andCVE-2017-12842suites alongside an independent third-party audit (M-15). - Gate G5 — Public
zbtc-vault-bundle-v1Archival Disaster-Recovery Drill (R8-H06): Destroy all private operator and presigner databases on Signet and prove100%recovery of both honestTakeTxreimbursements andDisproveTx/BurnBondTxfraud-proof slashing strictly from>= 3publiczbtc-vault-bundle-v1mirrors plus Bitcoin headers. - Gate G6 —
go-zenonMainnet Readiness, Panic/FIFO Fuzz & Stage 0 PTLC Suite (R8-M08,B1,B2,R8-H07): Confirm mainnet merge, tag, and spork activation of0aa299e,PTLC PR #138(PtlcSpork),DynamicPlasmaSpork(with MUST-fail tests verifying all 5SetPlasmaVariablesbounds), Stage 0BtcSpvOracleContract(zero-panic FIFO fuzz gate,len(strippedTx) >= 65, 1-/2-block coinbase midstate vectors), closure of opengo-zenonissues#239,#299, and#312, and Signet↔Zenon PTLC/LN adversarial tests (T_znn >= 48h,Δ_safety_sec >= 24h, automated block-72 RBF watchtower,hashType = 1, LN Hold Invoice 5-min cancel TTL). - Gate G7 — Local Repository Audit Trail & Release Integrity Pinning (
R8-L02): Verify everyv2normative file against generatedpublic/raw/SHA256SUMS.txtand frozenversions/v1/SHA256SUMS.txt&versions/v0/SHA256SUMS.txtin CI, keepingCHANGELOG.mdsynchronized with everyR1–R8disposition.
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.