Skip to content

deploy: chain-22 treasury 5 of 6 with its balance carried; perps carried empty - #193

Open
dendisuhubdy wants to merge 4 commits into
mainfrom
feat/chain22-treasury-carry
Open

dendisuhubdy wants to merge 4 commits into
mainfrom
feat/chain22-treasury-carry

Conversation

@dendisuhubdy

Copy link
Copy Markdown
Member

Implements the owner's chain-22 decisions of 2026-11-19 in deploy/cut-chain22-genesis.sh and its docs. Deploy script and docs only; no Rust touched.

Decisions

  1. Treasury: 5 of 6, six new signers. Chain 21's treasury is 2 of 3. The owner's standing rule is that every multisig is 5 of 6. TREASURY must list exactly 6 distinct signers with threshold 5. None of them may be one of chain 21's treasury signers, whether its genesis three or the live set the snapshot read after a rotation. Validator, guardian and pause keys are still refused. The fresh salt stays, so the treasury gets a new id. The TREASURY_SIGNERS_CHANGED and TREASURY_ROTATED escape hatches are removed.
  2. The treasury balance is carried, not new issuance. balance must equal chain 21's rand_getSupply.multisig_rand_held from the snapshot (live: 100000000000000 units, i.e. 100 000 RAND). This is checked in py_treasury and again on the finished file. A new bound guards against double counting: the RAND chain 22 seeds (notes + stakes + treasury) may not exceed chain 21's total_supply at the snapshot. MULTISIG_NOT_CARRIED_OK is narrowed to what the carry cannot carry: a token in the treasury vault, or RAND in register accounts other than the treasury. It is refused when set with nothing to drop. Chain 21's account itself (id, signers, nonce) is replaced.
  3. Perps is carried (empty). When the snapshot shows the exchange empty, no override is needed and the genesis root is still asserted equal to chain 21's da0e3a53…. "Empty" now also covers the supply's perps_collateral_held and perps_rand_held. A non-empty exchange is still refused without PERPS_STATE_NOT_CARRIED_OK=1, and that override is refused on an empty exchange.
  4. Program vaults stay dropped. PROGRAM_VAULTS_DROPPED_OK=1 is unchanged: durian's AMM is redeployed on chain 22, and the 200 RAND in its chain-21 pool is dropped.
  5. docs/multisig.md now advises 5 of 6, never 2 of 3. The examples (genesis file, id, create, pay, rotate) use 5 of 6.
  6. Decision 7, recorded in docs/deploy.md and in the cut-record template's rollback: hint: rand-archive-2 is abandoned, and chain 21's history on record starts at height 187 556 (hosts e and obs1).

Cut record: carries: must now name the treasury (reason: alone no longer counts). Without the perps override, carries: must also name perps. check-limits reads the treasury threshold from the file.

Unchanged: the REFERENCE_BLOCK_WINDOW and BEACON_COMMIT_DELAY_BLOCKS defaults (256 each). PERPS_MAX_WINDOW_HEIGHTS and MULTISIG_MAX_ACCOUNTS are still operator inputs with no default. The docs and comments now say the owner chose 256 and 65 536 for them on 2026-11-19.

Verification

  • SELFTEST=1 bash deploy/cut-chain22-genesis.sh: 426 passed, 0 failed (was 404).
    • New tests are refused for: 3 signers with threshold 2, thresholds 2, 4 and 6, 5 or 7 signers, a reused chain-21 signer (genesis or rotated in), a balance off the snapshot (above, below, or given in units), a snapshot without multisig_rand_held, non-empty perps without the override (perps_collateral_held, perps_rand_held), each override set with nothing to drop, chain 22 seeding more than chain 21's total_supply, and records missing the treasury or perps on carries:.
    • An empty exchange is accepted with no override.
  • The fixtures use six deterministic SHAKE-256 keys of Dilithium2 length (2624 hex), none of them chain 21's.
  • bash -n passes on deploy/cut-chain22-genesis.sh and deploy/check-beacon-seed.sh. shellcheck is clean, and the deploy/lib/cut-policy.sh selftest gives 50/0.
  • The real ~/.rand-chain22/treasury.txt passes the new rules (6 distinct keys, none of them chain 21's, a validator's or a guardian's; 5; 100000). No keys were printed.
  • Not exercised: DRY_RUN and the real cut, because no rand-node binary was available.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo

dendisuhubdy and others added 4 commits November 19, 2026 16:48
…ied empty

The owner's decisions of 2026-11-19, in deploy/cut-chain22-genesis.sh:

- Treasury: exactly 6 signers, threshold 5 (the standing rule: a multisig is
  always 5 of 6), all distinct and none of chain 21's treasury signers (its
  genesis three, nor live ones after a rotation). TREASURY_SIGNERS_CHANGED and
  TREASURY_ROTATED are gone. Fresh salt kept.
- Its balance is CARRIED from chain 21's multisig register: TREASURY's balance
  must equal the snapshot's rand_getSupply.multisig_rand_held, checked in
  py_treasury and again on the finished file. "New issuance" wording removed.
- MULTISIG_NOT_CARRIED_OK is narrowed to what the carry cannot carry (a token
  in the treasury vault, RAND in other register accounts) and refused when set
  with nothing to drop.
- No double count: chain 22's seeded RAND (notes + stakes + treasury) must not
  exceed chain 21's total_supply at the snapshot.
- Perps: an empty exchange (now also rand_getSupply perps_collateral_held and
  perps_rand_held) is carried (empty) with no override, its genesis root still
  asserted equal; non-empty still needs PERPS_STATE_NOT_CARRIED_OK, which is
  refused on an empty exchange.
- Cut record: the treasury must be on carries: (not reason: alone); without the
  perps override, carries: must name perps.
- check-limits reads the treasury threshold from the file (5); the
  `genesis --multisig` line is matched at 5 of 6.
- Selftest/DRY_RUN fixtures: six deterministic SHAKE-256 keys of Dilithium2
  length, none of chain 21's; snapshot carries total_supply and
  perps_rand_held. New tests for 3 signers, thresholds 2/4/6, 5/7 signers, a
  reused chain-21 signer (genesis and rotated), balances off the snapshot,
  perps empty with no override, perps nonzero without it, superfluous
  overrides, the total-supply bound and the record lines.

SELFTEST 404 -> 426 passed, 0 failed; shellcheck clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
…d, perps carried empty, archive2)

- OPEN 1/2: the owner chose max_window_heights 256 and max_accounts 65 536;
  both stay operator inputs with no default.
- OPEN 3: the treasury is 5 of 6, six new signers, its balance carried from
  chain 21's multisig_rand_held; what MULTISIG_NOT_CARRIED_OK still covers;
  the no-double-count bound; carries: must name the treasury.
- OPEN 4: an empty exchange is carried (empty), root asserted equal; the
  override only for a non-empty one.
- Program vaults stay dropped (durian's AMM redeployed, 200 RAND).
- Decision 7: rand-archive-2 abandoned; chain 21's history on record starts
  at height 187 556 on e and obs1 (recorded on the cut record's rollback:).
- cut-record.template: carries:/drops:/rollback: hints for these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
The owner's rule is that every RandProtocol multisig is 5 of 6. The
threshold advice, the foundation's steps, the custody notes and the
examples (genesis file, id derivation, create, pay, rotate) now use 5 of 6;
the status note records chain 22's treasury (six new signers, its RAND
carried from chain 21's register).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
…y, under Unreleased

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant