Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply patch for a parachains inclusion pallet benchmarks (#567)
## Description Addressing @ordian's [comment](#522 (review)): > Previously, the weight of `enact_candidate` was included in the weight of availability bitfields, but this was a bug, because the number of bitfields depends on number of validators, whereas number of enacted candidates depends on the number of cores. This was later (accidentally) fixed, but the `enact_candidate` weight was unaccounted for. [paritytech/polkadot-sdk#5270](paritytech/polkadot-sdk#5270) was supposed to fix that. > > The base weight of `enact_candidate` still looks excessive and it was fixed in [paritytech/polkadot-sdk#5526](paritytech/polkadot-sdk#5526), but looks like it didn't make into the same release. > > That being said, even with 1.5ms of enactment weight per candidate, this shouldn't be a blocker to scale to 200 parachains weight-wise. So I'm fine with having these excessive weights for now. Addressing @bkontur's [comment](#522 (comment)): > @ordian The next patch, **stable2409-4**, is planned for this week. I have backported your fix here: [paritytech/polkadot-sdk#7145](paritytech/polkadot-sdk#7145). Once it is released, I will re-run the benchmarks for this within another PR. ## Weights diff ### Kusama `--method asymptotic` does not work: ``` subweight compare commits --path-pattern "./relay/kusama/**/weights/**/*.rs" --format markdown --no-color --change added changed --method asymptotic --ignore-errors --strip-path-prefix="relay/kusama/src/weights/" remotes/polkadot-fellows/main origin/bko-patch-parachains-inclusion ``` | File | Extrinsic | Old | New | Change [%] | |---------------------------------|-----------------|-----|-----|------------| | runtime_parachains_inclusion.rs | enact_candidate | - | - | ERROR | but `--method base` works: ``` subweight compare commits --path-pattern "./relay/kusama/**/weights/**/*.rs" --format markdown --no-color --change added changed --method base --ignore-errors --strip-path-prefix="relay/kusama/src/weights/" remotes/polkadot-fellows/main origin/bko-patch-parachains-inclusion ``` | File | Extrinsic | Old | New | Change [%] | |---------------------------------|-----------------|--------|----------|------------| | runtime_parachains_inclusion.rs | enact_candidate | 2.97ms | 939.10us | -68.35 | ### Polkadot `--method asymptotic` does not work: ``` subweight compare commits --path-pattern "./relay/polkadot/**/weights/**/*.rs" --format markdown --no-color --change added changed --method asymptotic --ignore-errors --strip-path-prefix="relay/polkadot/src/weights/" remotes/polkadot-fellows/main origin/bko-patch-parachains-inclusion ``` | File | Extrinsic | Old | New | Change [%] | |---------------------------------|-----------------|-----|-----|------------| | runtime_parachains_inclusion.rs | enact_candidate | - | - | ERROR | but `--method base` works: ``` subweight compare commits --path-pattern "./relay/polkadot/**/weights/**/*.rs" --format markdown --no-color --change added changed --method base --ignore-errors --strip-path-prefix="relay/polkadot/src/weights/" remotes/polkadot-fellows/main origin/bko-patch-parachains-inclusion ``` | File | Extrinsic | Old | New | Change [%] | |---------------------------------|-----------------|--------|----------|------------| | runtime_parachains_inclusion.rs | enact_candidate | 2.92ms | 974.24us | -66.60 | <!-- Remember that you can run `/merge` to enable auto-merge in the PR --> <!-- Remember to modify the changelog. If you don't need to modify it, you can check the following box. Instead, if you have already modified it, simply delete the following line. --> - [X] Does not require a CHANGELOG entry --------- Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
- Loading branch information