mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 21:51:06 +00:00
Add BEEFY capabilities to Westend and Kusama (#7591)
* runtime: add BEEFY and MMR to Westend Signed-off-by: Adrian Catangiu <adrian@parity.io> * runtime: add BEEFY and MMR to Kusama Signed-off-by: Adrian Catangiu <adrian@parity.io> * node/service: enable BEEFY for Westend and Kusama Signed-off-by: Adrian Catangiu <adrian@parity.io> * node/service: regenerate genesis keys for westend-native and kusama-native Since these keys are only used for development/local chains, also publish the secret seeds used to generate the public keys, so that developers can recover/generate the private key pairs if needed. Signed-off-by: Adrian Catangiu <adrian@parity.io> * runtime: add session keys migration to add BEEFY to Westend and Kusama * runtime: fix migration * fix try-runtime build * cargo fmt * fix parachains slashing benchmark * address review comments * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * runtime: fix session keys migration --------- Signed-off-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -1331,8 +1331,8 @@ parameter_types! {
|
||||
pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0);
|
||||
}
|
||||
|
||||
pub struct ParasProvider;
|
||||
impl BeefyDataProvider<H256> for ParasProvider {
|
||||
pub struct ParaHeadsRootProvider;
|
||||
impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
||||
fn extra_data() -> H256 {
|
||||
let mut para_heads: Vec<(u32, Vec<u8>)> = Paras::parachains()
|
||||
.into_iter()
|
||||
@@ -1350,7 +1350,7 @@ impl pallet_beefy_mmr::Config for Runtime {
|
||||
type LeafVersion = LeafVersion;
|
||||
type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum;
|
||||
type LeafExtra = H256;
|
||||
type BeefyDataProvider = ParasProvider;
|
||||
type BeefyDataProvider = ParaHeadsRootProvider;
|
||||
}
|
||||
|
||||
impl paras_sudo_wrapper::Config for Runtime {}
|
||||
@@ -1402,9 +1402,14 @@ construct_runtime! {
|
||||
Authorship: pallet_authorship::{Pallet, Storage} = 5,
|
||||
Offences: pallet_offences::{Pallet, Storage, Event} = 7,
|
||||
Historical: session_historical::{Pallet} = 34,
|
||||
|
||||
// BEEFY Bridges support.
|
||||
Beefy: pallet_beefy::{Pallet, Call, Storage, Config<T>, ValidateUnsigned} = 240,
|
||||
// MMR leaf construction must be before session in order to have leaf contents
|
||||
// refer to block<N-1> consistently. see substrate issue #11797 for details.
|
||||
Mmr: pallet_mmr::{Pallet, Storage} = 241,
|
||||
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 242,
|
||||
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 8,
|
||||
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event, ValidateUnsigned} = 10,
|
||||
ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 11,
|
||||
@@ -1488,12 +1493,6 @@ construct_runtime! {
|
||||
// Pallet for sending XCM.
|
||||
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 99,
|
||||
|
||||
// Rococo specific pallets (not included in Kusama). Start indices at 240
|
||||
//
|
||||
// BEEFY Bridges support.
|
||||
Beefy: pallet_beefy::{Pallet, Call, Storage, Config<T>, ValidateUnsigned} = 240,
|
||||
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 242,
|
||||
|
||||
ParasSudoWrapper: paras_sudo_wrapper::{Pallet, Call} = 250,
|
||||
AssignedSlots: assigned_slots::{Pallet, Call, Storage, Event<T>, Config<T>} = 251,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user