Skip to content

Commit d3914e4

Browse files
Increase Capacity Batch limit from 2 -> 10 (#1633)
# Goal The goal of this PR is to increase the limit on capacity batches from 2 -> 10 Closes #1628 # Discussion Why? 2 was set originally to be initially careful with how many were allowed. With additional testing, it is clear there is no reason to not increase to at least 10. In think in the end we'll be able to increase to higher, but going slow. # Checklist - [x] Weights updated --------- Co-authored-by: Frequency CI [bot] <[email protected]>
1 parent 72fb3b2 commit d3914e4

File tree

5 files changed

+28
-20
lines changed

5 files changed

+28
-20
lines changed

pallets/frequency-tx-payment/src/tests/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl pallet_balances::Config for Test {
103103
}
104104

105105
pub type MaxSchemaGrantsPerDelegation = ConstU32<30>;
106-
pub type MaximumCapacityBatchLength = ConstU8<2>;
106+
pub type MaximumCapacityBatchLength = ConstU8<10>;
107107

108108
pub struct TestAccountId;
109109
impl Convert<u64, AccountId> for TestAccountId {

pallets/frequency-tx-payment/src/tests/pallet_tests.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,14 @@ fn pay_with_capacity_batch_all_errors_when_transaction_amount_exceeds_maximum()
751751
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
752752
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
753753
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
754+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
755+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
756+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
757+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
758+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
759+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
760+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
761+
RuntimeCall::Balances(BalancesCall::transfer { dest: 2, value: 100 }),
754762
];
755763
assert_noop!(
756764
FrequencyTxPayment::pay_with_capacity_batch_all(

pallets/frequency-tx-payment/src/weights.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
//! Autogenerated weights for pallet_frequency_tx_payment
1919
//!
2020
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21-
//! DATE: 2023-07-07, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21+
//! DATE: 2023-07-11, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
2222
//! WORST CASE MAP SIZE: `1000000`
23-
//! HOSTNAME: `benchmark-runner-qpqf8-fp5d5`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23+
//! HOSTNAME: `benchmark-runner-qpqf8-kk7dv`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
2424
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024
2525
2626
// Executed Command:
@@ -61,18 +61,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
6161
// Proof Size summary in bytes:
6262
// Measured: `0`
6363
// Estimated: `0`
64-
// Minimum execution time: 3_613_000 picoseconds.
65-
Weight::from_parts(3_860_000, 0)
64+
// Minimum execution time: 3_452_000 picoseconds.
65+
Weight::from_parts(3_702_000, 0)
6666
}
67-
/// The range of component `n` is `[0, 2]`.
67+
/// The range of component `n` is `[0, 10]`.
6868
fn pay_with_capacity_batch_all(n: u32, ) -> Weight {
6969
// Proof Size summary in bytes:
7070
// Measured: `0`
7171
// Estimated: `0`
72-
// Minimum execution time: 7_348_000 picoseconds.
73-
Weight::from_parts(7_847_302, 0)
74-
// Standard Error: 38_669
75-
.saturating_add(Weight::from_parts(5_599_192, 0).saturating_mul(n.into()))
72+
// Minimum execution time: 7_291_000 picoseconds.
73+
Weight::from_parts(8_383_841, 0)
74+
// Standard Error: 11_802
75+
.saturating_add(Weight::from_parts(4_916_922, 0).saturating_mul(n.into()))
7676
}
7777
}
7878

@@ -82,17 +82,17 @@ impl WeightInfo for () {
8282
// Proof Size summary in bytes:
8383
// Measured: `0`
8484
// Estimated: `0`
85-
// Minimum execution time: 3_613_000 picoseconds.
86-
Weight::from_parts(3_860_000, 0)
85+
// Minimum execution time: 3_452_000 picoseconds.
86+
Weight::from_parts(3_702_000, 0)
8787
}
88-
/// The range of component `n` is `[0, 2]`.
88+
/// The range of component `n` is `[0, 10]`.
8989
fn pay_with_capacity_batch_all(n: u32, ) -> Weight {
9090
// Proof Size summary in bytes:
9191
// Measured: `0`
9292
// Estimated: `0`
93-
// Minimum execution time: 7_348_000 picoseconds.
94-
Weight::from_parts(7_847_302, 0)
95-
// Standard Error: 38_669
96-
.saturating_add(Weight::from_parts(5_599_192, 0).saturating_mul(n.into()))
93+
// Minimum execution time: 7_291_000 picoseconds.
94+
Weight::from_parts(8_383_841, 0)
95+
// Standard Error: 11_802
96+
.saturating_add(Weight::from_parts(4_916_922, 0).saturating_mul(n.into()))
9797
}
9898
}

runtime/common/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub type TransactionByteFee = ConstU128<{ 10 * currency::MILLICENTS }>;
225225
// -end- Transaction Payment Pallet ---
226226

227227
// --- Frequency Transaction Payment Pallet ---
228-
pub type MaximumCapacityBatchLength = ConstU8<2>;
228+
pub type MaximumCapacityBatchLength = ConstU8<10>;
229229
// -end- Frequency Transaction Payment Pallet ---
230230

231231
// --- Session Pallet ---

runtime/frequency/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
249249
spec_name: create_runtime_str!("frequency"),
250250
impl_name: create_runtime_str!("frequency"),
251251
authoring_version: 1,
252-
spec_version: 43,
252+
spec_version: 44,
253253
impl_version: 0,
254254
apis: RUNTIME_API_VERSIONS,
255255
transaction_version: 1,
@@ -263,7 +263,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
263263
spec_name: create_runtime_str!("frequency-rococo"),
264264
impl_name: create_runtime_str!("frequency"),
265265
authoring_version: 1,
266-
spec_version: 43,
266+
spec_version: 44,
267267
impl_version: 0,
268268
apis: RUNTIME_API_VERSIONS,
269269
transaction_version: 1,

0 commit comments

Comments
 (0)