mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 05:11:02 +00:00
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:
committed by
Bastian Köcher
parent
9e9ac8df3c
commit
f52c839d6e
@@ -15,8 +15,8 @@
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use rialto_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeKovanConfig, BridgeRialtoConfig, GenesisConfig, GrandpaConfig,
|
||||
SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeKovanConfig, BridgeMillauConfig, BridgeRialtoPoAConfig, GenesisConfig,
|
||||
GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
};
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_core::{sr25519, Pair, Public};
|
||||
@@ -152,11 +152,12 @@ fn testnet_genesis(
|
||||
pallet_aura: Some(AuraConfig {
|
||||
authorities: Vec::new(),
|
||||
}),
|
||||
pallet_bridge_eth_poa_Instance1: load_rialto_bridge_config(),
|
||||
pallet_bridge_eth_poa_Instance1: load_rialto_poa_bridge_config(),
|
||||
pallet_bridge_eth_poa_Instance2: load_kovan_bridge_config(),
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: Vec::new(),
|
||||
}),
|
||||
pallet_substrate_bridge: load_millau_bridge_config(),
|
||||
pallet_sudo: Some(SudoConfig { key: root_key }),
|
||||
pallet_session: Some(SessionConfig {
|
||||
keys: initial_authorities
|
||||
@@ -167,11 +168,11 @@ fn testnet_genesis(
|
||||
}
|
||||
}
|
||||
|
||||
fn load_rialto_bridge_config() -> Option<BridgeRialtoConfig> {
|
||||
Some(BridgeRialtoConfig {
|
||||
initial_header: rialto_runtime::rialto::genesis_header(),
|
||||
fn load_rialto_poa_bridge_config() -> Option<BridgeRialtoPoAConfig> {
|
||||
Some(BridgeRialtoPoAConfig {
|
||||
initial_header: rialto_runtime::rialto_poa::genesis_header(),
|
||||
initial_difficulty: 0.into(),
|
||||
initial_validators: rialto_runtime::rialto::genesis_validators(),
|
||||
initial_validators: rialto_runtime::rialto_poa::genesis_validators(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -182,3 +183,12 @@ fn load_kovan_bridge_config() -> Option<BridgeKovanConfig> {
|
||||
initial_validators: rialto_runtime::kovan::genesis_validators(),
|
||||
})
|
||||
}
|
||||
|
||||
fn load_millau_bridge_config() -> Option<BridgeMillauConfig> {
|
||||
Some(BridgeMillauConfig {
|
||||
initial_header: Some(rialto_runtime::millau::initial_header()),
|
||||
initial_authority_list: rialto_runtime::millau::initial_authority_set().authorities,
|
||||
initial_set_id: rialto_runtime::millau::initial_authority_set().set_id,
|
||||
first_scheduled_change: None,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user