Skip to content

deploy: chain-22 perps on constraint set 11 (engine 482215a8…, genesis root a45d8fda…) - #196

Merged
dendisuhubdy merged 1 commit into
feat/cs11-revendorfrom
feat/chain22-perps-set11
Nov 19, 2026
Merged

dendisuhubdy merged 1 commit into
feat/cs11-revendorfrom
feat/chain22-perps-set11

Conversation

@dendisuhubdy

Copy link
Copy Markdown
Member

Stacked on #195 (feat/perps-pinned-key), which is stacked on #194. The durian.market side is randprotocol/durian.market#2.

Values (measured on a5e08a9's release rand, circuits 76a48dca)

  • engine_hc 482215a8df02dff341265c38212c47e23fc8bfb3c3297afe9c385d6a63e65073: chain 21's image, same bytes (sha256 77dfc228…), under the Grain constants. engine_program_log_height is still 14.
  • perps genesis_root a45d8fdab8cf7dab972e76dd6a7a18d9e82fc8210afab672a161ee60021698b4:
    echo '{"markets": [{"id": 0, "symbol": "BTC-PERP", "lot": 100000, "tick": 100000000, "max_leverage": 20, "maintenance_bps": 250, "taker_fee_bps": 5, "maker_fee_bps": 2}]}' > perps-markets.json
    perp-prover genesis-state --markets perps-markets.json --out perp-state0.json   # 26 words, sha256 bb32f0c4…6066
    rand perp genesis-root --state perp-state0.json                                 # a45d8fda…98b4
    
    Chain 21's perp-prover (durian 310ae76) writes the same 26 words. Only the hash moved.
  • AMM: program id db2148e6…2bda is unchanged (blake3 of the code). Its set-11 hc is be19a49a…8fb1. The script holds no AMM pin; there's a comment beside PROGRAM_VAULTS_DROPPED_OK.

Changes

Tests

  • SELFTEST=1 bash deploy/cut-chain22-genesis.sh: 474 passed, 0 failed (467 before). The new cases are 5 for perp_genesis_root_step, plus refusals of chain 21's root and engine hc. shellcheck -S warning is clean.
  • cargo test --release -p randprotocol-zkvm --test perps_vectors: passes with the new file. -p randprotocol-core --lib golden: passes.

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo

…is root a45d8fda…

Set 11's Grain Poseidon2 constants move the engine's hc and the perps genesis root;
neither the image nor the genesis words change (durian.market #2, measured on a5e08a9):

- ENGINE_HC_DECIDED = 482215a8df02dff341265c38212c47e23fc8bfb3c3297afe9c385d6a63e65073
  (chain 21's image, sha256 77dfc228...); chain 21's f286a611... is kept as
  ENGINE_HC_CHAIN21 for the check on chain 21's genesis. The finished file's engine_hc must
  be the set-11 hc and not chain 21's; check-limits wants it from rand_getPerps.
- PERP_GENESIS_ROOT_DECIDED = a45d8fdab8cf7dab972e76dd6a7a18d9e82fc8210afab672a161ee60021698b4
  (perp-prover genesis-state over BTC-PERP -> rand perp genesis-root; the 26 words are
  chain 21's, sha256 bb32f0c4...). The genesis_root check is now "equals the recorded
  set-11 root" (was "equals chain 21's da0e3a53..."); chain 21's root is refused. The
  derivation moves into perp_genesis_root_step, which refuses the set-9 root and any other
  before the section is written.
- Selftest: perp_genesis_root_step against a fake prover and rand (5 cases), and refusals
  of chain 21's root and engine hc in the finished file: 474 passed, 0 failed.
- crates/randprotocol-core/tests/vectors/perps-v1.json: the three perp_digest vectors
  regenerated under set 11 (PERPS_WRITE_VECTORS=1); randprotocol-zkvm's perps_vectors
  failed on the set-9 values on #194/#195. core's golden test still passes.
- docs/deploy.md, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YGaYNLS2uLR7w6m2JtejVo
@dendisuhubdy
dendisuhubdy force-pushed the feat/chain22-perps-set11 branch from e271e60 to b32eed2 Compare November 19, 2026 18:59
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Base automatically changed from feat/perps-pinned-key to feat/cs11-revendor November 19, 2026 19:57
@dendisuhubdy
dendisuhubdy merged commit b32eed2 into feat/cs11-revendor Nov 19, 2026
27 of 28 checks passed
@dendisuhubdy
dendisuhubdy deleted the feat/chain22-perps-set11 branch November 19, 2026 19:57
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