From 261488380dc010ac679c8cacedce746dac4f5e5c Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Sat, 21 Nov 2026 04:11:33 +0800 Subject: [PATCH 1/2] deploy: chain-22 cut re-derives chain 21's genesis with NODE21 (set 9), and reads state_proof_keys by key set Two refusals hit on the real cut (2026-11-20, from the build droplet): - The probe that re-derives chain 21's genesis hash ran `$NODE init` on deploy/genesis-chain21.json. NODE is the cut build (v0.8.7, constraint set 11), which refuses to init any chain 14-21 file by design ("proofs were made under constraint set 9 ... refusing to init"). NODE21, chain 21's rand-node (v0.8.6), now runs that one probe. It defaults to NODE, so the self-test's fake node keeps working. Chain 21's treasury id is the same under both binaries (d5fd1883...), so treasury_id_of keeps NODE. - The CON-601 check compared perps.state_proof_keys entries by dict key ORDER. rand-node writes the fields sorted, so the four correct canonical shapes were refused. It now compares the key set; the values and the per-file sha256 pins are checked as before. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GFs5gyuBMf1nCmyHCP3AT8 --- deploy/cut-chain22-genesis.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/deploy/cut-chain22-genesis.sh b/deploy/cut-chain22-genesis.sh index 1e17b2f0..2c20bb68 100755 --- a/deploy/cut-chain22-genesis.sh +++ b/deploy/cut-chain22-genesis.sh @@ -61,7 +61,7 @@ # # prune_floor 187556; rand-archive-2 abandoned); # # the cut then needs it too and the record's # # `scan-floor: ` (what it loses: py_snapshot) -# CUT_RECORD= CHAIN21_SNAPSHOT= NODE= \ +# CUT_RECORD= CHAIN21_SNAPSHOT= NODE= NODE21= \ # WALLET= WALLET22= \ # FEE_RECIPIENT_FINGERPRINT= [SET11_GIVEN=] \ # EXPECT_NODE_VERSION= PERP_PROVER= \ @@ -421,6 +421,11 @@ cd "$(dirname "$0")/.." . deploy/lib/cut-policy.sh NODE=${NODE:-target/release/rand-node} +# Chain 21's rand-node (v0.8.6, constraint set 9), used for ONE step: re-deriving chain 21's genesis hash +# from CHAIN21_GENESIS. A set-11 NODE refuses to init any chain-14…21 file ("proofs were made under +# constraint set 9 … refusing to init"), so the probe needs the release that runs chain 21. Defaults to +# NODE (the self-test's fake node accepts both). +NODE21=${NODE21:-$NODE} WALLET=${WALLET:-target/release/rand} # chain 21's rand (set 9): READS chain 21 only — this tree's own build is set 11 and is refused WALLET22=${WALLET22:-} # the cut build's rand (v0.8.7, set 11, from the signed release): DERIVES every chain-22 address; no default # The wallet probe (header, "EVERY SHIELDED ADDRESS"): a fixed, public spend key — NEVER FUND IT — @@ -2037,7 +2042,7 @@ else: spk = perps.get("state_proof_keys") SPK_SHAPE = ["tier", "program_log_height", "input_log_height", "public_log_height", "poseidon2_log_height"] shapes = json.loads(E["PERPS_STATE_PROOF_SHAPES_DECIDED"]) - need(isinstance(spk, list) and all(isinstance(k, dict) and list(k) == SPK_SHAPE + ["sha256"] for k in spk) + need(isinstance(spk, list) and all(isinstance(k, dict) and sorted(k) == sorted(SPK_SHAPE + ["sha256"]) for k in spk) # key SET: rand-node writes the fields sorted and [[k[f] for f in SPK_SHAPE] for k in spk] == shapes, f"perps.state_proof_keys is {spk!r}, not the four canonical tier-18 shapes {shapes} (tier, program, input, public, " f"poseidon2 — CON-601, owner 2026-11-19)") @@ -4703,9 +4708,10 @@ export TMP # This rand-node hashes chain 21's fields as chain 21 did: it re-derives chain 21's own genesis hash # from the committed file (so every field carried from chain 21 is hashed, and the three new # sections are the only difference the cut makes). -H21=$("$NODE" init --datadir "$TMP/chain21-probe" --genesis "$CHAIN21_GENESIS" 2>"$TMP/chain21-probe.err" | sed -n 's/.*genesis \([0-9a-f]\{64\}\).*/\1/p' || true) -[ "$H21" = "$CHAIN21_HASH" ] || { echo "cut-chain22: $NODE derives '${H21:-nothing}' from $CHAIN21_GENESIS, not chain 21's $CHAIN21_HASH ($(tail -1 "$TMP/chain21-probe.err" | cut -c1-90))" >&2; exit 1; } -echo "cut-chain22: this rand-node re-derives chain 21's genesis ${H21:0:12}… from $CHAIN21_GENESIS" +[ -x "$NODE21" ] || { echo "cut-chain22: NODE21=$NODE21 is not executable — chain 21's rand-node (set 9) re-derives chain 21's genesis" >&2; exit 1; } +H21=$("$NODE21" init --datadir "$TMP/chain21-probe" --genesis "$CHAIN21_GENESIS" 2>"$TMP/chain21-probe.err" | sed -n 's/.*genesis \([0-9a-f]\{64\}\).*/\1/p' || true) +[ "$H21" = "$CHAIN21_HASH" ] || { echo "cut-chain22: $NODE21 derives '${H21:-nothing}' from $CHAIN21_GENESIS, not chain 21's $CHAIN21_HASH ($(tail -1 "$TMP/chain21-probe.err" | cut -c1-90)) — a set-11 rand-node refuses chain 21's file: NODE21=" >&2; exit 1; } +echo "cut-chain22: $NODE21 ($("$NODE21" --version 2>/dev/null || echo '?')) re-derives chain 21's genesis ${H21:0:12}… from $CHAIN21_GENESIS" # ... and chain 21's treasury id, offline, from the same file (the id `snapshot` read the vault at). T21=$(treasury_id_of "$CHAIN21_GENESIS") [ "$T21" = "$CHAIN21_TREASURY_ID" ] || { echo "cut-chain22: $NODE derives chain 21's treasury id '${T21:-nothing}', not CHAIN21_TREASURY_ID $CHAIN21_TREASURY_ID" >&2; exit 1; } From aabcd4eb62c29d1fa0d253116d1b42bfba6a2f18 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Sat, 21 Nov 2026 11:26:19 +0800 Subject: [PATCH 2/2] deploy: cutover wait passes check-beacon-seed an http:// RPC URL rand-node beacon status --rpc refuses a bare host:port ("relative URL without a base"), so wait failed all 25 validators on the live chain 22 (2026-11-21 03:16Z); with the scheme, 25/25 open. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GFs5gyuBMf1nCmyHCP3AT8 --- deploy/cutover-fleet-chain22.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/cutover-fleet-chain22.sh b/deploy/cutover-fleet-chain22.sh index 0ae6f64a..ba7876da 100755 --- a/deploy/cutover-fleet-chain22.sh +++ b/deploy/cutover-fleet-chain22.sh @@ -1057,7 +1057,7 @@ wait) read -r NEW _ <<<"$(genesis_hash "$GENESIS")"; P=${NEW:0:8} if dry; then echo "[dry-run] every ${WAIT_SLEEP:-20} s, up to $WAIT_TRIES times: on each of the $NALL hosts rand_getGenesisHash == $NEW, rand_getHealth ok, rand_status.msauth_key loaded, perps_keys loaded (4); $BOOT1's height > 2; then check-beacon-seed.sh --rpc on the $NVALSET validators" - rpc "$BOOT1" rand_status; each "$VAL_N" "$(r_paths); $(beacon_check /usr/local/bin/rand-node \$HG \$NEWDIR 127.0.0.1:8545)"; exit 0 + rpc "$BOOT1" rand_status; each "$VAL_N" "$(r_paths); $(beacon_check /usr/local/bin/rand-node \$HG \$NEWDIR http://127.0.0.1:8545)"; exit 0 fi [ ${#NEW} -eq 64 ] || { echo "wait: could not derive the genesis hash" >&2; exit 1; } for _ in $(seq 1 "$WAIT_TRIES"); do @@ -1074,7 +1074,7 @@ wait) echo " $(date -u +%T) $ok/$NALL on chain 22, healthy, msauth + perps keys loaded; $BOOT1 height ${H:-?}${late:+; not yet:$late}" if [ "$ok" = "$NALL" ] && [ -n "$H" ] && [ "$H" -gt 2 ]; then echo "== every validator's beacon seed against its running node (check-beacon-seed.sh --rpc)" - each "$VAL_N" "set -e; $(r_paths); $(beacon_check /usr/local/bin/rand-node \$HG \$NEWDIR 127.0.0.1:8545); echo \"\$H_NAME beacon seed opens the commitment in force\"" \ + each "$VAL_N" "set -e; $(r_paths); $(beacon_check /usr/local/bin/rand-node \$HG \$NEWDIR http://127.0.0.1:8545); echo \"\$H_NAME beacon seed opens the commitment in force\"" \ || { rec "all $NALL on $NEW at height $H, but a validator's beacon seed does not open its commitment in force"; echo "wait: a validator's beacon seed does not open its commitment in force (above) — it misses its slots" >&2; exit 1; } rec "CHAIN 22 LIVE: all $NALL hosts on $NEW, healthy, msauth + perps keys loaded, $BOOT1 at height $H; beacon seeds open on $NVALSET validators" echo "=== $(date -u +%T) CUTOVER DONE: all $NALL on $NEW, committing at $H — next: bridge-start, verify"; exit 0