v0 (v2.5.0-rfc) · archived baseline · superseded
Part 4: Bitcoin Anchoring & Light Client Verification Specification
Document Class: Normative History-Anchoring, State-Proof & Light-Client Specification (v2.5.0-rfc, subject to Upstream Amendment A-PILLAR-1)
Upstream Baselines: bigidea, Project Zeno/merkle-state/MERKLE_STATE_ROOT.md, MERKLE_STATE_L2_ALIGNMENT.md, Project Zeno/artifacts/proof-format.md, docs/architecture/bounded-verification-boundries.md, docs/specs/Minimum Verifier Spec.md, docs/research/bitcoin_anchoring.pdf
1. Dual-Bounded History Model (Certified-AND-Anchored Light Clients + 56d/58d BitVM2 Expiry)
1.1 Lower Bound: Genesis Bitcoin Anchor (Already Live on Mainnet)
Zenon Genesis Momentum (Height = 1, hash 9e204601d1b7b1427fe12bc82622e610d8a6ad43c40abf020eb66e538bb8eeb0, ts 1637755200) embeds Bitcoin block hash 000000000000000000004dd040595540d43ce8ff5946eeaa403fb13d0e582d8f (Bitcoin mainnet block 710,968, consistent with ts 1637755200) inside Momentum.Data (chain/genesis/embedded_genesis_string.go:6, chain/genesis/embedded_genesis_test.go:11).
1.2 Upper Bound: Periodic Checkpoint Anchoring (finalityDigest)
Every 360 Momentums (~1h) and at every 30-day finality epoch handoff, permissionless anchorers commit the canonical signer-subset-independent finalityDigest onto Bitcoin L1:
finalityDigest = SHA3-256(
"ZNN_FINALITY_V2" ||
u64BE(chainId) ||
u64BE(finalityEpochIndex) || // 30-day monthly finality epoch (R5-H1, R5-L1!)
u64BE(height) ||
u64BE(timestampUnix) ||
momentumHash(32B) ||
stateRoot(32B) ||
finalityCommitteeRoot(32B) ||
nextFinalityCommitteeRoot(32B)
)
c_h = SHA256("ZNN_BTC_ANCHOR_V2" || finalityDigest)
Valid BIP-341/342 Bitcoin encodings:
- Mode A (OpenTimestamps): OTS SHA-256 Merkle path into a Bitcoin
OP_RETURN. - Mode B (
OP_RETURN):OP_RETURN <44 bytes: "ZNNA"(4B) || u64BE(height)(8B) || c_h(32B)>. - Mode C (Taproot):
Q = P + H_{"TapTweak"}(xonly(P) || c_h) * GOR TapscriptOP_FALSE OP_IF <32B c_h> OP_ENDIF <32B pk> OP_CHECKSIG. (BareOP_RETURNinside an executable Tapscript leaf is forbidden under BIP-342.)
1.3 Certified-AND-Anchored Fork Choice (Light Clients) & BitVM2 Long-Range Defense
- Light Clients: Uncertified anchors carry ZERO authority; accepted ONLY alongside a valid dual-supermajority BLS12-381
FinalityCertificatewhosefinalityDigesthashes toc_hand whose|cert.TimestampUnix - anchorHeader.nTime| <= 21,600s (<= 6h). Earliest Bitcoin block embedding a validc_hwins conflicting certified histories; conflicts triggerREFUSED+ on-chain equivocation evidence. - Stateless BitVM2 Verifiers (
R5-L2,R6-H1): Do NOT rely on an unanchored in-SNARK Bitcoin header check. Instead, long-range protection rests on THREE coupled mechanisms (subject to Assumption #3 challenging invalid kickoffs): (i) staggered BitcoinOP_CLTVexpiry (56dStaleConnB/CKill,58dStaleChainBurn,spec/01 §3.2, §3.4), (ii) mandatory on-chain Bitcoin publication of the fixed408 BtargetCert || handoffSlotacross7per-blockOP_HASH160W-OTS blocks +6midstates inAssertCertDATx(29,882 vB → 30 kvBderived,G-23), and (iii) historical-rootSubmitInvalidCertProof+ U272-day post-committee-service Pillar stake lock (>= 58d + 14dgrace, §3.3 below), making every in-scope historical committee signer slashable on Zenon when challenged and published!
2. Canonical Shared State Tree (common/trie & proof-format.md V1)
Byte-exact reproduction of Project Zeno/merkle-state/MERKLE_STATE_ROOT.md, MERKLE_STATE_L2_ALIGNMENT.md, and Project Zeno/artifacts/proof-format.md §4:
- NIST FIPS-202
SHA3-256, full depth256, MSB-first (0→ left,1→ right),LeafHash(path, val) = SHA3-256(path || val), both-zero interior short-circuitzero32. - L1 vs L2 Empty Semantics: L1
common/triepre-hashes DB keys, appliesFoldFilter(excluding{0}/{1}/{2}), and folds empty values to deletion; L2smtcoreuses 32-byte paths directly and distinguishes present-empty (SHA3-256(path)) from absent (zero32). - Wire Format (
SmtProof, deepest-firsti = 0..255⇒depth = 255 - i):flags(u8) || key(32B) || leaf_hash(32B) || sibling_bitmap(32B) || sib_count(u16) || siblings(sib_count*32B) [|| value_len(u32) || value] - Never anchor cross-language proofs to
Momentum.ChangesHash(goleveldb.Batch.Dump()).
3. 30-Day BLS12-381 FinalityCommitteeRoot, Economic Handoff Pin, Historical-Root Slashing & 72-Day Lock (R6-H1, R6-L7, A-PILLAR-1)
3.1 Immutable 30-Day BLS12-381 min-sig FinalityCommitteeRoot
- 30-Day Finality Epoch Index (derived from
dev:consensus/consensus.go:45,8624h consensus epochs without altering reward epochs):consensusEpoch(m) = (m.TimestampUnix - genesis.TimestampUnix) / 86400;finalityEpochIndex(m) = consensusEpoch(m) / 30, withfinalityEpochStartTs(E) = genesis.TimestampUnix + E * 30 * 86400. - IETF BLS12-381
min-sigPOP Scheme (draft-irtf-cfrg-bls-signature-05,A-PILLAR-1,R6-L7):- Signing DST:
"BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_POP_ZBTC_V1_"(hash-to-G1 overfinalityDigest,48 Bcompressed G1 sig,96 Bcompressed G2 pubkey). - Proof-of-Possession DST (
PillarContract.RegisterFinalityKey(blsPubKeyG2, popSigG1)):"BLS_POP_BLS12381G1_XMD:SHA-256_SSWU_RO_POP_ZBTC_V1_"(distinct DST preventing rogue-key attacks!).
- Signing DST:
- Exact
FinalityCommitteeRoot(E)Merkle Tree (R6-L7): At exact transition Momentumh_trans(E)(first Momentum advancingfinalityEpochIndextoE), consensus snapshots topK_fin = 30active registered Pillars (excludingExitCommitteeRequested == true) ordered by(totalDelegatedZnn desc, producerAddress asc), computes a fixed-depth-5 (32-leaf, slots30..31 = zero32) SHA-256 Merkle tree overSHA256("ZBTC_COMMITTEE_LEAF_V1" || producerAddress(20B) || blsPubKeyG2(96B) || weightU64BE(8B)), stamps Momentum Tag 15, recordsHistoricalCommitteeRoot[FinalityCommitteeRoot(E)] = Eon-chain, and stampsLastFinalityCommitteeEpoch = Eon each selectedPillarInfo! - Fixed
204 BFinalityCertificate(even when ALL30of30Pillars sign!):finalityEpochIndex(8) || height(8) || timestampUnix(8) || momentumHash(32) || stateRoot(32) || finalityCommitteeRoot(32) || nextFinalityCommitteeRoot(32) || signerBitfield(4) || aggSignatureG1(48). (Note:chainIdis bound implicitly via the signing digestfinalityDigestabove, NOT repeated inside the 204 B payload —R6-L7.)
3.2 Canonical nextFinalityCommitteeRoot & Economic Handoff Pin (R6-H1)
- Canonical Values Defined at EVERY Height
h:- At the exact epoch-transition Momentum
h = h_trans(E + 1):canonicalSigningCommitteeRoot(h) = FinalityCommitteeRoot(E)andcanonicalNextCommitteeRoot(h) = FinalityCommitteeRoot(E + 1)(Momentum Tag 15 ath_trans(E + 1)). - At EVERY non-transition height
hinside epochE:canonicalSigningCommitteeRoot(h) = FinalityCommitteeRoot(E)andcanonicalNextCommitteeRoot(h) = FinalityCommitteeRoot(E)(unchanged!).
- At the exact epoch-transition Momentum
- No
CarryOverCertificate& Honest Economic Enforcement (R6-H1):CarryOverCertificateis DELETED — every 30-day epoch deterministically snapshotsFinalityCommitteeRoot(E+1)ath_trans(E+1). Because the stateless BitVM2 circuit only pinsE_anchor_rootand has NO oracle for futureh_trans(E+1)orRoot(E+1), the circuit verifies the fixed408 BtargetCert || handoffSlotchain (handoffSlot == 0x00^204iftarget.epoch == E_anchor, elsehandoffCertchainsE_anchor_root → handoffCert.NextFinalityCommitteeRoot → targetCert), while the transition-height pin is enforced economically via historical-rootSubmitInvalidCertProofCase A below!
3.3 Finality Gadget, Historical-Root Full-Preimage Slashing & 72-Day Post-Service Lock (R6-H1, A-PILLAR-1)
- Dual Supermajority & U2 Finality Gadget: Valid
FinalityCertificaterequirespopcount(signerBitfield) >= 21(of 30) ANDsum(signedWeight) * 3 > 2 * sum(totalWeight), verified by BLS12-381FastAggregateVerifyoverfinalityDigest(with canonicalchainIdand signing DST). Honest Pillars sign ONLY at depth>= 6Momentums, and U2 consensus refusesDeleteMomentumacross any dual-supermajority-certified Momentum. - Checkpoint Restriction for BitVM2: Target certificates accepted by BitVM2 MUST sit at canonical checkpoint heights (
height % 30 == 0OR transition heighth_trans). - Two Comprehensive On-Chain Slashing Paths (
dev:vm/embedded/{definition,implementation}/pillars.go, Phase U2):SubmitEquivocationProof(certA, certB): Slashes any Pillar signing two conflictingFinalityCertificates for the same(finalityEpochIndex, height)(unconditional even sub-quorum).SubmitInvalidCertProof(cert)(Historical-Root Precondition + Full 7-Field Cert Check — ClosingR6-H1!):- Precondition (Historical Tag-15 Committee Lookup!): Looks up
E' := HistoricalCommitteeRoot[cert.FinalityCommitteeRoot](requiringcert.FinalityCommitteeRootto be a real historical Tag-15FinalityCommitteeRooton Zenon!) and verifies thatcertcarries a valid dual-supermajority BLS12-381min-sigaggregate signature under committeeE'overfinalityDigest(canonicalChainId, cert)! (NEVER rejects merely becausecert.FinalityCommitteeRoot != canonicalSigningCommitteeRoot(cert.Height)!) - Case A (
cert.Height <= frontier.Height): Slashes100%of15,000 ZNNfor EVERY signer incert.SignerBitfield(from committeeE') whenever ANY of the 7 certificate fields disagrees with canonical Zenon state atcert.Height:cert.FinalityEpochIndex != canonicalFinalityEpoch(h) || cert.Height != m.Height || cert.TimestampUnix != m.TimestampUnix || cert.MomentumHash != m.Hash || cert.StateRoot != m.StateRoot || cert.FinalityCommitteeRoot != canonicalSigningCommitteeRoot(h) || cert.NextFinalityCommitteeRoot != canonicalNextCommitteeRoot(h)! (ClosesR6-H1completely: a committee-Ecartel signing a forged handoff ath_trans(E+1)+1— OR signing a target inside epochE+1— verifies under historical committeeEand IMMEDIATELY slashes every signer viacert.FinalityCommitteeRoot != canonicalSigningCommitteeRoot(h)and/orNextFinalityCommitteeRootmismatch!) - Case B (
cert.Height > frontier.Height + 60): Immediately slashes dual-supermajority certificates signed under any historical committeeE'for non-existent future Momentums (> 10minutes ahead of tip).
- Precondition (Historical Tag-15 Committee Lookup!): Looks up
- Post-Committee-Service Pillar Stake Lock & Clean Exit (
A-PILLAR-1):- Overrides baseline
dev:vm/embedded/implementation/pillars.go:132-138,395-400per-Pillar% 90dphase! PillarContract.RequestExitCommittee()marksExitCommitteeRequested = trueso the Pillar is excluded from all future 30-day finality committee snapshots.PillarContract.Revokerejects withdrawal untilnow >= finalityEpochEndTs(pillar.LastFinalityCommitteeEpoch) + 72 days(>= T_bond_expiry (58d) + 14d grace). OnceExitCommitteeRequested == trueAND the72-day post-service lock has elapsed,Revokepermits immediate withdrawal without waiting an additional% 90dlock cycle, guaranteeing both 100% slashability during active chains (when challenged and published) AND bounded exit for top-30 Pillars!
- Overrides baseline
3.4 Momentum.ContentRoot
Domain-separated SHA3-256 Merkle root (0x00 leaf / 0x01 interior, no odd-node duplication) over AccountHeader.Bytes().
4. Light Client Verification Protocol & Anti-Frontier Rule
- Verify explicit signed 30-day BLS12-381
FinalityCertificatechain from trusted genesis/anchored checkpoint + verify|cert.TimestampUnix - anchorHeader.nTime| <= 6h+ zero conflicting certified anchors. - Verify
proof-format.mdV1SmtProofagainstcert.StateRootand recomputeAccountBlock.ComputeHash()(dev:chain/nom/account_block.go:283) for every inspected account block. - Application-level client verdicts:
PROVEN|REJECTED|REFUSED(with Refusal Closure). - Anti-Frontier Rule (
docs/architecture/bounded-verification-boundries.md): $O(k)$ bounded-frontier verification is PERMITTED ONLY for read-only consumer wallet hints; STRICTLY PROHIBITED for bridge claim admission, Settlement mint/release/refund, operator fronting, or BitVM2 verification.
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.