Add GenesisConfig for Millau and Rialto Runtimes (#401)

* Add Rialto as a target for the Millau node

* Rename Rialto module to Rialto-PoA

This will reduce confusion as the Millau runtime has a
Rialto module as well which refers to the Substrate chain.

* Add Millau as a target for the Rialto node

* Be more explicit about Rialto PoA related code

* Missed some name changes in the Ethereum PoA relay

* Re-export Substrate pallet structs used by node

* Remove `first_scheduled_change` of Millau in Rialto node

* Make Millau's genesis config for Rialto bridge more accurate

* Set initial header for Millau config

* Update initial Millau authorities

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>

* RustFmt Millau authorities

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
Hernando Castano
2020-10-09 02:09:06 -04:00
committed by Bastian Köcher
parent 9e9ac8df3c
commit f52c839d6e
13 changed files with 210 additions and 35 deletions
+12 -2
View File
@@ -15,8 +15,8 @@
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
use millau_runtime::{
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature,
SudoConfig, SystemConfig, WASM_BINARY,
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, GenesisConfig, GrandpaConfig, SessionConfig,
SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{sr25519, Pair, Public};
@@ -155,6 +155,7 @@ fn testnet_genesis(
pallet_grandpa: Some(GrandpaConfig {
authorities: Vec::new(),
}),
pallet_substrate_bridge: load_rialto_bridge_config(),
pallet_sudo: Some(SudoConfig { key: root_key }),
pallet_session: Some(SessionConfig {
keys: initial_authorities
@@ -164,3 +165,12 @@ fn testnet_genesis(
}),
}
}
fn load_rialto_bridge_config() -> Option<BridgeRialtoConfig> {
Some(BridgeRialtoConfig {
initial_header: Some(millau_runtime::rialto::initial_header()),
initial_authority_list: millau_runtime::rialto::initial_authority_set().authorities,
initial_set_id: millau_runtime::rialto::initial_authority_set().set_id,
first_scheduled_change: None,
})
}