genesis: refuse an M-Chain policy the validator set cannot satisfy

M-Chain's committee is the validator set, and RunKeygen refuses a policy
needing more parties than the committee has. mainnet's mchain.json asked
for 7-of-10 against five genesis validators, so a custody key could never
have been generated — the failure would have surfaced the first time
someone tried to bridge, not at deploy.

Adds the invariant as a test over every network's built genesis, and
picks up luxfi/genesis v1.16.4 where the policies are sized to fit
(3-of-5 on mainnet/testnet/devnet, 2-of-3 on localnet).

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
zeekay
2026-07-25 14:59:04 -07:00
co-authored by Hanzo Dev
parent d5eff75934
commit 3a44f0dcd3
3 changed files with 38 additions and 5 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ require (
github.com/luxfi/constants v1.6.2
github.com/luxfi/container v0.2.1
github.com/luxfi/filesystem v0.0.1
github.com/luxfi/genesis v1.16.3
github.com/luxfi/genesis v1.16.4
github.com/luxfi/genesis/pkg/genesis/security v1.13.8
github.com/luxfi/geth v1.20.1
github.com/luxfi/go-bip39 v1.2.0