mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 00:01:03 +00:00
update rococo and remove cursed BEEFY migration (#2870)
* update rococo and remove cursed BEEFY migration * remove migration * tweak VERSION
This commit is contained in:
committed by
GitHub
parent
af5a158e72
commit
23cfd0edb9
File diff suppressed because one or more lines are too long
@@ -108,9 +108,9 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
|||||||
/// Runtime version (Rococo).
|
/// Runtime version (Rococo).
|
||||||
pub const VERSION: RuntimeVersion = RuntimeVersion {
|
pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||||
spec_name: create_runtime_str!("rococo"),
|
spec_name: create_runtime_str!("rococo"),
|
||||||
impl_name: create_runtime_str!("parity-rococo-v1-1"),
|
impl_name: create_runtime_str!("parity-rococo-v1.5"),
|
||||||
authoring_version: 0,
|
authoring_version: 0,
|
||||||
spec_version: 228,
|
spec_version: 231,
|
||||||
impl_version: 0,
|
impl_version: 0,
|
||||||
#[cfg(not(feature = "disable-runtime-api"))]
|
#[cfg(not(feature = "disable-runtime-api"))]
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
@@ -167,23 +167,11 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPallets,
|
AllPallets,
|
||||||
UpgradeSessionKeys,
|
(),
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in transactions.
|
/// The payload being signed in transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
|
|
||||||
// TODO [ToDr] Remove while BEEFY runtime upgrade is done.
|
|
||||||
impl_opaque_keys! {
|
|
||||||
pub struct OldSessionKeys {
|
|
||||||
pub grandpa: Grandpa,
|
|
||||||
pub babe: Babe,
|
|
||||||
pub im_online: ImOnline,
|
|
||||||
pub para_validator: Initializer,
|
|
||||||
pub para_assignment: SessionInfo,
|
|
||||||
pub authority_discovery: AuthorityDiscovery,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl_opaque_keys! {
|
impl_opaque_keys! {
|
||||||
pub struct SessionKeys {
|
pub struct SessionKeys {
|
||||||
pub grandpa: Grandpa,
|
pub grandpa: Grandpa,
|
||||||
@@ -196,27 +184,6 @@ impl_opaque_keys! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys {
|
|
||||||
SessionKeys {
|
|
||||||
grandpa: old.grandpa,
|
|
||||||
babe: old.babe,
|
|
||||||
im_online: old.im_online,
|
|
||||||
para_validator: old.para_validator,
|
|
||||||
para_assignment: old.para_assignment,
|
|
||||||
authority_discovery: old.authority_discovery,
|
|
||||||
beefy: runtime_common::dummy_beefy_id_from_account_id(v),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// When this is removed, should also remove `OldSessionKeys`.
|
|
||||||
pub struct UpgradeSessionKeys;
|
|
||||||
impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys {
|
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
|
||||||
Session::upgrade_keys::<OldSessionKeys, _>(transform_session_keys);
|
|
||||||
Perbill::from_percent(50) * BlockWeights::get().max_block
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
pub enum Runtime where
|
pub enum Runtime where
|
||||||
Block = Block,
|
Block = Block,
|
||||||
|
|||||||
Reference in New Issue
Block a user