Skip to content

deploy: chain-22 genesis cut script (audit v11 gated fields: PST-1, PERP-6, PERP-101, CON-60, MSA-4) - #160

Merged
dendisuhubdy merged 1 commit into
mainfrom
feat/chain22-cut-script
Oct 29, 2026
Merged

dendisuhubdy merged 1 commit into
mainfrom
feat/chain22-cut-script

Conversation

@dendisuhubdy

Copy link
Copy Markdown
Member

Adds deploy/cut-chain22-genesis.sh, derived from the chain-21 script with chain 21 as the source. It turns on v0.8.2's genesis-gated fixes for randprotocol/monorepo#12, #13 and #15, plus CON-60 (engine_program_log_height), MSA-4 (multisig.max_accounts) and TOK-1 (tokens.incremental_root). Also adds a docs/deploy.md section and a CHANGELOG entry.

Each field is written, asserted on the finished file, shown to change the genesis hash, and read back by check-limits.

Owner decisions needed before a real cut (listed in the script header):

  • perps.max_window_heights: no documented value.
  • multisig.max_accounts: no documented value.
  • The treasury balance.
  • Chain 21 state that has no carry rule: the treasury vault, perps positions, and RAND in program vaults. The script refuses to cut while any of it holds value, unless the operator drops it explicitly and the cut record names the drop.

Verification

  • SELFTEST=1: 277 passed, 0 failed.
  • bash -n passes; shellcheck is clean.
  • DRY_RUN passed end to end on the v0.8.2 release binaries and on debug binaries built from this branch. In both runs the loopback node served chain 22 as cut.

No cut was made. No hosts or keys were touched.

🤖 Generated with Claude Code

…is-gated rules on (PST-1, PERP-6, PERP-101, CON-60, MSA-4, TOK-1)

Derived from cut-chain21-genesis.sh with chain 21 as the source. Writes and asserts
program_state.refuse_panics true (monorepo#15), perps.bound_payouts true (#13),
perps.sparse_windows true + max_window_heights (#12), perps.engine_program_log_height 14
(derived from `rand perp image-hc`), multisig.max_accounts, and tokens.incremental_root true
(docs/deploy.md's recommendation); field-probes each into the genesis hash (7 variants) and
reads each back in check-limits (refuse_panics through the hash: no RPC serves it).

max_window_heights, max_accounts and the treasury balance are the owner's: the real cut
takes no default, DRY_RUN puts in loud placeholders. Chain 21's treasury vault, perps
exchange and program vaults have no documented carry rule: the cut refuses while any holds
value unless dropped knowingly (MULTISIG_NOT_CARRIED_OK, PERPS_STATE_NOT_CARRIED_OK,
PROGRAM_VAULTS_DROPPED_OK) and named on the record's drops: line.

docs/deploy.md gains "The next cut: chain 22 (audit v11 gated fields)"; CHANGELOG
Unreleased notes the tooling. No cut was made.

SELFTEST=1: 277 passed, 0 failed. shellcheck clean. DRY_RUN passed end to end with the
v0.8.2 release binaries and with debug binaries built at 97bcf4b (perp-prover from
durian.market): the perps genesis root re-derives as chain 21's da0e3a53…, the 7-variant
field probe passes, and the loopback node serves chain 22 as cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dendisuhubdy
dendisuhubdy merged commit 2b15ff6 into main Oct 29, 2026
23 checks passed
@dendisuhubdy
dendisuhubdy deleted the feat/chain22-cut-script branch October 29, 2026 05:26
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