From 50df8f0600fbfc8dd6e8ce8b075092ac79d83966 Mon Sep 17 00:00:00 2001 From: Elden Young <59600396+ytqaljn@users.noreply.github.com> Date: Mon, 16 Oct 2023 16:48:19 +0800 Subject: [PATCH] 0.7.4 fix (#243) * test: add test storage * fix: warning and crate version --- Cargo.lock | 4 +- c-pallets/audit/Cargo.toml | 20 ++++---- c-pallets/audit/src/constants.rs | 2 +- c-pallets/audit/src/lib.rs | 66 ++++++++++++++++----------- c-pallets/cacher/Cargo.toml | 4 +- c-pallets/file-bank/Cargo.toml | 21 ++------- c-pallets/file-bank/src/lib.rs | 4 +- c-pallets/oss/Cargo.toml | 4 +- c-pallets/scheduler-credit/Cargo.toml | 3 +- c-pallets/sminer-reward/src/lib.rs | 2 - c-pallets/sminer/Cargo.toml | 15 +++--- c-pallets/sminer/src/lib.rs | 3 +- c-pallets/storage-handler/Cargo.toml | 4 +- c-pallets/storage-handler/src/lib.rs | 8 ++-- c-pallets/tee-worker/Cargo.toml | 8 ++-- c-pallets/tee-worker/src/lib.rs | 4 +- node/Cargo.toml | 2 +- runtime/Cargo.toml | 20 ++++---- runtime/src/lib.rs | 4 +- 19 files changed, 102 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4b846a2..af054d52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -880,7 +880,7 @@ dependencies = [ [[package]] name = "cess-node" -version = "0.7.0" +version = "0.7.4" dependencies = [ "array-bytes", "async-trait", @@ -969,7 +969,7 @@ dependencies = [ [[package]] name = "cess-node-runtime" -version = "0.7.0" +version = "0.7.4" dependencies = [ "cessp-consensus-rrsc", "cp-cess-common", diff --git a/c-pallets/audit/Cargo.toml b/c-pallets/audit/Cargo.toml index f0128246..dbd829be 100644 --- a/c-pallets/audit/Cargo.toml +++ b/c-pallets/audit/Cargo.toml @@ -19,11 +19,11 @@ pallet-cess-staking = { path = '../staking', version = '4.0.0-dev', default-feat pallet-preimage = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/CESSProject/substrate', branch = "cess-polkadot-v0.9.42" } # local pallet -cp-bloom-filter = { path = '../../primitives/bloom-filter', version = '0.1.0', default-features = false } -cp-scheduler-credit = { path = '../../primitives/scheduler-credit', version = '0.1.0', default-features = false } -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } -cp-enclave-verify = { path = '../../primitives/enclave-verify', version = '0.1.0', default-features = false } -pallet-sminer-reward = { default-features = false, path = "../sminer-reward", version = "0.7.4" } +cp-bloom-filter = { path = '../../primitives/bloom-filter', default-features = false } +cp-scheduler-credit = { path = '../../primitives/scheduler-credit', default-features = false } +cp-cess-common = { path = '../../primitives/common', default-features = false } +cp-enclave-verify = { path = '../../primitives/enclave-verify', default-features = false } +pallet-sminer-reward = { default-features = false, path = "../sminer-reward" } [dependencies.frame-benchmarking] default-features = false @@ -84,25 +84,21 @@ version = '7.0.0' [dependencies.pallet-file-bank] default-features = false path = '../file-bank' -version = '0.7.0' # local dependencies [dependencies.pallet-sminer] default-features = false path = '../sminer' -version = '0.7.0' # local dependencies [dependencies.pallet-tee-worker] default-features = false path = '../tee-worker' -version = '0.7.0' # local dependencies [dependencies.pallet-storage-handler] default-features = false path = '../storage-handler' -version = '0.7.0' [dev-dependencies.frame-support-test] default-features = false @@ -129,9 +125,9 @@ sp-npos-elections = { version = "4.0.0-dev", git = "https://github.com/CESSProje frame-election-provider-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } pallet-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } pallet-bags-list = { version = "4.0.0-dev", git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } -pallet-scheduler-credit = { version = "0.1.0", default-features = false, path = '../scheduler-credit'} -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } -pallet-oss = { path = '../oss', version = '0.7.0', default-features = false } +pallet-scheduler-credit = { default-features = false, path = '../scheduler-credit'} +cp-cess-common = { path = '../../primitives/common', default-features = false } +pallet-oss = { path = '../oss', default-features = false } [features] default = ["std"] diff --git a/c-pallets/audit/src/constants.rs b/c-pallets/audit/src/constants.rs index b7a333b7..68db30ae 100644 --- a/c-pallets/audit/src/constants.rs +++ b/c-pallets/audit/src/constants.rs @@ -5,7 +5,7 @@ pub(super) const IDLE_PROVE_RATE: u128 = 71_582_788; pub(super) const IDLE_VERIFY_RATE: u128 = 2_147_483_648; -pub(super) const IDLE_FAULT_TOLERANT: u8 = 2; +// pub(super) const IDLE_FAULT_TOLERANT: u8 = 2; pub(super) const SERVICE_FAULT_TOLERANT: u8 = 2; diff --git a/c-pallets/audit/src/lib.rs b/c-pallets/audit/src/lib.rs index 21fdabfa..604fb883 100644 --- a/c-pallets/audit/src/lib.rs +++ b/c-pallets/audit/src/lib.rs @@ -92,7 +92,6 @@ use sp_std::{ convert:: { TryFrom, TryInto }, prelude::*, }; -use cp_cess_common::*; pub use weights::WeightInfo; type AccountOf = ::AccountId; @@ -372,6 +371,10 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn verify_slip)] pub(super) type VerifySlip = StorageDoubleMap<_, Blake2_128Concat, BlockNumberOf, Blake2_128Concat, AccountOf, bool>; + // FOR TEST + #[pallet::storage] + #[pallet::getter(fn test_option_storage)] + pub(super) type TestOptionStorageV2 = StorageMap<_, Blake2_128Concat, u32, ProveInfo>; #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] @@ -642,15 +645,26 @@ pub mod pallet { Ok(()) }) } - + // FOR TEST #[pallet::call_index(7)] #[transactional] - #[pallet::weight(100_000_000)] + #[pallet::weight(Weight::zero())] pub fn update_counted_clear(origin: OriginFor, miner: AccountOf) -> DispatchResult { let _ = ensure_root(origin)?; >::insert(&miner, 0); + Ok(()) + } + // FOR TEST + #[pallet::call_index(8)] + #[transactional] + #[pallet::weight(Weight::zero())] + pub fn test_insert_option(origin: OriginFor, key: u32, value: ProveInfo ) -> DispatchResult { + let _sender = ensure_signed(origin)?; + + TestOptionStorageV2::insert(key, value); + Ok(()) } } @@ -663,33 +677,33 @@ pub mod pallet { if let Ok(challenge_info) = >::try_get(&miner) { weight = weight.saturating_add(T::DbWeight::get().reads(1)); if challenge_info.prove_info.service_prove.is_none() { - let count = >::get(&miner).checked_add(1).unwrap_or(6); - weight = weight.saturating_add(T::DbWeight::get().reads(1)); + let count = >::get(&miner).checked_add(1).unwrap_or(6); + weight = weight.saturating_add(T::DbWeight::get().reads(1)); - let _ = T::MinerControl::clear_punish( + let _ = T::MinerControl::clear_punish( + &miner, + count, + challenge_info.miner_snapshot.idle_space, + challenge_info.miner_snapshot.service_space + ); + weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); + //For Testing + if count >= 6 { + let result = T::MinerControl::force_miner_exit(&miner); + weight = weight.saturating_add(T::DbWeight::get().reads_writes(5, 5)); + if result.is_err() { + log::info!("force clear miner: {:?} failed", miner); + } + >::remove(&miner); + weight = weight.saturating_add(T::DbWeight::get().writes(1)); + } else { + >::insert( &miner, - count, - challenge_info.miner_snapshot.idle_space, - challenge_info.miner_snapshot.service_space + count, ); - weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); - //For Testing - if count >= 6 { - let result = T::MinerControl::force_miner_exit(&miner); - weight = weight.saturating_add(T::DbWeight::get().reads_writes(5, 5)); - if result.is_err() { - log::info!("force clear miner: {:?} failed", miner); - } - >::remove(&miner); - weight = weight.saturating_add(T::DbWeight::get().writes(1)); - } else { - >::insert( - &miner, - count, - ); - weight = weight.saturating_add(T::DbWeight::get().writes(1)); - } + weight = weight.saturating_add(T::DbWeight::get().writes(1)); } + } } >::remove(&now, &miner); diff --git a/c-pallets/cacher/Cargo.toml b/c-pallets/cacher/Cargo.toml index b8befdd1..7bcc222c 100644 --- a/c-pallets/cacher/Cargo.toml +++ b/c-pallets/cacher/Cargo.toml @@ -11,9 +11,11 @@ sp-std = { version = "5.0.0", default-features = false, git = "https://github.co sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } frame-benchmarking = { version = '4.0.0-dev', default-features = false, git = 'https://github.com/CESSProject/substrate', branch = 'cess-polkadot-v0.9.42', optional = true} +#local dependencies +cp-cess-common = { path = '../../primitives/common', default-features = false } + [dev-dependencies] sp-core = {version = '7.0.0', git = 'https://github.com/CESSProject/substrate', default-features = false, branch = 'cess-polkadot-v0.9.42'} pallet-balances = { version = "4.0.0-dev", git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } diff --git a/c-pallets/file-bank/Cargo.toml b/c-pallets/file-bank/Cargo.toml index 12ca3413..e78d075d 100755 --- a/c-pallets/file-bank/Cargo.toml +++ b/c-pallets/file-bank/Cargo.toml @@ -31,6 +31,11 @@ pallet-grandpa = { version = "4.0.0-dev", default-features = false, git = "https pallet-scheduler = { version = '4.0.0-dev', git = 'https://github.com/CESSProject/substrate', branch = "cess-polkadot-v0.9.42", default-features = false } # sc-network = { version = "0.10.0-dev", git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } +# local dependencies +pallet-sminer = { default-features = false, path = '../sminer' } +pallet-tee-worker = { default-features = false, path = '../tee-worker' } +pallet-storage-handler = { default-features = false, path = '../storage-handler' } + [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/CESSProject/substrate' @@ -80,22 +85,6 @@ git = 'https://github.com/CESSProject/substrate' branch = "cess-polkadot-v0.9.42" version = '7.0.0' -# local dependencies -[dependencies.pallet-sminer] -default-features = false -path = '../sminer' -version = '0.7.0' - -[dependencies.pallet-tee-worker] -default-features = false -path = '../tee-worker' -version = '0.7.0' - -[dependencies.pallet-storage-handler] -default-features = false -path = '../storage-handler' -version = '0.7.0' - # dev dependencies [dev-dependencies] pallet-cess-staking = { path = '../staking', version = '4.0.0-dev', default-features = false} diff --git a/c-pallets/file-bank/src/lib.rs b/c-pallets/file-bank/src/lib.rs index e91ca7ec..19129958 100755 --- a/c-pallets/file-bank/src/lib.rs +++ b/c-pallets/file-bank/src/lib.rs @@ -1085,10 +1085,10 @@ pub mod pallet { Ok(()) } - + // FOR TEST #[pallet::call_index(20)] #[transactional] - #[pallet::weight(10_000_000_000)] + #[pallet::weight(Weight::zero())] pub fn root_clear_failed_count(origin: OriginFor) -> DispatchResult { let _ = ensure_root(origin)?; diff --git a/c-pallets/oss/Cargo.toml b/c-pallets/oss/Cargo.toml index 3d33518e..6980a7d7 100644 --- a/c-pallets/oss/Cargo.toml +++ b/c-pallets/oss/Cargo.toml @@ -11,9 +11,11 @@ sp-std = { version = "5.0.0", default-features = false, git = "https://github.co sp-runtime = { version = "7.0.0", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } frame-benchmarking = { version = '4.0.0-dev', default-features = false, git = 'https://github.com/CESSProject/substrate', branch = "cess-polkadot-v0.9.42", optional = true} +#local dependencies +cp-cess-common = { path = '../../primitives/common', default-features = false } + [dev-dependencies] sp-core = {version = '7.0.0', git = 'https://github.com/CESSProject/substrate', default-features = false, branch = "cess-polkadot-v0.9.42"} pallet-balances = { version = "4.0.0-dev", git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } diff --git a/c-pallets/scheduler-credit/Cargo.toml b/c-pallets/scheduler-credit/Cargo.toml index 00958b9d..13bf92ea 100644 --- a/c-pallets/scheduler-credit/Cargo.toml +++ b/c-pallets/scheduler-credit/Cargo.toml @@ -14,7 +14,8 @@ sp-runtime = { version = "7.0.0", default-features = false, git = "https://githu frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } -cp-scheduler-credit = { version = "0.1.0", default-features = false, path = '../../primitives/scheduler-credit' } +#lock dependencies +cp-scheduler-credit = { default-features = false, path = '../../primitives/scheduler-credit' } [dev-dependencies] sp-io = { version = "7.0.0", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } diff --git a/c-pallets/sminer-reward/src/lib.rs b/c-pallets/sminer-reward/src/lib.rs index 92bae8a3..3eb5b6cc 100644 --- a/c-pallets/sminer-reward/src/lib.rs +++ b/c-pallets/sminer-reward/src/lib.rs @@ -6,8 +6,6 @@ use frame_support::{ dispatch::{DispatchResult}, pallet_prelude::{StorageValue, ValueQuery}, }; -use codec::{Decode, Encode}; -use scale_info::TypeInfo; // use sp_std::prelude::*; use sp_runtime::{ SaturatedConversion, diff --git a/c-pallets/sminer/Cargo.toml b/c-pallets/sminer/Cargo.toml index 3bb1659d..ab1ca193 100644 --- a/c-pallets/sminer/Cargo.toml +++ b/c-pallets/sminer/Cargo.toml @@ -16,16 +16,17 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { default-features = false, features = ['derive'], version = "2.0.1" } rand_chacha = { version = "0.2", default-features = false, optional = true } -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } pallet-preimage = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/CESSProject/substrate', branch = "cess-polkadot-v0.9.42" } -cp-enclave-verify = { path = '../../primitives/enclave-verify', version = '0.1.0', default-features = false } -cp-bloom-filter = { path = '../../primitives/bloom-filter', version = '0.1.0', default-features = false } -pallet-cess-staking = { path = '../staking', version = '4.0.0-dev', default-features = false } + #local crate -pallet-tee-worker = { default-features = false, path = '../tee-worker', version = '0.7.0' } -pallet-storage-handler = { default-features = false, path = '../storage-handler', version = '0.7.0' } -pallet-sminer-reward = { default-features = false, path = "../sminer-reward", version = "0.7.4" } +pallet-tee-worker = { default-features = false, path = '../tee-worker' } +pallet-storage-handler = { default-features = false, path = '../storage-handler' } +pallet-sminer-reward = { default-features = false, path = "../sminer-reward" } +pallet-cess-staking = { default-features = false, path = '../staking' } +cp-enclave-verify = { path = '../../primitives/enclave-verify', default-features = false } +cp-bloom-filter = { path = '../../primitives/bloom-filter', default-features = false } +cp-cess-common = { path = '../../primitives/common', default-features = false } [dependencies.frame-benchmarking] default-features = false diff --git a/c-pallets/sminer/src/lib.rs b/c-pallets/sminer/src/lib.rs index 9e3fbab2..4dc0c4dd 100644 --- a/c-pallets/sminer/src/lib.rs +++ b/c-pallets/sminer/src/lib.rs @@ -638,6 +638,7 @@ pub mod pallet { /// /// Parameters: /// - `acc`: Withdraw money account. + /// FOR TEST #[pallet::call_index(14)] #[transactional] #[pallet::weight(35_000_000)] @@ -717,7 +718,7 @@ pub mod pallet { // FOR TESTING #[pallet::call_index(15)] #[transactional] - #[pallet::weight(100_000)] + #[pallet::weight(Weight::zero())] pub fn update_expender( origin: OriginFor, k: u64, diff --git a/c-pallets/storage-handler/Cargo.toml b/c-pallets/storage-handler/Cargo.toml index ca676445..5cca59d0 100644 --- a/c-pallets/storage-handler/Cargo.toml +++ b/c-pallets/storage-handler/Cargo.toml @@ -23,8 +23,8 @@ sp-runtime = { version = "7.0.0", git = 'https://github.com/CESSProject/substrat frame-benchmarking = { version = '4.0.0-dev', git = 'https://github.com/CESSProject/substrate', branch = "cess-polkadot-v0.9.42", default-features = false } # local dependencies -cp-cess-common = { version = '0.1.0', path = '../../primitives/common', default-features = false } -pallet-sminer-reward = { default-features = false, path = "../sminer-reward", version = "0.7.4" } +cp-cess-common = { path = '../../primitives/common', default-features = false } +pallet-sminer-reward = { default-features = false, path = "../sminer-reward" } [features] default = ["std"] diff --git a/c-pallets/storage-handler/src/lib.rs b/c-pallets/storage-handler/src/lib.rs index 2dbcb1a3..75d65862 100644 --- a/c-pallets/storage-handler/src/lib.rs +++ b/c-pallets/storage-handler/src/lib.rs @@ -333,10 +333,10 @@ pub mod pallet { }); Ok(()) } - + // FOR TEST #[pallet::call_index(4)] #[transactional] - #[pallet::weight(100_000_000)] + #[pallet::weight(Weight::zero())] pub fn update_price(origin: OriginFor) -> DispatchResult { let _ = ensure_root(origin)?; let default_price: BalanceOf = 30u32.saturated_into(); @@ -344,10 +344,10 @@ pub mod pallet { Ok(()) } - + // FOR TEST #[pallet::call_index(5)] #[transactional] - #[pallet::weight(100_000_000)] + #[pallet::weight(Weight::zero())] pub fn update_user_life(origin: OriginFor, user: AccountOf, deadline: BlockNumberOf) -> DispatchResult { let _ = ensure_root(origin)?; diff --git a/c-pallets/tee-worker/Cargo.toml b/c-pallets/tee-worker/Cargo.toml index d7c4e68e..e96de692 100644 --- a/c-pallets/tee-worker/Cargo.toml +++ b/c-pallets/tee-worker/Cargo.toml @@ -14,11 +14,13 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { default-features = false, features = ['derive'], version = "2.0.1" } serde_json = { version = '1.0.67', default-features = false, features = ['alloc'] } log = { version = "0.4.14", default-features = false } -cp-cess-common = { path = '../../primitives/common', version = '0.1.0', default-features = false } -cp-scheduler-credit = { path = '../../primitives/scheduler-credit', version = '0.1.0', default-features = false } -cp-enclave-verify = { path = '../../primitives/enclave-verify', version = '0.1.0', default-features = false } sp-io = { version = "7.0.0", default-features = false, branch = 'cess-polkadot-v0.9.42', git = 'https://github.com/CESSProject/substrate' } +# local dependencies +cp-cess-common = { path = '../../primitives/common', default-features = false } +cp-scheduler-credit = { path = '../../primitives/scheduler-credit', default-features = false } +cp-enclave-verify = { path = '../../primitives/enclave-verify', default-features = false } + [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/CESSProject/substrate' diff --git a/c-pallets/tee-worker/src/lib.rs b/c-pallets/tee-worker/src/lib.rs index ca6d3a55..0dc41d1d 100644 --- a/c-pallets/tee-worker/src/lib.rs +++ b/c-pallets/tee-worker/src/lib.rs @@ -176,7 +176,7 @@ pub mod pallet { #[pallet::call_index(1)] #[transactional] - #[pallet::weight(100_000_000)] + #[pallet::weight(Weight::zero())] pub fn update_whitelist(origin: OriginFor, mr_enclave: [u8; 64]) -> DispatchResult { let _ = ensure_root(origin)?; >::mutate(|list| -> DispatchResult { @@ -207,7 +207,7 @@ pub mod pallet { // FOR TESTING #[pallet::call_index(3)] #[transactional] - #[pallet::weight(100_000_000)] + #[pallet::weight(Weight::zero())] pub fn update_podr2_pk(origin: OriginFor, podr2_pbk: Podr2Key) -> DispatchResult { let _sender = ensure_root(origin)?; diff --git a/node/Cargo.toml b/node/Cargo.toml index 219df3cb..930e30a8 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -6,7 +6,7 @@ edition = '2021' license = 'Unlicense' name = 'cess-node' repository = 'https://github.com/CESSProject/cess' -version = '0.7.0' +version = '0.7.4' [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 523b345b..c645f6ec 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "Unlicense" name = "cess-node-runtime" repository = "https://github.com/CESSProject/cess" -version = "0.7.0" +version = "0.7.4" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -106,17 +106,17 @@ pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } pallet-asset-tx-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/CESSProject/substrate", branch = "cess-polkadot-v0.9.42" } -cp-scheduler-credit = { default-features = false, version = "0.1.0", path = "../primitives/scheduler-credit" } -pallet-scheduler-credit = { default-features = false, version = "0.1.0", path = "../c-pallets/scheduler-credit" } +cp-scheduler-credit = { default-features = false, path = "../primitives/scheduler-credit" } +pallet-scheduler-credit = { default-features = false, path = "../c-pallets/scheduler-credit" } # local dependencies -pallet-sminer = { default-features = false, path = "../c-pallets/sminer", version = "0.7.0" } -pallet-sminer-reward = { default-features = false, path = "../c-pallets/sminer-reward", version = "0.7.4" } -pallet-audit = { default-features = false, path = "../c-pallets/audit", version = "0.7.0" } -pallet-file-bank = { default-features = false, path = "../c-pallets/file-bank", version = "0.7.0" } -pallet-tee-worker = { default-features = false, path = "../c-pallets/tee-worker", version = "0.7.0" } -pallet-storage-handler = { default-features = false, path = "../c-pallets/storage-handler", version = "0.7.0" } -pallet-oss = { default-features = false, path = "../c-pallets/oss", version = "0.7.0" } +pallet-sminer = { default-features = false, path = "../c-pallets/sminer" } +pallet-sminer-reward = { default-features = false, path = "../c-pallets/sminer-reward" } +pallet-audit = { default-features = false, path = "../c-pallets/audit" } +pallet-file-bank = { default-features = false, path = "../c-pallets/file-bank" } +pallet-tee-worker = { default-features = false, path = "../c-pallets/tee-worker" } +pallet-storage-handler = { default-features = false, path = "../c-pallets/storage-handler" } +pallet-oss = { default-features = false, path = "../c-pallets/oss" } # Frontier fp-account = { git = "https://github.com/CESSProject/frontier", branch = "cess-polkadot-v0.9.42", default-features = false } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 3fa20846..a4d3da9b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -168,7 +168,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 105, + spec_version: 103, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -1606,7 +1606,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - // (), + (), // TestMigrationFileBank, // MigrationSegmentBook, >;