@@ -1097,19 +1097,6 @@ parameter_types! {
10971097 pub const MigrationMaxKeyLen : u32 = 512 ;
10981098}
10991099
1100- impl pallet_state_trie_migration:: Config for Runtime {
1101- type RuntimeEvent = RuntimeEvent ;
1102- type Currency = Balances ;
1103- type SignedDepositPerItem = MigrationSignedDepositPerItem ;
1104- type SignedDepositBase = MigrationSignedDepositBase ;
1105- type ControlOrigin = EnsureRoot < AccountId > ;
1106- type SignedFilter = frame_support:: traits:: NeverEnsureOrigin < AccountId > ;
1107-
1108- // Use same weights as substrate ones.
1109- type WeightInfo = pallet_state_trie_migration:: weights:: SubstrateWeight < Runtime > ;
1110- type MaxKeyLen = MigrationMaxKeyLen ;
1111- }
1112-
11131100construct_runtime ! {
11141101 pub enum Runtime where
11151102 Block = Block ,
@@ -1178,9 +1165,6 @@ construct_runtime! {
11781165 // Fast unstake pallet: extension to staking.
11791166 FastUnstake : pallet_fast_unstake = 30 ,
11801167
1181- // State trie migration pallet, only temporary.
1182- StateTrieMigration : pallet_state_trie_migration = 35 ,
1183-
11841168 // Parachains pallets. Start indices at 40 to leave room.
11851169 ParachainsOrigin : parachains_origin:: { Pallet , Origin } = 41 ,
11861170 Configuration : parachains_configuration:: { Pallet , Call , Storage , Config <T >} = 42 ,
@@ -1243,7 +1227,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet {
12431227///
12441228/// Should be cleared after every release.
12451229pub type Migrations = (
1246- init_state_migration:: InitMigrate ,
12471230 // "Use 2D weights in XCM v3" <https://github.com/paritytech/polkadot/pull/6134>
12481231 pallet_xcm:: migration:: v1:: MigrateToV1 < Runtime > ,
12491232 parachains_ump:: migration:: v1:: MigrateToV1 < Runtime > ,
@@ -1907,46 +1890,3 @@ mod remote_tests {
19071890 ext. execute_with ( || Runtime :: on_runtime_upgrade ( UpgradeCheckSelect :: PreAndPost ) ) ;
19081891 }
19091892}
1910-
1911- mod init_state_migration {
1912- use super :: Runtime ;
1913- use frame_support:: traits:: OnRuntimeUpgrade ;
1914- use pallet_state_trie_migration:: { AutoLimits , MigrationLimits , MigrationProcess } ;
1915- #[ cfg( not( feature = "std" ) ) ]
1916- use sp_std:: prelude:: * ;
1917-
1918- /// Initialize an automatic migration process.
1919- pub struct InitMigrate ;
1920- impl OnRuntimeUpgrade for InitMigrate {
1921- #[ cfg( feature = "try-runtime" ) ]
1922- fn pre_upgrade ( ) -> Result < Vec < u8 > , & ' static str > {
1923- frame_support:: ensure!(
1924- AutoLimits :: <Runtime >:: get( ) . is_none( ) ,
1925- "Automigration already started."
1926- ) ;
1927- Ok ( Default :: default ( ) )
1928- }
1929-
1930- fn on_runtime_upgrade ( ) -> frame_support:: weights:: Weight {
1931- if MigrationProcess :: < Runtime > :: get ( ) == Default :: default ( ) &&
1932- AutoLimits :: < Runtime > :: get ( ) . is_none ( )
1933- {
1934- AutoLimits :: < Runtime > :: put ( Some ( MigrationLimits { item : 160 , size : 204800 } ) ) ;
1935- log:: info!( "Automatic trie migration started." ) ;
1936- <Runtime as frame_system:: Config >:: DbWeight :: get ( ) . reads_writes ( 2 , 1 )
1937- } else {
1938- log:: info!( "Automatic trie migration not started." ) ;
1939- <Runtime as frame_system:: Config >:: DbWeight :: get ( ) . reads ( 2 )
1940- }
1941- }
1942-
1943- #[ cfg( feature = "try-runtime" ) ]
1944- fn post_upgrade ( _state : Vec < u8 > ) -> Result < ( ) , & ' static str > {
1945- frame_support:: ensure!(
1946- AutoLimits :: <Runtime >:: get( ) . is_some( ) ,
1947- "Automigration started."
1948- ) ;
1949- Ok ( ( ) )
1950- }
1951- }
1952- }
0 commit comments