Skip to content

Commit

Permalink
Deprecate Weight::from_proof_size with from_parts
Browse files Browse the repository at this point in the history
  • Loading branch information
NunoAlexandre committed Oct 5, 2023
1 parent bf5205d commit 0210269
Show file tree
Hide file tree
Showing 40 changed files with 154 additions and 154 deletions.
2 changes: 1 addition & 1 deletion pallets/liquidity-pools-gateway/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}
}
12 changes: 6 additions & 6 deletions pallets/liquidity-pools/src/defensive_weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}

fn add_pool() -> Weight {
Expand All @@ -46,7 +46,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}

fn add_tranche() -> Weight {
Expand All @@ -57,7 +57,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}

fn update_token_price() -> Weight {
Expand All @@ -68,7 +68,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}

fn update_member() -> Weight {
Expand All @@ -79,7 +79,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}

fn transfer() -> Weight {
Expand All @@ -90,6 +90,6 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(N)))
.saturating_add(RocksDbWeight::get().writes(8))
.saturating_add(RocksDbWeight::get().writes((6_u64).saturating_mul(N)))
.saturating_add(Weight::from_proof_size(17774).saturating_mul(N))
.saturating_add(Weight::from_parts(0, 17774).saturating_mul(N))
}
}
2 changes: 1 addition & 1 deletion runtime/altair/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
// Standard Error: 1_225
.saturating_add(Weight::from_parts(1_283_115, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(70).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
}
8 changes: 4 additions & 4 deletions runtime/altair/src/weights/pallet_collator_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(Weight::from_parts(5_788_548, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(5127).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 5127).saturating_mul(b.into()))
}
/// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
/// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Expand Down Expand Up @@ -95,7 +95,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(Weight::from_parts(129_374, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_proof_size(53).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
}
/// Storage: CollatorSelection Candidates (r:1 w:1)
/// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(4802), added: 5297, mode: MaxEncodedLen)
Expand Down Expand Up @@ -152,7 +152,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(2521).saturating_mul(c.into()))
.saturating_add(Weight::from_proof_size(2597).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2521).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(r.into()))
}
}
36 changes: 18 additions & 18 deletions runtime/altair/src/weights/pallet_collective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(7809).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(10238).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 7809).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 10238).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
Expand All @@ -74,7 +74,7 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
// Standard Error: 424
.saturating_add(Weight::from_parts(24_570, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(Weight::from_proof_size(32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
Expand All @@ -93,7 +93,7 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
// Standard Error: 701
.saturating_add(Weight::from_parts(31_532, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(Weight::from_proof_size(64).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
Expand Down Expand Up @@ -122,8 +122,8 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(201_986, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_proof_size(165).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
Expand All @@ -140,7 +140,7 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(42_587, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(128).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
Expand All @@ -164,8 +164,8 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(187_910, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(260).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
Expand All @@ -192,9 +192,9 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(234_963, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(4).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(264).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(160).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
Expand All @@ -220,8 +220,8 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(192_888, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(325).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
Expand Down Expand Up @@ -250,9 +250,9 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(233_267, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(5).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(330).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(200).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into()))
}
/// Storage: Council Proposals (r:1 w:1)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
Expand All @@ -271,6 +271,6 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(195_589, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(96).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into()))
}
}
8 changes: 4 additions & 4 deletions runtime/altair/src/weights/pallet_democracy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy LowestUnbaked (r:1 w:1)
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Expand All @@ -253,7 +253,7 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:3 w:3)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
Expand All @@ -274,7 +274,7 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:2 w:2)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
Expand All @@ -293,7 +293,7 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy PublicProps (r:0 w:1)
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
Expand Down
2 changes: 1 addition & 1 deletion runtime/altair/src/weights/pallet_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(2589).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
}
/// Storage: Identity IdentityOf (r:1 w:0)
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
Expand Down
4 changes: 2 additions & 2 deletions runtime/altair/src/weights/pallet_keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl<T: frame_system::Config> pallet_keystore::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2595).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into()))
}
/// Storage: Keystore Keys (r:10 w:10)
/// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen)
Expand All @@ -67,7 +67,7 @@ impl<T: frame_system::Config> pallet_keystore::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(12_387_370, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2595).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into()))
}
/// Storage: Keystore KeyDeposit (r:0 w:1)
/// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
Expand Down
2 changes: 1 addition & 1 deletion runtime/altair/src/weights/pallet_migration_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<T: frame_system::Config> pallet_migration_manager::WeightInfo for WeightInf
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(9909).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 9909).saturating_mul(n.into()))
}
/// Storage: Migration Status (r:1 w:1)
/// Proof: Migration Status (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
Expand Down
8 changes: 4 additions & 4 deletions runtime/altair/src/weights/pallet_pool_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<T: frame_system::Config> pallet_pool_registry::WeightInfo for WeightInfo<T>
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(7))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2475).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2475).saturating_mul(n.into()))
}
/// Storage: Permissions Permission (r:1 w:0)
/// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen)
Expand All @@ -88,7 +88,7 @@ impl<T: frame_system::Config> pallet_pool_registry::WeightInfo for WeightInfo<T>
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(2531).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into()))
}
/// Storage: Permissions Permission (r:1 w:0)
/// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen)
Expand Down Expand Up @@ -116,7 +116,7 @@ impl<T: frame_system::Config> pallet_pool_registry::WeightInfo for WeightInfo<T>
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(2699).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2699).saturating_mul(n.into()))
}
/// Storage: PoolSystem Pool (r:1 w:1)
/// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen)
Expand All @@ -142,7 +142,7 @@ impl<T: frame_system::Config> pallet_pool_registry::WeightInfo for WeightInfo<T>
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_proof_size(2725).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2725).saturating_mul(n.into()))
}
/// Storage: Permissions Permission (r:1 w:0)
/// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen)
Expand Down
Loading

0 comments on commit 0210269

Please sign in to comment.