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.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.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 }