From 253c3372dbf5211c7391fcce1da576a223721d1e Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:44:48 +0800 Subject: [PATCH 1/5] MSA-4: --max-multisig-accounts, a per-node cap on pooled CreateMultisig 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 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- CHANGELOG.md | 8 +++ crates/randprotocol-node/src/admission.rs | 2 + crates/randprotocol-node/src/main.rs | 25 +++++++ crates/randprotocol-node/src/mempool.rs | 68 +++++++++++++++++++ crates/randprotocol-node/src/msauth_key.rs | 1 + crates/randprotocol-node/src/node.rs | 5 ++ crates/randprotocol-node/tests/cluster.rs | 1 + .../randprotocol-node/tests/common/cluster.rs | 1 + crates/randprotocol-node/tests/common/mod.rs | 1 + crates/randprotocol-node/tests/dandelion.rs | 1 + .../randprotocol-node/tests/prover_hosted.rs | 2 + crates/randprotocol-node/tests/split_auth.rs | 1 + docs/cli.md | 1 + docs/multisig.md | 2 +- 14 files changed, 118 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dcf73eb..12b58b61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,14 @@ change): evm-block-context.md` §11.4. The guest's `PREVRANDAO` read waits for the constraint-set-10 re-vendor; `deploy/cut-chain22-genesis.sh` does not carry the section yet. +- **`rand-node run --max-multisig-accounts `** (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. + Core and node (issue #168, ZKVM-203; **genesis-gated, on no chain** — chain 21's genesis hash, wire, storage and behaviour are unchanged): diff --git a/crates/randprotocol-node/src/admission.rs b/crates/randprotocol-node/src/admission.rs index 778845be..35ef08a0 100644 --- a/crates/randprotocol-node/src/admission.rs +++ b/crates/randprotocol-node/src/admission.rs @@ -1402,6 +1402,8 @@ pub fn acceptance_for_pool(e: &MempoolError, hash: Hash, refused: &mut RefusedCa // PERP-6: this node's pool policy; the proof is valid on a chain without `bound_payouts`, // and a peer on an older build relays it honestly. | MempoolError::StateProofOverpays { .. } + // MSA-4: this node's `--max-multisig-accounts`; the create is valid on the chain. + | MempoolError::MultisigAtNodeCap { .. } | MempoolError::AdmissionBusy(_) => Acceptance::Ignore, } } diff --git a/crates/randprotocol-node/src/main.rs b/crates/randprotocol-node/src/main.rs index 35a1dd8c..2ae362e0 100644 --- a/crates/randprotocol-node/src/main.rs +++ b/crates/randprotocol-node/src/main.rs @@ -1003,6 +1003,13 @@ enum Cmd { /// (CON-701; 16 from ~1.43 GB left, 18 from ~5.73 GB, 20 from ~22.9 GB). #[arg(long, value_name = "TIER", value_parser = parse_state_proof_tier)] max_state_proof_tier: Option, + /// MSA-4: stop pooling `CreateMultisig` once the chain's multisig register holds this + /// many accounts (the genesis-seeded ones included): such a create is not verified, + /// pooled, relayed or proposed here. Node policy only, for a chain whose genesis sets no + /// `multisig.max_accounts` (chain 21): a block carrying a create still applies, so the + /// cap holds only as far as the proposers run it. Default: no cap. + #[arg(long, value_name = "COUNT")] + max_multisig_accounts: Option, /// Admission memory budget in MiB (issue #157): one byte budget over RPC request bodies /// and transactions waiting for verification, gossiped or submitted. Past it, /// `rand_sendTransaction` answers -32005 (busy, retry) and gossiped transactions are shed @@ -3301,6 +3308,7 @@ async fn main() -> Result<()> { prover_threads, verify_workers, max_state_proof_tier, + max_multisig_accounts, admission_budget_mb, disable_scan_leaves, apply_proposals_inline, @@ -3374,6 +3382,7 @@ async fn main() -> Result<()> { min_free_disk_bytes: min_free_disk_mb << 20, verify_workers, state_proof_tier_cap: max_state_proof_tier, + multisig_account_cap: max_multisig_accounts, apply_inline: apply_proposals_inline, prune_history, gas_policy: randprotocol_core::gas::GasPolicy::from_prices(gas_price, byte_price), @@ -4853,6 +4862,22 @@ mod tests { } } + /// MSA-4: `--max-multisig-accounts` is unset by default (no cap) and takes a count. + #[test] + fn msa4_the_multisig_accounts_flag_takes_a_count_and_defaults_to_none() { + let run = |extra: &[&str]| { + let args = ["rand-node", "run", "--datadir", "d", "--key", "k.json"].into_iter().chain(extra.iter().copied()); + match Cli::try_parse_from(args).map(|c| c.cmd) { + Ok(Cmd::Run { max_multisig_accounts, .. }) => Ok(max_multisig_accounts), + Ok(_) => unreachable!("a run"), + Err(e) => Err(e.to_string()), + } + }; + assert_eq!(run(&[]).unwrap(), None, "default: no cap"); + assert_eq!(run(&["--max-multisig-accounts", "64"]).unwrap(), Some(64)); + assert!(run(&["--max-multisig-accounts", "many"]).is_err()); + } + /// CON-601: `--max-state-proof-tier` is unset by default (the node sizes the cap from its /// memory) and takes a perps proof tier, nothing else. #[test] diff --git a/crates/randprotocol-node/src/mempool.rs b/crates/randprotocol-node/src/mempool.rs index e1eeb141..c60cc287 100644 --- a/crates/randprotocol-node/src/mempool.rs +++ b/crates/randprotocol-node/src/mempool.rs @@ -108,6 +108,13 @@ pub enum MempoolError { /// penalised, and a block carrying one still applies. #[error("the state proof pays {want} collateral units, more than the {ceiling} the exchange can hold; this node does not pool it")] StateProofOverpays { want: u128, ceiling: u128 }, + /// MSA-4, node policy: a `CreateMultisig` while the register already holds this node's + /// `--max-multisig-accounts` ([`Mempool::set_multisig_account_cap`]). The ledger refuses a + /// create itself only past genesis `multisig.max_accounts` (`RegisterFull`), which chain 21 + /// does not set; this is what this node pools, relays and proposes, never a verdict on the + /// transaction: not cached, no peer penalised, and a block carrying one still applies. + #[error("the multisig register holds {held} accounts, this node's limit of {cap} for new ones; it does not pool a CreateMultisig")] + MultisigAtNodeCap { held: u64, cap: u64 }, /// Issue #157: the admission byte budget ([`crate::admission::AdmissionBudget`]) cannot take /// this transaction now. Retryable, never cached, no peer penalised; `rand_sendTransaction` /// answers it as `-32005`. @@ -470,6 +477,9 @@ pub struct Mempool { /// CON-601: the highest state-proof tier this node verifies for its pool when the key is not /// built ([`MempoolError::StateProofAboveNodeTier`]); `u8::MAX`, no cap, unless set. state_proof_tier_cap: u8, + /// MSA-4: the register size at which this node stops pooling `CreateMultisig` + /// ([`MempoolError::MultisigAtNodeCap`], `--max-multisig-accounts`); `None`, no cap. + multisig_account_cap: Option, } /// CON-60 (b): the burst of verifier-key builds for state-proof shapes this node has no key for @@ -745,9 +755,28 @@ impl Mempool { lineage_keys: ColdKeyBudget::default(), last_cost: std::sync::Mutex::new(None), state_proof_tier_cap: u8::MAX, + multisig_account_cap: None, } } + /// MSA-4: refuse, at the pre-screen and the direct insert, every `CreateMultisig` while the + /// ledger's multisig register holds `cap` accounts or more + /// ([`MempoolError::MultisigAtNodeCap`]); `None`, the default, is no cap. Node policy, never + /// a validity rule: for a chain whose genesis sets no `multisig.max_accounts`. + pub fn set_multisig_account_cap(&mut self, cap: Option) { + self.multisig_account_cap = cap; + } + + /// MSA-4: `Err` for a `CreateMultisig` on a register at this node's cap — one length read. + fn multisig_create_gate(&self, tx: &Transaction, ledger: &Ledger) -> Result<(), MempoolError> { + let (Some(cap), Action::CreateMultisig { .. }) = (self.multisig_account_cap, &tx.action) else { return Ok(()) }; + let held = ledger.multisig().map_or(0, |r| r.len() as u64); + if held >= cap { + return Err(MempoolError::MultisigAtNodeCap { held, cap }); + } + Ok(()) + } + /// CON-601: refuse, at the pre-screen, every state proof above `tier` whose key this node has /// not built ([`MempoolError::StateProofAboveNodeTier`]). Node policy, never a validity rule. pub fn set_state_proof_tier_cap(&mut self, tier: u8) { @@ -1148,6 +1177,8 @@ impl Mempool { ledger.validate(&tx, executor).map_err(MempoolError::Invalid)?; // PERP-6: after the ledger's own verdict, so a `bound_payouts` chain answers by its rule. Self::state_proof_payout_gate(&tx, ledger)?; + // MSA-4: after the ledger's own verdict (a chain with `max_accounts` answers by its rule). + self.multisig_create_gate(&tx, ledger)?; // The pool's policies (the faucet minter rule, COV-2's call screen) after the ledger's own // verdict: this path runs no `precheck`, and it is the one a local `rand_mint` takes. self.pool_policy(&tx, ledger).map_err(MempoolError::Invalid)?; @@ -1295,6 +1326,7 @@ impl Mempool { ) -> Result { self.state_proof_tier_gate(tx, executor)?; Self::state_proof_payout_gate(tx, ledger)?; + self.multisig_create_gate(tx, ledger)?; let c = self.pool_conflicts(tx, ledger, executor)?; Self::applies(tx, &c.commitments, c.claim, ledger).map_err(MempoolError::Invalid)?; self.pool_policy(tx, ledger).map_err(MempoolError::Invalid)?; @@ -5093,6 +5125,42 @@ mod tests { assert!(m.precheck(&perp_state_proof_tx(&l, 1, [7; 8], vec![], 0), &l, ex).is_ok(), "a proof paying nothing passes"); // No perps section: no ceiling, nothing to gate. assert_eq!(Mempool::payout_ceiling(&fixtures::genesis_with(1, vec![]).ledger), None); + /// MSA-4, node policy for a chain without genesis `multisig.max_accounts` (chain 21): with + /// `--max-multisig-accounts` set, a `CreateMultisig` is not pooled once the register holds + /// that many accounts — at the pre-screen and on the direct insert — while the ledger still + /// finds it valid. `Ignore` to gossip, not cached, not retryable. Under the cap, or with no + /// cap (the default), a create is pooled; other multisig actions are never gated. + #[test] + fn msa4_a_create_multisig_past_the_node_cap_is_not_pooled() { + use fixtures::{bundle, key, multisig_genesis, multisig_id, multisig_pay_tx, MULTISIG_CREATE_FEE}; + let gs = multisig_genesis(7); + let l = gs.ledger.clone(); + assert_eq!(l.multisig().unwrap().len(), 1, "the fixture's one seeded account"); + assert!(l.multisig().unwrap().max_accounts.is_none(), "chain 21's shape: no genesis cap"); + let create = StubExecutor::bound(Transaction::shielded( + 7, + bundle(&l, [[1; 8], [2; 8]], [[3; 8], [4; 8]], randprotocol_core::gas::BUNDLE_BASE + MULTISIG_CREATE_FEE), + Action::CreateMultisig { salt: [5; 32], signers: vec![key(71).public_key().clone(), key(72).public_key().clone()], threshold: 1 }, + )); + let ex = &StubExecutor; + assert_eq!(l.validate(&create, ex), Ok(()), "valid to the ledger"); + let mut m = Mempool::new(100); + assert!(m.precheck(&create, &l, ex).is_ok(), "no cap by default"); + m.set_multisig_account_cap(Some(1)); + let refusal = MempoolError::MultisigAtNodeCap { held: 1, cap: 1 }; + assert_eq!(m.precheck(&create, &l, ex).unwrap_err(), refusal); + assert_eq!(m.insert(create.clone(), &l, ex).unwrap_err(), refusal); + assert_eq!(m.insert_verified(create.clone(), &l, ex).unwrap_err(), refusal); + assert!(m.is_empty() && !refusal.is_retryable()); + let mut refused = crate::admission::RefusedCache::new(8); + assert_eq!(crate::admission::acceptance_for_pool(&refusal, create.hash(), &mut refused), crate::admission::Acceptance::Ignore); + assert!(refused.get(&create.hash()).is_none(), "not cached: the create is valid on this chain"); + // The existing account still pays: only a create is gated. + let pay = multisig_pay_tx(&l, multisig_id(7), 0, vec![fixtures::rpl2_payout(0, randprotocol_core::UNITS_PER_RAND, 1)], &[0, 1]); + assert!(m.insert(pay, &l, ex).is_ok()); + // Under the cap a create is pooled. + m.set_multisig_account_cap(Some(2)); + assert!(m.insert(create, &l, ex).is_ok()); } /// CON-601: a node's state-proof tier cap refuses a cold proof above it at the pool's diff --git a/crates/randprotocol-node/src/msauth_key.rs b/crates/randprotocol-node/src/msauth_key.rs index 1d273643..cc52faed 100644 --- a/crates/randprotocol-node/src/msauth_key.rs +++ b/crates/randprotocol-node/src/msauth_key.rs @@ -436,6 +436,7 @@ mod tests { verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth, diff --git a/crates/randprotocol-node/src/node.rs b/crates/randprotocol-node/src/node.rs index 1e8e2ae2..61fc4ef3 100644 --- a/crates/randprotocol-node/src/node.rs +++ b/crates/randprotocol-node/src/node.rs @@ -87,6 +87,9 @@ pub struct NodeConfig { /// ([`crate::mempool::state_proof_tier_cap_for`]: the memory left for a key build, audit v13 /// CON-701). pub state_proof_tier_cap: Option, + /// MSA-4: the multisig register size at which this node stops pooling `CreateMultisig` + /// (`--max-multisig-accounts`); `None`, the default, is no cap. Node policy only. + pub multisig_account_cap: Option, /// Apply incoming proposals on the consensus loop, as before (`--apply-proposals-inline`, /// spec 2026-10-11 off-loop apply §4.5); `false`, the default, applies them on a blocking /// worker ([`OFFLOOP_APPLIES`]). @@ -3145,6 +3148,7 @@ pub async fn start_with(cfg: NodeConfig, rpc_options: RpcOptions, net_options: N mempool.set_faucet_minters(admission::faucet_minters(&gs)); mempool.set_state_proof_tier_cap(state_proof_tier_cap); let pool_tier_cap = mempool.state_proof_tier_cap(); + mempool.set_multisig_account_cap(cfg.multisig_account_cap); if let Some(p) = cfg.gas_policy { mempool.set_gas_policy(p); } @@ -8352,6 +8356,7 @@ mod tests { verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth: Default::default(), diff --git a/crates/randprotocol-node/tests/cluster.rs b/crates/randprotocol-node/tests/cluster.rs index 2eee3650..6519f48f 100644 --- a/crates/randprotocol-node/tests/cluster.rs +++ b/crates/randprotocol-node/tests/cluster.rs @@ -916,6 +916,7 @@ async fn a_build_whose_bundle_guest_differs_from_genesis_refuses_to_start() { verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth: Default::default(), diff --git a/crates/randprotocol-node/tests/common/cluster.rs b/crates/randprotocol-node/tests/common/cluster.rs index 13abe1e5..c120e062 100644 --- a/crates/randprotocol-node/tests/common/cluster.rs +++ b/crates/randprotocol-node/tests/common/cluster.rs @@ -146,6 +146,7 @@ pub async fn start_in_verify( verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history, gas_policy: None, msauth: Default::default(), diff --git a/crates/randprotocol-node/tests/common/mod.rs b/crates/randprotocol-node/tests/common/mod.rs index c1bd9bfa..32930bb0 100644 --- a/crates/randprotocol-node/tests/common/mod.rs +++ b/crates/randprotocol-node/tests/common/mod.rs @@ -159,6 +159,7 @@ pub async fn start_one_validator_shaped(edit: impl FnOnce(&mut Genesis)) -> Test verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth: Default::default(), diff --git a/crates/randprotocol-node/tests/dandelion.rs b/crates/randprotocol-node/tests/dandelion.rs index 8e5d4b36..24fd1750 100644 --- a/crates/randprotocol-node/tests/dandelion.rs +++ b/crates/randprotocol-node/tests/dandelion.rs @@ -63,6 +63,7 @@ async fn start_on_lanes(gen: &Genesis, seed: u8, bootstrap: Vec` | the cores minus one, at most 8 | CPU threads the hosted prover's proofs use (`RAYON_NUM_THREADS` when set and no flag) | | `--verify-workers ` | the cores minus two, at least four | the proof-verification workers of admission and the consensus loop's lookups; the queue and in-flight limits follow it (spec 2026-10-05 §6, `docs/compute-optimization.md` §3.3) | | `--max-state-proof-tier ` | the highest tier whose key build fits in three quarters of the memory left: the host's RAM, or its cgroup's `memory.high`/`memory.max` if lower, less the node's resident size, re-measured every minute and held at 16 or lower for the first minute after a start (CON-701; 16 from ~1.43 GB left, 18 from ~5.73 GB, 20 from ~22.9 GB — so 14 or 12 on a 2 GB host under `MemoryHigh=85%`, CON-751; on macOS the host's RAM alone) | CON-601: a perps state proof above this tier whose shape the node holds no verifier key for is refused at the pool's pre-screen, before any verification or key build (`StateProofAboveNodeTier`); node policy only, a block carrying one still applies. One of 10, 12, 14, 16, 18, 20 (`docs/perps.md`) | +| `--max-multisig-accounts ` | none | MSA-4: once the chain's multisig register holds this many accounts (the genesis-seeded ones included), a `CreateMultisig` is refused at the pool's pre-screen (`MultisigAtNodeCap`: not cached, no peer penalised) and is not verified, pooled, relayed or proposed by this node. Node policy only, for a chain whose genesis sets no `multisig.max_accounts` (chain 21); a block carrying a create still applies (`docs/multisig.md`) | | `--admission-budget-mb ` | 1/16 of the host's RAM, within 64–256 MiB, never under one largest transaction | the admission byte budget (issue #157): RPC request bodies plus transactions waiting for verification. Past it `rand_sendTransaction` answers `-32005` (busy, retry) and gossiped transactions are shed with `Ignore`; a body is charged three times its length, the heap it is measured to hold (OPS-602); a value under one largest transaction (three times the body cap, plus the block cap: 129 MiB on chain 21) is refused at startup (`docs/rpc.md`) | | `--disable-scan-leaves` | off (the method is served) | refuse `rand_getScanLeaves` on both listeners with `-32601` naming the flag (audit v12, RPC-201). A wallet before v0.8.3 scans with it and then reads only its own leaves, which tells the node which leaves it owns; `rand` v0.8.3+ never calls it. The default flips to off at the next minor (`docs/rpc.md`, `rand_getScanLeaves`) | | `--apply-proposals-inline` | off | restore the inline apply: incoming proposals are applied on the consensus loop, as before v0.8.0's off-loop apply; by default the apply runs on a blocking thread (at most 4 at once, up to 8 waiting behind a parent, at most 2 per proposer), with the prechecks, `on_proposal`'s checks and the insert still on the loop (`docs/compute-optimization.md` §3.3). The by-hash fetch answer binding (an answer that is not the block asked for is dropped) is a separate fix and stays on with this flag | diff --git a/docs/multisig.md b/docs/multisig.md index c9963e7f..ad5abb28 100644 --- a/docs/multisig.md +++ b/docs/multisig.md @@ -57,7 +57,7 @@ number of them with RAND, in its `multisig` section: |---|---| | `create_fee` | units of RAND a later `CreateMultisig` must pay **above** the bundle's settled floor (the 0.001 RAND base, plus `fees.prove_base` on an aggregating chain) — not burned: it is part of the bundle's fee, which goes to the proposer, or, on a chain with the `aggregation` section, follows the fee split (the proposer keeps the 0.001 RAND `BUNDLE_BASE`, the rest is bucketed). `0` to 1 000 RAND. Spam on a permanent register is what it prices. | | `accounts` | may be empty: a section with no accounts switches the module on with an empty register. | -| `max_accounts` | optional: the most accounts the register will ever hold, the seeded ones included. A `CreateMultisig` that would take the register past it is refused (`the multisig register is full`), permanently — no account is ever removed. Absent (chain 21 and every chain cut before the field), the register is unbounded. Part of the genesis hash only when present, so a file without it hashes as before; `rand_getLimits.multisig.max_accounts` serves it. | +| `max_accounts` | optional: the most accounts the register will ever hold, the seeded ones included. A `CreateMultisig` that would take the register past it is refused (`the multisig register is full`), permanently — no account is ever removed. Absent (chain 21 and every chain cut before the field), the register is unbounded. Part of the genesis hash only when present, so a file without it hashes as before; `rand_getLimits.multisig.max_accounts` serves it. On a chain without it, a node can still decline to pool creates past a size of its own: `rand-node run --max-multisig-accounts ` (MSA-4, node policy: the create is not verified, pooled, relayed or proposed by that node, `MultisigAtNodeCap`; a block from a proposer without the flag that carries one still applies, so it bounds the register only when every proposer sets it). | | `salt` | 32 bytes (64 hex characters), the creator's randomness in the id. The chain never learns a name. | | `signers` | 1 to 10 distinct Dilithium2 public keys. **The order matters**: a signature names its signer by position (`0:`). | | `threshold` | `1 ≤ threshold ≤ signers`. **Use 2 of 3 or 3 of 5** for a treasury, so one lost key is survived by a rotation. | From b7314f39bce750de223637ae6e8ac2af49822478 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:45:42 +0800 Subject: [PATCH 2/5] MSA-4: the wallet-flow test's node config names multisig_account_cap Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- crates/randprotocol-client/tests/wallet_flow.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/randprotocol-client/tests/wallet_flow.rs b/crates/randprotocol-client/tests/wallet_flow.rs index e0a6493c..be4a578a 100644 --- a/crates/randprotocol-client/tests/wallet_flow.rs +++ b/crates/randprotocol-client/tests/wallet_flow.rs @@ -177,6 +177,7 @@ async fn start_configured(dir: &tempfile::TempDir, key: &Keypair, genesis: Genes verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, // Final review I2: the node runs the default gas policy (what `rand-node run` carries // unless told `--gas-price 0 --byte-price 0`), so every real call proof in these flows is From 85193f3480179bd3635723767b1b71693e0203f1 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:32:35 +0800 Subject: [PATCH 3/5] Leave CHANGELOG.md as main's: the line moves to the PR body for one follow-up changelog PR Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- CHANGELOG.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b58b61..5dcf73eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,14 +34,6 @@ change): evm-block-context.md` §11.4. The guest's `PREVRANDAO` read waits for the constraint-set-10 re-vendor; `deploy/cut-chain22-genesis.sh` does not carry the section yet. -- **`rand-node run --max-multisig-accounts `** (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. - Core and node (issue #168, ZKVM-203; **genesis-gated, on no chain** — chain 21's genesis hash, wire, storage and behaviour are unchanged): From 911a4beb68c8b439163b801cb9a473cb23052ba1 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:40:24 +0800 Subject: [PATCH 4/5] MSA-4: the public-RPC and burst-memory tests' node configs name multisig_account_cap Both tests landed on main (#186, #185) after this branch added the NodeConfig field. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- crates/randprotocol-node/tests/burst_memory.rs | 1 + crates/randprotocol-node/tests/public_rpc_check.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/randprotocol-node/tests/burst_memory.rs b/crates/randprotocol-node/tests/burst_memory.rs index 1510c5ea..0b688433 100644 --- a/crates/randprotocol-node/tests/burst_memory.rs +++ b/crates/randprotocol-node/tests/burst_memory.rs @@ -170,6 +170,7 @@ async fn start_node(gen: &Genesis, key: &Keypair, budget: usize) -> (NodeHandle, verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth: Default::default(), diff --git a/crates/randprotocol-node/tests/public_rpc_check.rs b/crates/randprotocol-node/tests/public_rpc_check.rs index 4db7a084..7e739445 100644 --- a/crates/randprotocol-node/tests/public_rpc_check.rs +++ b/crates/randprotocol-node/tests/public_rpc_check.rs @@ -46,6 +46,7 @@ async fn the_check_passes_on_the_public_listener_and_fails_on_the_operator_one() verify_workers: None, apply_inline: false, state_proof_tier_cap: None, + multisig_account_cap: None, prune_history: None, gas_policy: None, msauth: Default::default(), From 6eae671e65feaf2d18be15b3f2af7c58a59dafe8 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Thu, 19 Nov 2026 03:04:39 +0800 Subject: [PATCH 5/5] MSA-4: close the PERP-6 pool test before the MSA-4 one (rebase onto #173) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- crates/randprotocol-node/src/mempool.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/randprotocol-node/src/mempool.rs b/crates/randprotocol-node/src/mempool.rs index c60cc287..e1deea56 100644 --- a/crates/randprotocol-node/src/mempool.rs +++ b/crates/randprotocol-node/src/mempool.rs @@ -5125,6 +5125,8 @@ mod tests { assert!(m.precheck(&perp_state_proof_tx(&l, 1, [7; 8], vec![], 0), &l, ex).is_ok(), "a proof paying nothing passes"); // No perps section: no ceiling, nothing to gate. assert_eq!(Mempool::payout_ceiling(&fixtures::genesis_with(1, vec![]).ledger), None); + } + /// MSA-4, node policy for a chain without genesis `multisig.max_accounts` (chain 21): with /// `--max-multisig-accounts` set, a `CreateMultisig` is not pooled once the register holds /// that many accounts — at the pre-screen and on the direct insert — while the ledger still