3-Phase Spork Rollout & Ed25519-PoKoS Seed Rescue
TL;DR: Zenon's on-chain
SporkContract(z1qxemdeddedxsp0rkxxxxxxxxxxxxxxxx956u48) allows a zero-hard-fork-drama, three-phase migration:
- Phase 1 (
PostQuantumAccountsSpork) enables0x02PQ addresses,ML-DSA-44(0x01) +SLH-DSA-SHAKE-128s(0x03),AuthRegistryin-place key rotation on0x00accounts, Account-Chain PK caching, and Witness Plasma pricing.- Phase 2 (
PostQuantumConsensusSpork) addsFN-DSA-512(0x02), transitions PillarMomentumproducers offEd25519, upgradesBridgeContracttot-of-nPQ Guardians, and enablesX25519MLKEM768ongo-libp2p.- Phase 3 (
LegacyCryptoSunsetSpork) disables rawEd25519/secp256k1verification across the entire ledger while keepingAuthRegistry.RescueWithPoKoSopen permanently—allowing any dormant user who still holds their 24-wordBIP-39mnemonic to recover unmigrated0x00funds safely even after quantum computers breakEd25519.
1. Three-Phase Spork Activation Schedule
| Spork Bit | Spork Name | Consensus & State Rules Activated (EnforcementDelay = 6 Momentums) |
|---|---|---|
Bit 5 (9th) | PostQuantumAccountsSpork | • Accept AccountBlock.Version ∈ {1, 2}• Enable 0x02 PQ user addresses (ML-DSA-44, SLH-DSA-SHAKE-128s, Hybrid 0x81)• Deploy AuthRegistryContract (RotateKey with revokeLegacy lockout)• Activate AccountStore[0x09] Public-Key Caching & ABWitnessBytePlasma = 17 surcharge• Rotate SporkAddress and BridgeInfo.Administrator to SLH-DSA-SHAKE-128s (0x03) |
Bit 6 (10th) | PostQuantumConsensusSpork | • Enable FN-DSA-512 (algID = 0x02)• Require Pillar BlockProducingAddresses to sign Momentums with algID ∈ {0x01, 0x02} after 30-epoch migration window• Enable Bridge.UnwrapTokenPQ (t-of-n Guardian ML-DSA-44 / FN-DSA-512 quorum) & PTLC types 3..4• Enforce X25519MLKEM768 on go-libp2p and retire legacy DevP2P RLPx |
Bit 7 (11th) | LegacyCryptoSunsetSpork | • Reject AccountBlock.Version == 1 and algID == 0x00 (Ed25519) across all 0x00 accounts• Reject PTLC pointType ∈ {0, 1, 2} and Pillar.RegisterLegacy• Enable AuthRegistry.RescueWithPoKoS (STARK seed-ownership proof) for unmigrated 0x00 accounts |
2. Solving the "Dormant Account Dilemma" with Ed25519-PoKoS
Every blockchain transitioning off elliptic curves faces the Bitcoin BIP-361 dilemma:
- If you never disable
Ed25519on unmigrated0x00accounts (Height >= 1), a CRQC eventually steals every dormant user's ZNN/QSR and crashes the market. - If you permanently freeze unmigrated
0x00accounts at Phase 3, legitimate long-term holders (stakers, cold-storage users, estates) who missed the migration announcement lose their life savings.
Why BIP-39 + SLIP-0010 + RFC 8032 Creates a Quantum Trapdoor Asymmetry
Look at how every standard Zenon wallet (syrius, znn_cli_dart, go-zenon-v1/internal/crypto/slip0010.go + ed25519.go) derives an Ed25519 public key from a 24-word mnemonic:
Step 1 (BIP-39): seed64 = PBKDF2_HMAC_SHA512(mnemonic, "mnemonic" || passphrase, 2048)
Step 2 (SLIP-0010): master = HMAC_SHA512("ed25519 seed", seed64)
child_0 = HMAC_SHA512(master.ChainCode, 0x00 || master.Key || 0x8000002c) // 44'
child_1 = HMAC_SHA512(child_0.ChainCode, 0x00 || child_0.Key || 0x80011ebc) // 73404'
leaf = HMAC_SHA512(child_1.ChainCode, 0x00 || child_1.Key || (0x80000000 + idx))
Step 3 (RFC 8032): h512 = SHA512(leaf.Key[0:32])
scalar_s = Clamp25519(h512[0:32])
pubKey_A = CompressEdwards([scalar_s] * B)
Step 4 (Zenon): addr20 = 0x00 || FIPS202_SHA3_256(pubKey_A)[0:19]
Observe where Shor's algorithm stops:
- Given
pubKey_Aon-chain, a quantum computer running Shor's algorithm easily recoversscalar_s(inverting Step 3's scalar multiplication[scalar_s] * B). - HOWEVER, a quantum computer CANNOT invert
SHA512(leaf.Key[0:32])to findleaf.Key!SHA-512preimage search requires2^128+Grover work over a 512-bit state (completely infeasible). - Therefore:
- Quantum Attacker: Knows
scalar_sandpubKey_A, does NOT knowleaf.Key. - Rightful Wallet Owner: Holds the 24-word mnemonic, therefore knows
leaf.Key(andchild_1if stricter path provenance is desired)!
- Quantum Attacker: Knows
3. Exact Ed25519-PoKoS Relation on Zenon
AuthRegistry.RescueWithPoKoS(targetAddress, algId, newPublicKey, starkProof) verifies a post-quantum hash-based STARK proof (FRI over Goldilocks/Mersenne31/KoalaBear field using SHA3-256 / Poseidon2 Merkle commitments—zero elliptic curves or pairings!) proving the NP relation R_PoKoS:
Public Inputs (x)
chainId:uint64(1on Alphanet)targetAddress:20-byte0x00Zenon address (authRecordMUST NOT already exist)newKeyDigest:SHA3-256([algId] || newPublicKey)(32 bytes— binds the proof non-malleably to the exact destination PQ key so mempool front-runners cannot steal the proof!)
Private Witness (w — Never Revealed On-Chain)
leafSeed32:32-byteSLIP-0010leaf key (leaf.Key[0:32])
Circuit Constraints Verified Inside the STARK
- Compute
h = SHA-512(leafSeed32). - Clamp
s = h[0:32]per RFC 8032 (s[0] &= 248,s[31] &= 127,s[31] |= 64). - Compute fixed-base Edwards25519 scalar multiplication
A = [s]BoverGF(2^255 - 19)and encode compressed 32-bytepubKey_A. - Compute
derivedAddr = 0x00 || SHA3-256(pubKey_A)[0:19]and assertderivedAddr == targetAddress. - Bind
newKeyDigestinto the Fiat-Shamir transcript challenge so the proof is valid only for(chainId, targetAddress, newKeyDigest).
Hardware Wallet & Raw-Seed Caveat
- Standard BIP-39 / Syrius / Ledger / CLI Wallets: 100% compatible with
RescueWithPoKoS, because RFC 8032 always hashes a 32-byte seedleafSeed32throughSHA-512before clampingscalar_s. Only the singleSHA-512+[s]B+SHA3-256step needs to be proven (~45,000Plonky3/Starky trace rows; proof size~65–110 KB, client prove time~0.8s, validator verify time~2.5 ms). - Non-Standard "Raw Clamped Scalar" Keys: Any custom tool that bypassed RFC 8032 seed hashing and generated a bare scalar
sdirectly without a pre-SHA-51232-byte seed MUST migrate viaAuthRegistry.RotateKeyduring Phase 1 or Phase 2 (beforeLegacyCryptoSunsetSpork).