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.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -28,7 +28,6 @@
'frame-support/runtime-benchmarks',
'frame-system-benchmarking',
'frame-system/runtime-benchmarks',
- 'hex-literal',
'pallet-app-promotion/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-collator-selection/runtime-benchmarks',
@@ -301,7 +300,6 @@
frame-benchmarking = { workspace = true, optional = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-try-runtime = { workspace = true, optional = true }
-hex-literal = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
################################################################################
@@ -313,6 +311,7 @@
# Other Dependencies
impl-trait-for-tuples = { workspace = true }
+hex-literal = { workspace = true }
[build-dependencies]
substrate-wasm-builder = { workspace = true }
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -29,7 +29,6 @@
'frame-support/runtime-benchmarks',
'frame-system-benchmarking',
'frame-system/runtime-benchmarks',
- 'hex-literal',
'pallet-app-promotion/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-collator-selection/runtime-benchmarks',
@@ -293,7 +292,6 @@
frame-benchmarking = { workspace = true, optional = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-try-runtime = { workspace = true, optional = true }
-hex-literal = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
@@ -306,6 +304,7 @@
# Other Dependencies
impl-trait-for-tuples = { workspace = true }
+hex-literal = { workspace = true }
[build-dependencies]
substrate-wasm-builder = { workspace = true }
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -26,7 +26,6 @@
'frame-support/runtime-benchmarks',
'frame-system-benchmarking',
'frame-system/runtime-benchmarks',
- 'hex-literal',
'pallet-app-promotion/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-collator-selection/runtime-benchmarks',
@@ -292,7 +291,6 @@
frame-benchmarking = { workspace = true, optional = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-try-runtime = { workspace = true, optional = true }
-hex-literal = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
################################################################################
@@ -304,6 +302,7 @@
# Other Dependencies
impl-trait-for-tuples = { workspace = true }
+hex-literal = { workspace = true }
[build-dependencies]
substrate-wasm-builder = { workspace = true }