Skip to content
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

Update HRMP pallet benchmarking to use benchmarks v2 #1676

Merged
merged 9 commits into from
Sep 22, 2023

Conversation

seadanda
Copy link
Contributor

  • What does this PR do?
    This PR updates the HRMP pallet benchmarks to Benchmarks v2 and fixes a small misconfiguration in one benchmark.

  • Why are these changes needed?
    Updates HRMP benchmarks to v2 and force_clean_hrmp does not run otherwise.

  • How were these changes implemented and what do they affect?
    Changes are contained in polkadot/runtime/parachains/src/hrmp/benchmarking.rs
    I updated the syntax from v1 to v2 without changing the contents of the benchmarks.
    I found an existing runtime issue with the config set in the tests. I explicitly set an increased limit in the benchmark in question and it runs successfully. I chose the limit semi-randomly with enough room that small changes to the message format won't cause any issues.

Increase max_downward_message_size to fix force_clean_hrmp benchmark issue.
Increased to 1024. Previously it was inheriting the tests config of 8, which was
too small for the message struct. 1KiB randomly chosen as a reasonable number
which won't present issues for small changes to the message format.
@seadanda seadanda added T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights. T14-system_parachains This PR/Issue is related to system parachains. labels Sep 22, 2023
@seadanda
Copy link
Contributor Author

bot fmt

@command-bot
Copy link

command-bot bot commented Sep 22, 2023

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3770579 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 3-6b2b30fe-9101-4e26-abd8-41d662c62a53 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Sep 22, 2023

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3770579 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3770579/artifacts/download.

@seadanda seadanda changed the title Donal hrmp pallet benchmarks v2 Update HRMP pallet benchmarking to use benchmarks v2 Sep 22, 2023
Copy link
Contributor

@georgepisaltu georgepisaltu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seadanda seadanda self-assigned this Sep 22, 2023
Copy link
Contributor

@sam0x17 sam0x17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@seadanda seadanda merged commit 22d9e2a into master Sep 22, 2023
11 checks passed
@seadanda seadanda deleted the donal-hrmp-pallet-benchmarks-v2 branch September 22, 2023 16:02
ordian added a commit that referenced this pull request Sep 27, 2023
* master: (61 commits)
  OpenGov in Westend and Rococo (#1177)
  Associated type Hasher for `QueryPreimage`, `StorePreimage` and `Bounded` (#1720)
  Migrate polkadot-primitives to v6 (#1543)
  genesis-builder: implemented for all runtimes (#1492)
  `BlockId` removal: `tx-pool` refactor (#1678)
  Bump directories from 4.0.1 to 5.0.1 (#1656)
  Allow debug_assertions in short-benchmarks CI job (#1711)
  chainHead/storage: Fix storage iteration using the query key (#1665)
  Implement more useful traits in `Slot` type (#1595)
  Make downloads in parallel and give more time to complete (#1699)
  Bump actions/checkout from 4.0.0 to 4.1.0 (#1688)
  contracts: Fix incorrect storage alias in mirgration (#1687)
  Fix documentation about justification and `finalized == true` requirement (#1607)
  tweak pallet macro (genesis_config etc) to cater for RA users as well. (#1689)
  Uncoupling pallet-xcm from frame-system's RuntimeCall (#1684)
  Bump aes-gcm from 0.10.2 to 0.10.3 (#1681)
  docs / Update PR template to reflect monorepo (#1674)
  update contributing guide and ui-tests scripts (#1668)
  pallet epm: add `TrimmingStatus` to the mined solution (#1659)
  Update HRMP pallet benchmarking to use benchmarks v2 (#1676)
  ...
github-merge-queue bot pushed a commit that referenced this pull request Oct 16, 2024
# Description
This PR migrates the staking pallet's benchmarks to the `v2` of pallet
benchmarking tooling provided by
[`frame_benchmarking`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/benchmarking).

## Integration

N/A

## Review Notes

The PR is straightforward, as were #1676 , #1838 and #1868.

---------

Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights. T14-system_parachains This PR/Issue is related to system parachains.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants