Skip to content

Base XCM weight increase#1791

Merged
girazoki merged 6 commits into
masterfrom
girazoki-increase-base-xcm-weight
Aug 30, 2022
Merged

Base XCM weight increase#1791
girazoki merged 6 commits into
masterfrom
girazoki-increase-base-xcm-weight

Conversation

@girazoki
Copy link
Copy Markdown
Collaborator

@girazoki girazoki commented Aug 30, 2022

What does it do?

Increases BaseXcmWeight for all runtimes. This weight is supposed to account for common operations when we send a XCM message, such as reading the version of the destination chain. I do believe this value was set a bit low, specially based on

https://github.com/paritytech/polkadot/blob/6628e735ef8e1a18786c66622fe711878f682d50/runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs

Although I think some of those writes are only reflected once (e.g., the VersionDiscoveryQueue write), I also feel we should at least double the baseXcmWeight. We are charging 200_000_000 per instruction plus this BaseXcmWeight. and I think for cases where we need to send a message, this might be slidely underestimated

It also harmonizes the alphanet weight per instruction charged to that of Moonriver and Moonbeam

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@girazoki girazoki marked this pull request as ready for review August 30, 2022 12:43
@girazoki girazoki added A0-pleasereview Pull request needs code review. D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes labels Aug 30, 2022
Copy link
Copy Markdown
Contributor

@tgmichel tgmichel left a comment

Choose a reason for hiding this comment

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

Lgtm, aligns well with the current rocksdb weight costs and the expected reads and writes for xcm common operations.

@girazoki girazoki merged commit 76e786b into master Aug 30, 2022
@girazoki girazoki deleted the girazoki-increase-base-xcm-weight branch August 30, 2022 16:12
jiguantong added a commit to darwinia-network/darwinia-parachain that referenced this pull request Sep 8, 2022
jiguantong added a commit to darwinia-network/darwinia-parachain that referenced this pull request Oct 12, 2022
@notlesh notlesh added D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants