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

XCM: Limit the max number of assets weighable in MultiAssets#6786

Merged
gavofyork merged 6 commits into
masterfrom
kckyeung/limit-max-all-counted
Feb 28, 2023
Merged

XCM: Limit the max number of assets weighable in MultiAssets#6786
gavofyork merged 6 commits into
masterfrom
kckyeung/limit-max-all-counted

Conversation

@KiChjang

Copy link
Copy Markdown
Contributor

To prevent unreasonably high count values from overweighing related XCM instructions, we should have an upper limit on how many assets we would weight during the weight calculation of XCM.

@KiChjang KiChjang 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. T6-XCM This PR/Issue is related to XCM. labels Feb 25, 2023
Comment thread runtime/kusama/src/weights/xcm/mod.rs Outdated
Comment thread runtime/rococo/src/weights/xcm/mod.rs Outdated
Comment thread runtime/westend/src/weights/xcm/mod.rs Outdated

@gavofyork gavofyork left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After my suggestions, this seems ok.

@xlc

xlc commented Feb 25, 2023

Copy link
Copy Markdown
Contributor

Some tests will be helpful

KiChjang and others added 2 commits February 25, 2023 07:55
Co-authored-by: Gavin Wood <gavin@parity.io>
@paritytech-ci paritytech-ci requested a review from a team February 25, 2023 21:12
Comment thread runtime/kusama/src/weights/xcm/mod.rs Outdated
@paritytech-ci paritytech-ci requested a review from a team February 26, 2023 06:18
Comment thread runtime/kusama/src/xcm_config.rs Outdated
@paritytech-ci paritytech-ci requested a review from a team February 26, 2023 06:19
Comment thread runtime/westend/src/weights/xcm/mod.rs Outdated
Comment thread runtime/rococo/src/weights/xcm/mod.rs Outdated
@paritytech-ci paritytech-ci requested a review from a team February 26, 2023 06:20
@gavofyork

Copy link
Copy Markdown
Member

Looks fine - will need another review though.

@gavofyork gavofyork merged commit 9d74985 into master Feb 28, 2023
@gavofyork gavofyork deleted the kckyeung/limit-max-all-counted branch February 28, 2023 09:12
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. T6-XCM This PR/Issue is related to XCM.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants