Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Whitelist from benchmarking XCM storage keys read each block #6871

Conversation

franciscoaguirre
Copy link
Contributor

Added the following XcmPallet storage keys to the benchmark whitelist on all runtimes since they are read every block:

SupportedVersion
VersionDiscoveryQueue
SafeXcmVersion

Addresses #5203

@paritytech-ci paritytech-ci requested review from a team March 13, 2023 15:36
@franciscoaguirre franciscoaguirre added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Mar 13, 2023
@ggwpez
Copy link
Member

ggwpez commented Mar 13, 2023

bot help

@ggwpez
Copy link
Member

ggwpez commented Mar 13, 2023

bot clean
bot bench $ runtime polkadot pallet_xcm

@ggwpez
Copy link
Member

ggwpez commented Mar 13, 2023

bot clean
bot bench $ runtime polkadot pallet_xcm
bot bench $ runtime kusama pallet_xcm
bot bench $ runtime westend pallet_xcm

@ggwpez
Copy link
Member

ggwpez commented Mar 13, 2023

bot bench $ runtime rococo pallet_xcm
bot clean

@paritytech-ci paritytech-ci requested a review from a team March 13, 2023 21:05
runtime/kusama/src/lib.rs Outdated Show resolved Hide resolved
@franciscoaguirre
Copy link
Contributor Author

bot help

@franciscoaguirre
Copy link
Contributor Author

bot clean
bot bench $ runtime polkadot pallet_xcm
bot bench $ runtime kusama pallet_xcm
bot bench $ runtime westend pallet_xcm
bot bench $ runtime rococo pallet_xcm
bot clean

runtime/kusama/src/lib.rs Outdated Show resolved Hide resolved
@franciscoaguirre
Copy link
Contributor Author

bot rebase

1 similar comment
@franciscoaguirre
Copy link
Contributor Author

bot rebase

@franciscoaguirre
Copy link
Contributor Author

bot clean

@command-bot command-bot bot deleted a comment from paritytech-processbot bot Apr 4, 2023
@command-bot command-bot bot deleted a comment from paritytech-processbot bot Apr 4, 2023
@command-bot command-bot bot deleted a comment from paritytech-processbot bot Apr 4, 2023
@command-bot command-bot bot deleted a comment from paritytech-processbot bot Apr 4, 2023
runtime/kusama/src/lib.rs Outdated Show resolved Hide resolved
@franciscoaguirre franciscoaguirre changed the base branch from master to cisco-polkadot-xcm-weight-info-bound June 23, 2023 16:18
@@ -508,6 +508,7 @@ pub mod pallet {

/// The active configuration for the current session.
#[pallet::storage]
#[pallet::whitelist_storage]
Copy link
Contributor

Choose a reason for hiding this comment

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

@gupnik one new item for you to add to the pallet macro kitchensink example.

@paritytech-ci paritytech-ci requested a review from a team June 27, 2023 09:18
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

@ggwpez Do we have a way to systematically check that these storage items are included in the base-block weight? How is it even calculated? I presume we initialize an empty block?

Would be good to move this toward being more automated, if possible

@franciscoaguirre
Copy link
Contributor Author

bot rebase

@paritytech-processbot
Copy link

Rebased

@franciscoaguirre franciscoaguirre merged commit e804144 into cisco-polkadot-xcm-weight-info-bound Jul 2, 2023
3 checks passed
@franciscoaguirre franciscoaguirre deleted the cisco-whitelist-xcm-storage branch July 2, 2023 20:55
paritytech-processbot bot pushed a commit that referenced this pull request Jul 19, 2023
* Add polkadot XCM benchmarks

* Add temp

* ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::generic

* Add weights to XCM on Polkadot

* Make CI fail on old files

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update template

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add reserve_asset_deposited benchmark

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic

* Update weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Change initiate_reserve_deposit in runtime weights

* Update weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove trusted reserves from runtimes

* Fix pallet-xcm-benchmarks mock

* Fix test

* Change pallet xcm weigher in kusama

* Fix

* Remove merge conflict artifact

* Remove initiate_reserve_withdraw from generic benchmarks

* Add missing implementation to XCM benchmark

* Fix failing karura test

* Remove dbg!

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Fix fmt

* Revert "Fix fmt"

This reverts commit 676f2d8.

* Fix fmt

* Remove duplicated template code

* Add back part of the template

* ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible

* Don't skip reserve asset deposited benchmark

* Remove call to non-generated benchmark yet

* Underscore unused parameter

* Skip not supported benchmarks and hardcode value

* Remove ReserveAssetDeposited benchmark

* ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible

* Add back ReserveAssetDeposited

* ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible

* Use default benchmark for ReserveAssetDeposited

* Add missing parameter

* Revert reserve asset deposited benchmark

* ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm kusama pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm westend pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible

* Add 'real' benchmarks

* Add TrustedReserve to actual XcmConfig

* Add TrustedReserve to actual XcmConfig (fix)

* Whitelist from benchmarking XCM storage keys read each block (#6871)

* Whitelist from benchmarking XCM storage keys read each block

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm

* Remove XcmPallet SupportedVersion from the benchmark whitelist

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime kusama pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm

* ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm

* WIP

* Add necessary traits, remove unnecessary whitelisted keys

* Fix tests

* Remove unused file

* Remove unused import

---------

Co-authored-by: command-bot <>

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible

* ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::fungible

* Fix spellchecker issues

* Remove unused migration code

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants