Skip to content

MSA-4: --max-multisig-accounts, a per-node cap on pooled CreateMultisig - #176

Merged
dendisuhubdy merged 5 commits into
mainfrom
feat/i36-multisig-create-policy
Nov 18, 2026
Merged

dendisuhubdy merged 5 commits into
mainfrom
feat/i36-multisig-create-policy

Conversation

@dendisuhubdy

@dendisuhubdy dendisuhubdy commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Tracks randprotocol/monorepo#36

State of main

Genesis multisig.max_accounts exists since v0.8.2 and is an operator input of deploy/cut-chain22-genesis.sh (MULTISIG_MAX_ACCOUNTS, no default). Chain 21's genesis does not set it, so the ledger never refuses a create there.

What this PR does

rand-node run --max-multisig-accounts <COUNT> (off by default). Once the multisig register holds that many accounts, the pool's pre-screen and direct insert refuse a CreateMultisig (MultisigAtNodeCap: Ignore to gossip, not cached, no peer penalised). The node then does not verify, pool, relay or propose it. Other multisig actions are not affected.

Consensus

Not consensus-visible; no gate needed. Ledger::validate / apply are untouched: a block carrying a create applies as on v0.8.6. The validity rule stays genesis multisig.max_accounts.

Tests

  • mempool::tests::msa4_a_create_multisig_past_the_node_cap_is_not_pooled and msa4_the_multisig_accounts_flag_takes_a_count_and_defaults_to_none (new).
  • cargo test -p randprotocol-node --lib -- msa4_ mempool:: admission::: 119 passed. cargo check -p randprotocol-node --tests and clippy with warnings denied: clean.

Residual

  • Off by default: it does nothing until hosts are started with the flag, and the value is the owner's.
  • It bounds the register only when every proposer runs it; one proposer without it can still include creates.
  • The consensus cap needs MULTISIG_MAX_ACCOUNTS chosen and chain 22 cut.

Changelog line

Not in this branch (CHANGELOG.md is left as main's); for the follow-up changelog PR, under Unreleased:

- **`rand-node run --max-multisig-accounts <COUNT>`** (MSA-4, node policy; consensus unchanged):
  once the multisig register holds that many accounts, the node's pool refuses a `CreateMultisig`
  (`MultisigAtNodeCap`: not cached, no peer penalised), so it is not verified, pooled, relayed or
  proposed there. Off by default. For a chain whose genesis sets no `multisig.max_accounts`
  (chain 21): a block carrying a create still applies, so the register is bounded only when every
  proposer sets the flag. The validity rule stays genesis `multisig.max_accounts`, an operator
  input of the chain-22 cut.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN

@dendisuhubdy
dendisuhubdy force-pushed the feat/i36-multisig-create-policy branch 4 times, most recently from 2f6e3cd to 98c96f6 Compare November 18, 2026 09:40
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

dendisuhubdy and others added 5 commits November 19, 2026 03:02
Node policy; consensus is unchanged. With the flag set, the pool's
pre-screen and its direct insert refuse a CreateMultisig once the multisig
register holds that many accounts (MultisigAtNodeCap: Ignore to gossip, not
cached), so the node does not verify, pool, relay or propose it. Off by
default. For a chain whose genesis sets no multisig.max_accounts: a block
carrying a create still applies, so the register is bounded only when
every proposer sets the flag. The validity rule stays the genesis field.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
…ollow-up changelog PR

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
…sig_account_cap

Both tests landed on main (#186, #185) after this branch added the NodeConfig field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
@dendisuhubdy
dendisuhubdy force-pushed the feat/i36-multisig-create-policy branch from 98c96f6 to 6eae671 Compare November 18, 2026 19:04
@dendisuhubdy
dendisuhubdy merged commit 1cc4c63 into main Nov 18, 2026
19 of 23 checks passed
@dendisuhubdy
dendisuhubdy deleted the feat/i36-multisig-create-policy branch November 18, 2026 19:51
dendisuhubdy added a commit that referenced this pull request Nov 18, 2026
… Unreleased (#192)

Each entry is the PR's own "Changelog line" section, which the PRs kept out of CHANGELOG.md so they would not conflict with each other: #173, #174, #176–#180, #183, #185–#188 (#175 is test-only and has none).


Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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