Skip to content

Optimisations to squeeze more transactions into blocks #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[profile.release]
panic = "unwind"
opt-level = 3
lto = true

[workspace]
members = [
Expand Down Expand Up @@ -125,7 +127,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", t
cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2", default-features = false }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2", default-features = false }
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2", features = ["full-pov-size"] }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-2" }
Expand Down
8 changes: 3 additions & 5 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5);

/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by
/// `Operational` extrinsics.
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(100);

/// Max block weight configuration.
pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
polkadot_primitives::MAX_POV_SIZE as u64,
);
pub const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), 10 * 1024 * 1024 as u64);

#[derive(Clone, TypeInfo, Encode, PartialEq, Eq, Decode, Copy, MaxEncodedLen, Debug)]
pub struct IncrementableU256(U256);
Expand Down
2 changes: 1 addition & 1 deletion runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("muse"),
impl_name: alloc::borrow::Cow::Borrowed("muse"),
authoring_version: 1,
spec_version: 1026,
spec_version: 1029,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
54 changes: 27 additions & 27 deletions runtime/testnet/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-01-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.0.0
//! DATE: 2025-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `blockdeep-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor`
//! HOSTNAME: `versi-developer-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("local-v")`, DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -43,8 +43,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `3581`
// Minimum execution time: 86_550_000 picoseconds.
Weight::from_parts(87_300_000, 0)
// Minimum execution time: 53_211_000 picoseconds.
Weight::from_parts(53_999_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -55,8 +55,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `3581`
// Minimum execution time: 68_930_000 picoseconds.
Weight::from_parts(69_830_000, 0)
// Minimum execution time: 41_900_000 picoseconds.
Weight::from_parts(42_881_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -67,8 +67,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `91`
// Estimated: `3581`
// Minimum execution time: 24_290_000 picoseconds.
Weight::from_parts(25_170_000, 0)
// Minimum execution time: 15_060_000 picoseconds.
Weight::from_parts(15_578_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -79,8 +79,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `91`
// Estimated: `3581`
// Minimum execution time: 36_720_000 picoseconds.
Weight::from_parts(37_700_000, 0)
// Minimum execution time: 22_363_000 picoseconds.
Weight::from_parts(22_945_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -91,8 +91,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `131`
// Estimated: `6172`
// Minimum execution time: 88_300_000 picoseconds.
Weight::from_parts(89_701_000, 0)
// Minimum execution time: 54_871_000 picoseconds.
Weight::from_parts(55_947_000, 0)
.saturating_add(Weight::from_parts(0, 6172))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -103,8 +103,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `3581`
// Minimum execution time: 85_700_000 picoseconds.
Weight::from_parts(86_620_000, 0)
// Minimum execution time: 51_566_000 picoseconds.
Weight::from_parts(52_468_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -115,8 +115,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `91`
// Estimated: `3581`
// Minimum execution time: 29_440_000 picoseconds.
Weight::from_parts(30_210_000, 0)
// Minimum execution time: 18_618_000 picoseconds.
Weight::from_parts(19_086_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -128,11 +128,11 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0 + u * (124 ±0)`
// Estimated: `990 + u * (2591 ±0)`
// Minimum execution time: 29_110_000 picoseconds.
Weight::from_parts(29_580_000, 0)
// Minimum execution time: 17_744_000 picoseconds.
Weight::from_parts(18_049_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 15_670
.saturating_add(Weight::from_parts(23_248_926, 0).saturating_mul(u.into()))
// Standard Error: 15_228
.saturating_add(Weight::from_parts(15_157_835, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into()))
Expand All @@ -141,24 +141,24 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_280_000 picoseconds.
Weight::from_parts(11_670_000, 0)
// Minimum execution time: 6_450_000 picoseconds.
Weight::from_parts(6_873_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 53_910_000 picoseconds.
Weight::from_parts(54_630_000, 0)
// Minimum execution time: 32_262_000 picoseconds.
Weight::from_parts(32_639_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 37_300_000 picoseconds.
Weight::from_parts(38_140_000, 0)
// Minimum execution time: 21_790_000 picoseconds.
Weight::from_parts(22_198_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
Loading