From da019ede67b9b011eba3e6978ccd984e4fa2d086 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Sep 2021 18:57:02 +0200 Subject: [PATCH] remove deprecated shuffling seed storage & runtime api --- node/src/chain_spec.rs | 12 +++--------- runtime/Cargo.toml | 1 - runtime/src/lib.rs | 9 --------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 94f81577cb..f7ab8cfcfc 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -3,9 +3,9 @@ use hex_literal::hex; use mangata_runtime::{ AccountId, AssetsInfoConfig, BabeConfig, BridgeConfig, BridgedAssetConfig, CouncilConfig, - ElectionsConfig, GenesisConfig, GrandpaConfig, RandomConfig, SessionConfig, SessionKeys, - Signature, StakerStatus, StakingConfig, SudoConfig, SystemConfig, TokensConfig, VerifierConfig, - XykConfig, WASM_BINARY, + ElectionsConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature, + StakerStatus, StakingConfig, SudoConfig, SystemConfig, TokensConfig, VerifierConfig, XykConfig, + WASM_BINARY, }; use sc_service::ChainType; use sp_consensus_babe::AuthorityId as BabeId; @@ -159,7 +159,6 @@ pub fn development_config() -> Result { 10_000__000_000_000_000_000_000u128, )], true, - [0_u8; 32], ) }, // Bootnodes @@ -277,7 +276,6 @@ pub fn local_testnet_config() -> Result { 10_000__000_000_000_000_000_000u128, )], true, - [0_u8; 32], ) }, // Bootnodes @@ -306,7 +304,6 @@ fn testnet_genesis( tokens_endowment: Vec<(u32, u128, AccountId)>, staking_accounts: Vec<(AccountId, u32, u128, u32, u128, u32, u128)>, _enable_println: bool, - init_seed: [u8; 32], ) -> GenesisConfig { GenesisConfig { frame_system: Some(SystemConfig { @@ -443,9 +440,6 @@ fn testnet_genesis( }) .collect(), }), - pallet_random_seed: Some(RandomConfig { - random_seed: init_seed, - }), pallet_treasury: Some(Default::default()), pallet_collective_Instance1: Some(CouncilConfig::default()), pallet_elections_phragmen: Some(ElectionsConfig { diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 18fae699a1..73f1ed3181 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -28,7 +28,6 @@ static_assertions = "1.1.0" pallet-encrypted-tx = { path = '../pallets/encrypted-tx', default-features = false, version = '0.1.0' } pallet-xyk = { path = '../pallets/xyk', default-features = false, version = '0.1.0' } xyk-runtime-api = { path = '../pallets/xyk/runtime-api', default-features = false, version = '2.0.0' } -random-seed-runtime-api = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } extrinsic-info-runtime-api = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } frame-executive = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } pallet-timestamp = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 77e42f9473..b68616bebf 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -640,8 +640,6 @@ impl pallet_sudo_origin::Trait for Runtime { pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; } -impl pallet_random_seed::Trait for Runtime {} - // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime where @@ -652,7 +650,6 @@ construct_runtime!( System: frame_system::{Module, Call, Config, Storage, Event}, RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Random: pallet_random_seed::{Module, Call, Storage, Inherent, Config}, Session: pallet_session::{Module, Call, Storage, Event, Config}, Authorship: pallet_authorship::{Module, Call, Storage, Inherent}, Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned}, @@ -949,12 +946,6 @@ impl_runtime_apis! { } } - impl random_seed_runtime_api::RandomSeedApi for Runtime { - fn get_seed() -> pallet_random_seed::SeedType{ - Random::seed() - } - } - #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn dispatch_benchmark(