Skip to content

Commit

Permalink
Update Runtime Weights (#129)
Browse files Browse the repository at this point in the history
For
#68 (comment).

Uses instructions introduced to the readme in
#127 to re-bench all
runtimes.

TODO
- [x] Is this much change % expected? Is benchmarking on vCPUs flawed
because they are arbitrarily shared with other cloud customers?
- It seems to be fine, the changes align with actual changes in
configuration of the runtimes (thanks @ggwpez!).
- [x] Polkadot
- [x] Kusama
- [x] Asset Hub Polkadot
- [x] Asset Hub Kusama
- [x] Bridge Hub Polkadot
- [x] Bridge Hub Kusama
- [x] Collectives Polkadot
- [ ] Look into why subweight shows some errors

## Polkadot Changes

<img width="1085" alt="Screenshot 2023-12-19 at 11 06 20"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/272e2ecd-48da-4ebb-b6e2-ff9fd73683fe">
<img width="1085" alt="Screenshot 2023-12-19 at 11 08 24"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/a37dea2e-abf6-4ad8-b3ef-abed6cb3e955">
<img width="1085" alt="Screenshot 2023-12-19 at 11 10 14"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/08788059-a052-4af6-b2aa-c791a3cddc24">

## Kusama Changes

<img width="1074" alt="Screenshot 2023-12-19 at 11 12 19"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/b096d1ec-384f-436f-ae9c-f6f929d14b9b">
<img width="1074" alt="Screenshot 2023-12-19 at 11 12 43"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/1bc757e8-c00c-4cf0-bea6-f74b92a33355">

## Asset Hub Polkadot Changes

<img width="1313" alt="Screenshot 2023-12-19 at 20 34 25"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/ea658d57-365d-45de-b0be-2c4627783e64">

## Asset Hub Kusama Changes

<img width="1313" alt="Screenshot 2023-12-19 at 20 43 37"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/963483ee-0d9f-49dc-9a83-31b443df1f10">

## Bridge Hub Polkadot

<img width="1313" alt="Screenshot 2023-12-20 at 11 49 13"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/0da77515-bb36-4a41-9c88-463ea28d9a9e">


## Bridge Hub Kusama

<img width="1313" alt="Screenshot 2023-12-20 at 11 48 39"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/97c7efa4-6a22-42fe-90e0-8477e0628d00">

## Collectives Polkadot

<img width="1369" alt="Screenshot 2023-12-20 at 11 50 33"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/6b2b22f3-fc87-4f19-a126-8d4be2335aa6">

<img width="1369" alt="Screenshot 2023-12-20 at 11 51 07"
src="https://github.com/polkadot-fellows/runtimes/assets/16665596/168ec1e2-ec47-4213-8899-f2d51c8ec6d1">

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
  • Loading branch information
4 people committed Jan 5, 2024
1 parent 3caec69 commit 48ccfae
Show file tree
Hide file tree
Showing 193 changed files with 8,377 additions and 12,539 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
}

fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) {
AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation));
AssetHubKusama::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable));
}

fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
}

fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) {
AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation));
AssetHubPolkadot::assert_dmp_queue_incomplete(Some(Error::WeightNotComputable));
}

fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) {
Polkadot::assert_ump_queue_processed(
true,
Some(AssetHubPolkadot::para_id()),
Some(Weight::from_parts(370_000_000, 7_000)),
Some(Weight::from_parts(254_182_000, 7_186)),
);

assert_expected_events!(
Expand All @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) {
Polkadot::assert_ump_queue_processed(
false,
Some(AssetHubPolkadot::para_id()),
Some(Weight::from_parts(235_000_000, 3_500)),
Some(Weight::from_parts(122_581_000, 3_593)),
);
}

Expand Down
8 changes: 1 addition & 7 deletions integration-tests/emulated/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,20 +474,14 @@ macro_rules! impl_assert_events_helpers_for_parachain {

/// Asserts a XCM from Relay Chain is incompletely executed
pub fn assert_dmp_queue_incomplete(
expected_weight: Option<$crate::impls::Weight>,
expected_error: Option<$crate::impls::Error>,
) {
$crate::impls::assert_expected_events!(
Self,
vec![
[<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward {
outcome: $crate::impls::Outcome::Incomplete(weight, error), ..
outcome: $crate::impls::Outcome::Error(error), ..
}) => {
weight: $crate::impls::weight_within_threshold(
($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD),
expected_weight.unwrap_or(*weight),
*weight
),
error: *error == expected_error.unwrap_or(*error),
},
]
Expand Down
2 changes: 1 addition & 1 deletion relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_balances_balances::WeightInfo<Runtime>;
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = ConstU32<8>;
type RuntimeHoldReason = RuntimeHoldReason;
Expand Down
54 changes: 30 additions & 24 deletions relay/kusama/src/weights/frame_benchmarking_baseline.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 28 additions & 22 deletions relay/kusama/src/weights/frame_election_provider_support.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 41 additions & 35 deletions relay/kusama/src/weights/frame_system.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 48ccfae

Please sign in to comment.