Repository navigation
deploy: chain-22 cut re-derives every shielded address under constraint set 11 (cut-blocking) - #199
Merged
Merged
Conversation
…nt set 11 Set 11 changes the Poseidon2 constants, so pk = H_PK(nk) and the rand1 address move for the same spend key (test key: PNKR-0783-FNHS-K5AY under v0.8.0, KWTC-Y3MQ-XX7S-JVXP under set 11). The cut took every carried rand1 from chain-21 tooling (balances, ZUSD_CARRY, the fee recipient 89DS-4Q4X-HXSX-MBYW, chain 21's faucet allowlist, validator payouts), so chain 22's genesis would have sealed funds to set-9 addresses no set-11 wallet can spend. - Two wallets: WALLET (chain 21's rand, set 9) reads chain 21; WALLET22 (v0.8.7, set 11, no default) derives every chain-22 address and runs perp image-hc / genesis-root. Each is identified by a public probe key's fingerprint (set 9 XCGM-G4XD-CQQA-753X, set 11 S3VP-7C0T-GGSA-BJJY, checked on the build droplet's set-11 rand); a set-9 WALLET22, a set-11 WALLET or an unknown set is refused by name. - Carry lines: <label> <set-11 rand1> [<amount>] key=<file>|given=<fp> [c21=<rand1>]. balances writes ALLOC_ADDRESSES in this form; the cut re-derives every key= file with both binaries and refuses any address not WALLET22's derivation. given= only for ZUSD_CARRY / FAUCET_RECIPIENTS, only under SET11_GIVEN plus a set11-given: record line, fingerprint-checked. - Validator payouts: re-derived from PAYOUT_KEYS_DIRS (the key whose set-9 address is the chain-21 payout). - Fee recipient: chain-22 FEE_RECIPIENT_FILE + FEE_RECIPIENT_FINGERPRINT, no default, checked with WALLET22; 89DS-... and chain 21's address refused by name. - FAUCET_RECIPIENTS is required (chain 21's allowlist is set 9). - Backstop: no rand1 or note pk chain 21 knew in the finished file. - Record: address-derivation: set 11 via WALLET22 sha256 ... line. - Validator, minter and beacon addresses are blake3 of a Dilithium2 key: unaffected, documented. - cutover-fleet-chain22.sh balances/cut require both wallets and record WALLET22's sha256; docs/deploy.md and AGENTS.md updated. SELFTEST=1 deploy/cut-chain22-genesis.sh: 547 passed, 0 failed. SELFTEST=1 deploy/cutover-fleet-chain22.sh: 215 passed, 0 failed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dendisuhubdy
added a commit
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
dendisuhubdy
added a commit
that referenced
this pull request
Nov 20, 2026
…t 11) (#198) * v0.8.7: version, changelog and release notes (chain 22, constraint set 11) - Workspace version 0.8.7: Cargo.toml, the seven workspace crates in Cargo.lock (cargo update -w on the build droplet; offline failed on the rand-zkvm-cuda git dependency), the rand_getVersion test. - CHANGELOG: Unreleased becomes v0.8.7 (tag date a PLACEHOLDER), with a row for #197's cutover-fleet-chain22.sh and the asset list. - docs/releases/v0.8.7.md: the set-11 gas change as a governance record (bundle 20 479 -> 22 527, auth 1 279 -> 1 407, msauth 436 159 -> 355 775; the per-row weights), the chain-22 cut, the operator upgrade steps and the rollback. The chain-22 genesis hash and the CHAIN_CONSTRAINT_SETS row are PLACEHOLDER-... until the cut. - README release table: v0.8.7. AGENTS.md: #194 is merged. Not tagged, not signed, not published. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo * v0.8.7 notes: the set-11 address re-derivation (#199) and WALLET22 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (cut-blocking)
Constraint set 11 changes the Poseidon2 constants, so
pk = H_PK(nk)and therand1…address change for the same spend key. On the test key, v0.8.0 givesPNKR-0783-FNHS-K5AYand set 11 givesKWTC-Y3MQ-XX7S-JVXP.deploy/cut-chain22-genesis.shtook every carriedrand1from chain-21 tooling:balances/ALLOC_ADDRESSESZUSD_CARRY89DS-4Q4X-HXSX-MBYW)As a result, chain 22's genesis would have sealed funds to set-9 addresses that no set-11 wallet can spend, and nothing would have reported it.
Design
WALLET(chain 21's rand, set 9) only reads chain 21 and proves a key file's chain-21 address.WALLET22(v0.8.7 from the signed release, set 11, no default) derives every chain-22 address, fingerprints addresses, and runsperp image-hc/perp genesis-root.01×32): set 9 givesXCGM-G4XD-CQQA-753Xand set 11 givesS3VP-7C0T-GGSA-BJJY. I checked both against the build droplet's set-11randwith throwaway keys only.WALLET22(the same address asWALLET), a set-11WALLET, or a binary of an unknown set.ALLOC_ADDRESSES,ZUSD_CARRY,FAUCET_RECIPIENTS) have the form<label> <set-11 rand1…> [<amount>] key=<key file>|given=<fingerprint> [c21=<chain-21 rand1…>].balanceswrites alloc lines in this form and prints suggested zUSD key= lines.key=file with both binaries. It refuses a line whose address is not WALLET22's derivation, is the key's set-9 address, or has ac21=that does not match.key=+c21=).given=(a holder such as Anish sends their set-11 address and fingerprint) is allowed only in zUSD/faucet lines, only for labels inSET11_GIVENthat also appear on the cut record'sset11-given:line, and only when the fingerprint checks out.FAUCET_RECIPIENTSis now required. It must be chain 21's allowlist at set-11 addresses, in order, unlessFAUCET_RECIPIENTS_CHANGED=1.PAYOUT_KEYS_DIRS/<name>.key.json, using the key whose set-9 address equals the chain-21 payout.FEE_RECIPIENT_FILEandFEE_RECIPIENT_FINGERPRINT, with no default. WALLET22 checks the fingerprint.89DS-4Q4X-HXSX-MBYWand chain 21's address are refused by name, with instructions to runrand addresswith the v0.8.7 wallet.rand1that chain 21 knew and any alloc note sealed to a chain-21 pk.address-derivation: set 11 via WALLET22 sha256 … (probe …), chain 21 via WALLET sha256 …; n key file(s) re-derived; given: ….Address::from_public_key= blake3("rand-address"‖ Dilithium2 pk). They contain no Poseidon2, so set 11 does not move them. Treasury signers and guardians are public keys.DRY_RUN: uses throwaway WALLET22 keys for the synthetic wallets and the faucet. When there is no fee file it also uses a throwaway fee recipient, and it says so loudly.deploy/cutover-fleet-chain22.sh:balancesandcutrefuse to run without both wallets, or with the same binary as both. The roll record gets WALLET22's sha256.docs/deploy.md(chain-22 section) and AGENTS.md (project memory + workflow traps).What the owner supplies at the cut
WALLET22: the v0.8.7randfrom the signed release.WALLETstays v0.8.6.~/.rand-chain22/fee-recipient-address.txtandFEE_RECIPIENT_FINGERPRINT, both fromrand address --key <their key>with the v0.8.7 wallet.~/.rand-chain22/faucet-recipients.txt.PAYOUT_KEYS_DIRS.given=), listed inSET11_GIVENand on the record'sset11-given:line.Tests (Mac)
SELFTEST=1 bash deploy/cut-chain22-genesis.sh: 547 passed, 0 failed. Fake set-9, set-10 and set-11 wallets cover each refusal and the happy path.SELFTEST=1 bash deploy/cutover-fleet-chain22.sh: 215 passed, 0 failed.shellcheck -x: no new findings. The only notes left are two that were already on main (SC2001, SC2016).Not merged.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo