Make Validator Set Network a first-class property

There already should only be one validator set operating per network. This
formalizes that. Then, validator sets used to be able to operate over multiple
networks. That is no longer possible.

This formalization increases validator set flexibility while also allowing the
ability to formalize the definiton of tokens (which is necessary to define a
gas asset).
This commit is contained in:
Luke Parker
2023-03-25 01:30:53 -04:00
parent 397d79040c
commit 6a981dae6e
10 changed files with 136 additions and 104 deletions

View File

@@ -50,7 +50,11 @@ fn testnet_genesis(
session: SessionConfig { keys: validators.iter().map(|name| session_key(*name)).collect() },
validator_sets: ValidatorSetsConfig {
bond: Amount(1_000_000 * 10_u64.pow(8)),
coins: vec![BITCOIN, ETHER, DAI, MONERO],
networks: vec![
(BITCOIN_NET_ID, BITCOIN_NET.clone()),
(ETHEREUM_NET_ID, ETHEREUM_NET.clone()),
(MONERO_NET_ID, MONERO_NET.clone()),
],
participants: validators.iter().map(|name| account_from_name(name)).collect(),
},
}