Skip to content

Commit 18fba23

Browse files
committed
Implement migration logic for account storage in pallet_indices
1 parent 6fa3408 commit 18fba23

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_indices.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,20 @@ impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
127127
.saturating_add(T::DbWeight::get().reads(1))
128128
.saturating_add(T::DbWeight::get().writes(1))
129129
}
130+
/// Storage: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
131+
/// Proof: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
132+
/// Storage: `Balances::Holds` (r:1 w:1)
133+
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
134+
/// Storage: `Indices::Accounts` (r:0 w:1)
135+
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
136+
fn migrate_account_step() -> Weight {
137+
// Proof Size summary in bytes:
138+
// Measured: `138`
139+
// Estimated: `6078`
140+
// Minimum execution time: 38_131_000 picoseconds.
141+
Weight::from_parts(38_749_000, 0)
142+
.saturating_add(Weight::from_parts(0, 6078))
143+
.saturating_add(T::DbWeight::get().reads(3))
144+
.saturating_add(T::DbWeight::get().writes(2))
145+
}
130146
}

polkadot/runtime/rococo/src/weights/pallet_indices.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,20 @@ impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
127127
.saturating_add(T::DbWeight::get().reads(1))
128128
.saturating_add(T::DbWeight::get().writes(1))
129129
}
130+
/// Storage: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
131+
/// Proof: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
132+
/// Storage: `Balances::Holds` (r:1 w:1)
133+
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
134+
/// Storage: `Indices::Accounts` (r:0 w:1)
135+
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
136+
fn migrate_account_step() -> Weight {
137+
// Proof Size summary in bytes:
138+
// Measured: `138`
139+
// Estimated: `6078`
140+
// Minimum execution time: 38_131_000 picoseconds.
141+
Weight::from_parts(38_749_000, 0)
142+
.saturating_add(Weight::from_parts(0, 6078))
143+
.saturating_add(T::DbWeight::get().reads(3))
144+
.saturating_add(T::DbWeight::get().writes(2))
145+
}
130146
}

polkadot/runtime/westend/src/weights/pallet_indices.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,20 @@ impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
127127
.saturating_add(T::DbWeight::get().reads(1))
128128
.saturating_add(T::DbWeight::get().writes(1))
129129
}
130+
/// Storage: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
131+
/// Proof: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
132+
/// Storage: `Balances::Holds` (r:1 w:1)
133+
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
134+
/// Storage: `Indices::Accounts` (r:0 w:1)
135+
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
136+
fn migrate_account_step() -> Weight {
137+
// Proof Size summary in bytes:
138+
// Measured: `138`
139+
// Estimated: `6078`
140+
// Minimum execution time: 38_131_000 picoseconds.
141+
Weight::from_parts(38_749_000, 0)
142+
.saturating_add(Weight::from_parts(0, 6078))
143+
.saturating_add(T::DbWeight::get().reads(3))
144+
.saturating_add(T::DbWeight::get().writes(2))
145+
}
130146
}

substrate/frame/staking-async/runtimes/rc/src/weights/pallet_indices.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,20 @@ impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
131131
.saturating_add(T::DbWeight::get().reads(1))
132132
.saturating_add(T::DbWeight::get().writes(1))
133133
}
134+
/// Storage: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
135+
/// Proof: UNKNOWN KEY `0x1a736d37504c2e3fb73dad160c55b2915c858e3f3bd0a1a1c78c656baa95f5b5` (r:2 w:0)
136+
/// Storage: `Balances::Holds` (r:1 w:1)
137+
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
138+
/// Storage: `Indices::Accounts` (r:0 w:1)
139+
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
140+
fn migrate_account_step() -> Weight {
141+
// Proof Size summary in bytes:
142+
// Measured: `138`
143+
// Estimated: `6078`
144+
// Minimum execution time: 38_131_000 picoseconds.
145+
Weight::from_parts(38_749_000, 0)
146+
.saturating_add(Weight::from_parts(0, 6078))
147+
.saturating_add(T::DbWeight::get().reads(3))
148+
.saturating_add(T::DbWeight::get().writes(2))
149+
}
134150
}

0 commit comments

Comments
 (0)