difftreelog
feat set state trie migration origin
in: master
4 files changed
runtime/common/config/substrate.rsdiffbeforeafterboth21 ConstantMultiplier,21 ConstantMultiplier,22 },22 },23 dispatch::DispatchClass,23 dispatch::DispatchClass,24 parameter_types, PalletId,24 parameter_types, ord_parameter_types, PalletId,25};25};26use sp_runtime::{26use sp_runtime::{27 generic,27 generic,31use sp_arithmetic::traits::One;31use sp_arithmetic::traits::One;32use frame_system::{32use frame_system::{33 limits::{BlockLength, BlockWeights},33 limits::{BlockLength, BlockWeights},34 EnsureRoot, EnsureNever,34 EnsureRoot, EnsureSignedBy,35};35};36use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier};36use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier};37use crate::{37use crate::{38 runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,38 runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,39 System, Balances, SS58Prefix, Version,39 System, Balances, SS58Prefix, Version,40};40};41use up_common::{types::*, constants::*};41use up_common::{types::*, constants::*};42use sp_std::vec;424343parameter_types! {44parameter_types! {44 pub const BlockHashCount: BlockNumber = 2400;45 pub const BlockHashCount: BlockNumber = 2400;118parameter_types! {119parameter_types! {119 pub const MigrationMaxKeyLen: u32 = 512;120 pub const MigrationMaxKeyLen: u32 = 512;120}121}122ord_parameter_types! {123 pub const TrieMigrationSigned: AccountId = AccountId::from(hex_literal::hex!("3e2ee9b68b52c239488e8abbeb31284c0d4342ec7c3b53f8e50855051d54a319"));124}121125122impl pallet_state_trie_migration::Config for Runtime {126impl pallet_state_trie_migration::Config for Runtime {123 type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight<Self>;127 type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight<Self>;127 type SignedDepositBase = ();131 type SignedDepositBase = ();128 type ControlOrigin = EnsureRoot<AccountId>;132 type ControlOrigin = EnsureRoot<AccountId>;129 // Only root can perform this migration133 // Only root can perform this migration130 type SignedFilter = EnsureNever<AccountId>;134 type SignedFilter = EnsureSignedBy<TrieMigrationSigned, AccountId>;131 type MaxKeyLen = MigrationMaxKeyLen;135 type MaxKeyLen = MigrationMaxKeyLen;132}136}133137runtime/opal/Cargo.tomldiffbeforeafterboth28 'frame-support/runtime-benchmarks',28 'frame-support/runtime-benchmarks',29 'frame-system-benchmarking',29 'frame-system-benchmarking',30 'frame-system/runtime-benchmarks',30 'frame-system/runtime-benchmarks',31 'hex-literal',32 'pallet-app-promotion/runtime-benchmarks',31 'pallet-app-promotion/runtime-benchmarks',33 'pallet-balances/runtime-benchmarks',32 'pallet-balances/runtime-benchmarks',34 'pallet-collator-selection/runtime-benchmarks',33 'pallet-collator-selection/runtime-benchmarks',301frame-benchmarking = { workspace = true, optional = true }300frame-benchmarking = { workspace = true, optional = true }302frame-system-benchmarking = { workspace = true, optional = true }301frame-system-benchmarking = { workspace = true, optional = true }303frame-try-runtime = { workspace = true, optional = true }302frame-try-runtime = { workspace = true, optional = true }304hex-literal = { workspace = true, optional = true }305serde = { workspace = true, optional = true }303serde = { workspace = true, optional = true }306304307################################################################################305################################################################################313# Other Dependencies311# Other Dependencies314312315impl-trait-for-tuples = { workspace = true }313impl-trait-for-tuples = { workspace = true }314hex-literal = { workspace = true }316315317[build-dependencies]316[build-dependencies]318substrate-wasm-builder = { workspace = true }317substrate-wasm-builder = { workspace = true }runtime/quartz/Cargo.tomldiffbeforeafterboth29 'frame-support/runtime-benchmarks',29 'frame-support/runtime-benchmarks',30 'frame-system-benchmarking',30 'frame-system-benchmarking',31 'frame-system/runtime-benchmarks',31 'frame-system/runtime-benchmarks',32 'hex-literal',33 'pallet-app-promotion/runtime-benchmarks',32 'pallet-app-promotion/runtime-benchmarks',34 'pallet-balances/runtime-benchmarks',33 'pallet-balances/runtime-benchmarks',35 'pallet-collator-selection/runtime-benchmarks',34 'pallet-collator-selection/runtime-benchmarks',293frame-benchmarking = { workspace = true, optional = true }292frame-benchmarking = { workspace = true, optional = true }294frame-system-benchmarking = { workspace = true, optional = true }293frame-system-benchmarking = { workspace = true, optional = true }295frame-try-runtime = { workspace = true, optional = true }294frame-try-runtime = { workspace = true, optional = true }296hex-literal = { workspace = true, optional = true }297serde = { workspace = true, optional = true }295serde = { workspace = true, optional = true }298296299297306# Other Dependencies304# Other Dependencies307305308impl-trait-for-tuples = { workspace = true }306impl-trait-for-tuples = { workspace = true }307hex-literal = { workspace = true }309308310[build-dependencies]309[build-dependencies]311substrate-wasm-builder = { workspace = true }310substrate-wasm-builder = { workspace = true }runtime/unique/Cargo.tomldiffbeforeafterboth26 'frame-support/runtime-benchmarks',26 'frame-support/runtime-benchmarks',27 'frame-system-benchmarking',27 'frame-system-benchmarking',28 'frame-system/runtime-benchmarks',28 'frame-system/runtime-benchmarks',29 'hex-literal',30 'pallet-app-promotion/runtime-benchmarks',29 'pallet-app-promotion/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',30 'pallet-balances/runtime-benchmarks',32 'pallet-collator-selection/runtime-benchmarks',31 'pallet-collator-selection/runtime-benchmarks',292frame-benchmarking = { workspace = true, optional = true }291frame-benchmarking = { workspace = true, optional = true }293frame-system-benchmarking = { workspace = true, optional = true }292frame-system-benchmarking = { workspace = true, optional = true }294frame-try-runtime = { workspace = true, optional = true }293frame-try-runtime = { workspace = true, optional = true }295hex-literal = { workspace = true, optional = true }296serde = { workspace = true, optional = true }294serde = { workspace = true, optional = true }297295298################################################################################296################################################################################304# Other Dependencies302# Other Dependencies305303306impl-trait-for-tuples = { workspace = true }304impl-trait-for-tuples = { workspace = true }305hex-literal = { workspace = true }307306308[build-dependencies]307[build-dependencies]309substrate-wasm-builder = { workspace = true }308substrate-wasm-builder = { workspace = true }