Skip to content
Snippets Groups Projects
Commit 23cfd0ed authored by asynchronous rob's avatar asynchronous rob Committed by GitHub
Browse files

update rococo and remove cursed BEEFY migration (#2870)

* update rococo and remove cursed BEEFY migration

* remove migration

* tweak VERSION
parent af5a158e
No related merge requests found
This diff is collapsed.
......@@ -108,9 +108,9 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
/// Runtime version (Rococo).
pub const VERSION: RuntimeVersion = RuntimeVersion {
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,
spec_version: 228,
spec_version: 231,
impl_version: 0,
#[cfg(not(feature = "disable-runtime-api"))]
apis: RUNTIME_API_VERSIONS,
......@@ -167,23 +167,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
UpgradeSessionKeys,
(),
>;
/// The payload being signed in transactions.
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! {
pub struct SessionKeys {
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! {
pub enum Runtime where
Block = Block,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment