--- 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; @@ -127,7 +131,7 @@ type SignedDepositBase = (); type ControlOrigin = EnsureRoot; // Only root can perform this migration - type SignedFilter = EnsureNever; + type SignedFilter = EnsureSignedBy; type MaxKeyLen = MigrationMaxKeyLen; } --- 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 } --- 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 } --- 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 }