From 4223a9980dcfff5e092066a377f7614f860e80d0 Mon Sep 17 00:00:00 2001 From: yahortsaryk Date: Thu, 17 Oct 2024 00:42:06 +0200 Subject: [PATCH] build: Devnet runtime version is aligned with Qanet --- Cargo.lock | 38 ++++++++++++++++---------------- Cargo.toml | 2 +- runtime/cere-dev/src/lib.rs | 43 +------------------------------------ runtime/cere/src/lib.rs | 6 +----- 4 files changed, 22 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12dab54e7..c55ccb9cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "cere-cli" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-client", "cere-service", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -956,7 +956,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1052,7 +1052,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "5.5.0" +version = "6.0.0" dependencies = [ "jsonrpsee", "node-primitives", @@ -1081,7 +1081,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1177,7 +1177,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "5.5.0" +version = "6.0.0" dependencies = [ "frame-support", "frame-system", @@ -1198,7 +1198,7 @@ dependencies = [ [[package]] name = "cere-service" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-client", "cere-dev-runtime", @@ -1846,7 +1846,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "5.5.0" +version = "6.0.0" dependencies = [ "blake2", "frame-support", @@ -5109,7 +5109,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "5.5.0" +version = "6.0.0" dependencies = [ "frame-support", "frame-system", @@ -5230,7 +5230,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "5.5.0" +version = "6.0.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5257,7 +5257,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters-gov" -version = "5.5.0" +version = "6.0.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5292,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "5.5.0" +version = "6.0.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5315,7 +5315,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "5.5.0" +version = "6.0.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5338,7 +5338,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "5.5.0" +version = "6.0.0" dependencies = [ "byte-unit", "chrono", @@ -5363,7 +5363,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "5.5.0" +version = "6.0.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5391,7 +5391,7 @@ dependencies = [ [[package]] name = "pallet-ddc-verification" -version = "5.5.0" +version = "6.0.0" dependencies = [ "array-bytes", "base64ct", @@ -5499,7 +5499,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "5.5.0" +version = "6.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5518,7 +5518,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "5.5.0" +version = "6.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5768,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-origins" -version = "5.5.0" +version = "6.0.0" dependencies = [ "cere-runtime-common", "frame-benchmarking", diff --git a/Cargo.toml b/Cargo.toml index 941e3ecf7..6f9b90deb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "5.5.0" +version = "6.0.0" authors = ["Cerebellum-Network"] edition = "2021" homepage = "https://cere.network/" diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 7f46ee061..53a9ac6e2 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 55000, + spec_version: 60000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 19, @@ -503,15 +503,6 @@ impl pallet_authorship::Config for Runtime { type EventHandler = (Staking, ImOnline); } -impl_opaque_keys! { - pub struct OldSessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub authority_discovery: AuthorityDiscovery, - } -} - impl_opaque_keys! { pub struct SessionKeys { pub grandpa: Grandpa, @@ -522,22 +513,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, - authority_discovery: old.authority_discovery, - ddc_verification: { - let mut id: ddc_primitives::sr25519::AuthorityId = - sp_core::sr25519::Public::from_raw([0u8; 32]).into(); - let id_raw: &mut [u8] = id.as_mut(); - id_raw[0..32].copy_from_slice(v.as_ref()); - id_raw[0..4].copy_from_slice(b"cer!"); - id - }, - } -} impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; @@ -1437,22 +1412,6 @@ pub type Executive = frame_executive::Executive< Migrations, >; -pub mod migrations { - use super::*; - - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - fn on_runtime_upgrade() -> Weight { - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block - } - } - - /// Unreleased migrations. Add new ones here: - pub type Unreleased = (UpgradeSessionKeys,); -} - type EventRecord = frame_system::EventRecord< ::RuntimeEvent, ::Hash, diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index de9bf5260..10b4cd473 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -922,11 +922,7 @@ impl pallet_contracts::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type Debug = (); type Environment = (); - type Migrations = ( - pallet_contracts::migration::v13::Migration, - pallet_contracts::migration::v14::Migration, - pallet_contracts::migration::v15::Migration, - ); + type Migrations = (); } impl pallet_sudo::Config for Runtime {