Two-Lane Dynamic Plasma, Witness Pricing, Exact 0x1f → uint64 SporkMask & Monotonicity
60-Second TL;DR (
ZNN-SPEC-PHASE1-v4): ReconcilingZDC-ZP1-HR-001(H01, H02, H14, M02) andZDC-QS-DEEZ-HR-001(M02, M07), Zenon Phase 1v4(1) alignspow.SporkMaskbit indices byte-for-byte withgo-zenon-v1/internal/pow/plasma.go:45-55's existing 5-bit0x1fmask when wideninguint8 → uint64(M07fix), (2) scopes the formalwitness_plasma_monotonicitylaw accurately to fixed(algID, hasProofWitness)overTotalWitnessBytes >= 96(M07fix), and (3) enforces Two-LaneMomentum v4(1.0 s) admission (8.4MBasePlasma +256 KiB/sProofWitnesswithPoKoSanti-starvation).
1. Exact 0x1f → uint64 SporkMask Bit Alignment (go-zenon-v1/internal/pow/plasma.go:48, M07 Fix)
Direct inspection of go-zenon-v1/internal/pow/plasma.go:45-78 and internal/common/params.go:256-265 shows that params.ImplementedSporks lists 8 Phase 0 sporks, while pow.SporkMask currently assigns bits 0..4 (sporkMaskAll = 0x1f) to the 5 plasma-affecting Phase 0 sporks (Libp2p, EmbeddedRefund, and EpochRewardTerms do not occupy bits in 0x1f).
To preserve 100% backward-compatible bit positions with go-zenon-v1's existing NormalizeSporkMask and golden test vectors (M07 closed), widening type SporkMask uint8 to type SporkMask uint64 preserves bits 0..4 verbatim:
// Existing 5-bit Phase 0 pow.SporkMask (plasma.go:48-54, mask 0x1f — UNCHANGED!):
Bit 0 (1 << 0) : SporkBitAccelerator (Phase 0 active)
Bit 1 (1 << 1) : SporkBitBridgeAndLiquidity (Phase 0 active; implies Bit 0)
Bit 2 (1 << 2) : SporkBitHtlc (Phase 0 active; implies Bits 1, 0)
Bit 3 (1 << 3) : SporkBitDynamicPlasma (Activated in Phase 1.0!)
Bit 4 (1 << 4) : SporkBitPtlc (Phase 0 / 1.0)
// Non-pow Phase 0 Runtime Spork Flags (tracked in ChainSporkSet):
Bit 5 (1 << 5) : SporkBitLibp2p (Activated in Phase 1.0!)
Bit 6 (1 << 6) : SporkBitEmbeddedRefund (Phase 0 active)
Bit 7 (1 << 7) : SporkBitEpochRewardTerms (Phase 0 / 1.0)
// New Phase 1A-1E Spork Bits (Bits 8..13):
Bit 8 (1 << 8) : SporkBitStateRoot (#9 — Momentum v3 domain-separated smt-v1 StateRoot)
Bit 9 (1 << 9) : SporkBitPQAccounts (#10 — AccountBlock v2, 0x02 Addr, AuthRegistry #14, WitnessPlasma, PoKoS)
Bit 10 (1 << 10): SporkBitMomentumMahiPQ (#11 — 1.0s Momentum v4, Mahi-Mahi M=4,096, HashRand-PQ M_coin=256; implies 8, 9)
Bit 11 (1 << 11): SporkBitProofFirstZeno (#12 — SettlementContract #13 ZK_VALIDITY, 2^-128 QROM WHIR-SHA3-v1; implies 8, 9)
Bit 12 (1 << 12): SporkBitBitcoinAndEdge (#13 — d_btc SPV, SigLocks 3..4, ChannelContract #15; implies 11)
Bit 13 (1 << 13): SporkBitLegacyCryptoSunset (#14 — Enforced at H_inc! Disables v1, 0x00, 0x81, Bridge/Swap/PTLC ECC)
2. Stateless Post-Quantum, Equi-X & STARK WitnessPlasma Formula (H14, M02, M07)
When SporkBitPQAccounts is active and block.Version >= 2 (for non-embedded senders !types.IsEmbeddedAddress(block.Address) after passing Stage-1 hard length validation M02):
CanonicalBasePlasma(block) = LegacyBasePlasma(block) + WitnessPlasma(block)
TotalWitnessBytes = len(block.PublicKey)
+ len(block.Signature)
+ len(block.ProofWitness)
+ len(block.EquiXSolution) // +16 B when Difficulty > 0 (H14)
ExcessWitnessBytes = max(0, TotalWitnessBytes - 96)
ABWitnessBytePlasma = 17 // Policy byte weight (1:4 SegWit-style ratio vs ABByteDataPlasma = 68; M02)
VerifyComputePlasma(algID, hasProofWitness):
SigVerifyPlasma:
0x00 (Ed25519, pre-sunset) -> 0
0x01 (ML-DSA-44) -> 2,100 (+1.0 QSR fusion unit)
0x02 (FN-DSA-512) -> 1,050 (+0.5 QSR fusion unit)
0x03 (SLH-DSA-SHAKE-128s) -> 42,000 (+20.0 QSR fusion units)
0x81 (Hybrid Ed+MLDSA44) -> 3,150 (+1.5 QSR fusion units, pre-sunset)
StarkVerifyPlasma (iff len(block.ProofWitness) > 0):
0x10 (WHIR-SHA3-v1 STARK) -> 52,500 (+25.0 QSR fusion units)
WitnessPlasma(block) = ExcessWitnessBytes * 17 + SigVerifyPlasma(algID) + StarkVerifyPlasma
Exact Formal Monotonicity Domain (M07 Fix)
Because ExcessWitnessBytes = max(0, W - 96) has a baseline plateau on W in [0, 96] and different algIDs carry distinct SigVerifyPlasma compute surcharges, Lean law witness_plasma_monotonicity (Suite 15) is stated over its exact mathematical domain:
- Per-Suite Strict Byte Monotonicity: For any fixed
(algID, hasProofWitness)and valid witness lengthsW_2 > W_1 >= 96,WitnessPlasma(W_2) - WitnessPlasma(W_1) == 17 * (W_2 - W_1) > 0. - Global Worst-Case Resource Bound: Independent of
algID, every block in aMomentumsatisfiesTotalWitnessBytes <= 1,345 + 7,857 + 131,072 + 16 = 140,290 Band aggregate per-MomentumBasePlasma <= 8,400,000+ProofWitness <= 262,144 B.
Resulting Feeless QSR Fusion & Client PoW Schedule (1.0x Base Price, FusedPlasma Mode)
Transaction Workload (AccountBlock v2, EquiXSolution = 0 B) | TotalWitnessBytes | Total CanonicalBase Plasma | Equivalent Fused QSR (2,100 plasma / QSR) | Client Equi-X Target (+272 plasma) |
|---|---|---|---|---|
FN-DSA-512 Repeat / Registered Tx | 667 B | 31,757 | ~15.2 QSR | ~50 ms |
FN-DSA-512 Unregistered First Reveal (0x02, H = 1) | 1,565 B | 47,023 | ~22.4 QSR | ~75 ms |
ML-DSA-44 Repeat / Registered Tx | 2,421 B | 62,625 | ~29.9 QSR | ~100 ms |
ML-DSA-44 Unregistered First Reveal (0x02, H = 1) | 3,734 B | 84,946 | ~40.5 QSR | ~135 ms |
SLH-DSA-SHAKE-128s Cold Vault Tx | 7,857 B | 194,937 | ~92.9 QSR | ~310 ms |
SubmitBatch / PoKoS (90 KiB = 92,160 B STARK + ML-DSA-44) | 94,581 B | 1,711,245 | ~814.9 QSR (< 0.82 QSR/tx @ 1k txs) | ~2.4 s |
SubmitBatch / PoKoS Max (128 KiB = 131,072 B STARK + ML-DSA-44) | 133,493 B | 2,372,749 | ~1,129.9 QSR (< 8,400,000 cap H02!) | ~3.3 s |
3. Two-Lane Momentum v4 (1.0 s) Admission Schedule (H01, H02)
- Phase 1A (
10.0 sMomentum v3):DefaultMaxBasePlasmaInMomentum = 16,800,000,MaxProofWitnessBytesPerMomentum = 524,288(512 KiB / 10s),MaxSingleProofWitnessBytes = 131,072(128 KiB). - Phase 1B+ (
1.0 sMomentum v4Two-Lane Schedule):- Lane 1 (Aggregate Base Plasma):
MaxBasePlasmaInMomentum = 8,400,000,FusedPlasmaTarget = 2,100,000,PowPlasmaTarget = 2,100,000(132FN-DSA-512/67ML-DSA-44blocks/s at1.0x,264/134blocks/s burst). - Lane 2 (Prunable
ProofWitnessByte Budget):MaxProofWitnessBytesPerMomentum = 262,144(256 KiB/s),MaxSingleProofWitnessBytes = 131,072(128 KiB),1slot/s reserved forAuthRegistry.RescueWithPoKoSwheneverPoKoSmempool queue is non-empty. - Damping Step:
PriceChangeDenominator = 200(~200 sexponential price response).
- Lane 1 (Aggregate Base Plasma):