difftreelog
feat set state trie migration origin
in: master
4 files changed
runtime/common/config/substrate.rsdiffbeforeafterboth--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -21,7 +21,7 @@
ConstantMultiplier,
},
dispatch::DispatchClass,
- parameter_types, PalletId,
+ parameter_types, ord_parameter_types, PalletId,
};
use sp_runtime::{
generic,
@@ -31,7 +31,7 @@
use sp_arithmetic::traits::One;
use frame_system::{
limits::{BlockLength, BlockWeights},
- EnsureRoot, EnsureNever,
+ EnsureRoot, EnsureSignedBy,
};
use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier};
use crate::{
@@ -39,6 +39,7 @@
System, Balances, SS58Prefix, Version,
};
use up_common::{types::*, constants::*};
+use sp_std::vec;
parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
@@ -118,6 +119,9 @@
parameter_types! {
pub const MigrationMaxKeyLen: u32 = 512;
}
+ord_parameter_types! {
+ pub const TrieMigrationSigned: AccountId = AccountId::from(hex_literal::hex!("3e2ee9b68b52c239488e8abbeb31284c0d4342ec7c3b53f8e50855051d54a319"));
+}
impl pallet_state_trie_migration::Config for Runtime {
type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight<Self>;
@@ -127,7 +131,7 @@
type SignedDepositBase = ();
type ControlOrigin = EnsureRoot<AccountId>;
// Only root can perform this migration
- type SignedFilter = EnsureNever<AccountId>;
+ type SignedFilter = EnsureSignedBy<TrieMigrationSigned, AccountId>;
type MaxKeyLen = MigrationMaxKeyLen;
}
runtime/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.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 }