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

pallet-xcm: fix weights for all XTs and deprecate unlimited weight ones #3927

Merged
merged 6 commits into from
Apr 2, 2024

Conversation

acatangiu
Copy link
Contributor

@acatangiu acatangiu commented Apr 1, 2024

Fix "double-weights" for extrinsics, use only the ones benchmarked in the runtime.

Deprecate extrinsics that don't specify WeightLimit, remove their usage across the repo.

Deprecate extrinsics that don't specify WeightLimit,
remove their usage across the repo.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
@acatangiu acatangiu added the T2-pallets This PR/Issue is related to a particular pallet. label Apr 1, 2024
@acatangiu acatangiu self-assigned this Apr 1, 2024
@acatangiu acatangiu requested a review from a team as a code owner April 1, 2024 13:50
@acatangiu acatangiu changed the title pallet-xcm: deprecate unlimited_* weight extrinsics pallet-xcm: fix weights for all XTs and deprecate unlimited weight ones Apr 1, 2024
@paritytech paritytech deleted a comment from paritytech-cicd-pr Apr 1, 2024
@acatangiu
Copy link
Contributor Author

bot bench cumulus-assets --runtime asset-hub-westend --pallet pallet_xcm

@command-bot
Copy link

command-bot bot commented Apr 1, 2024

@acatangiu https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5719983 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=pallet_xcm. 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 4-1f992745-2c6f-48c0-92a9-084451f52915 to cancel this command or bot cancel to cancel all commands in this pull request.

…=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=pallet_xcm
@command-bot
Copy link

command-bot bot commented Apr 1, 2024

@acatangiu Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=pallet_xcm has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5719983 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5719983/artifacts/download.

@acatangiu acatangiu enabled auto-merge April 1, 2024 16:36
Copy link
Contributor

@svyatonik svyatonik left a comment

Choose a reason for hiding this comment

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

Why pallet::weight attribute is removed at all from most of calls. Does it mean that the weight is now zero => near to zero fee + ability to create overweight block. I'm probably missing something important, just caught my eye

@acatangiu
Copy link
Contributor Author

Why pallet::weight attribute is removed at all from most of calls. Does it mean that the weight is now zero => near to zero fee + ability to create overweight block. I'm probably missing something important, just caught my eye

It is replaced by ::WeightInfo here. The default weight fn is fn with same name in <T as Config>::WeightInfo.

There are some places where I kept pallet::weight because it is non-default (e.g. see execute and execute_blob).

Copy link
Contributor

@svyatonik svyatonik left a comment

Choose a reason for hiding this comment

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

Ok, cool stuff! Didn't knew we can do weight definitions in the #[pallet::call(..)]

@acatangiu acatangiu added this pull request to the merge queue Apr 2, 2024
Merged via the queue into paritytech:master with commit d0ebb85 Apr 2, 2024
134 of 135 checks passed
@acatangiu acatangiu deleted the pallet-xcm-deprecate-xts branch April 2, 2024 08:23
Ank4n pushed a commit that referenced this pull request Apr 9, 2024
…es (#3927)

Fix "double-weights" for extrinsics, use only the ones benchmarked in
the runtime.

Deprecate extrinsics that don't specify WeightLimit, remove their usage
across the repo.

---------

Signed-off-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: command-bot <>
dharjeezy pushed a commit to dharjeezy/polkadot-sdk that referenced this pull request Apr 9, 2024
…es (paritytech#3927)

Fix "double-weights" for extrinsics, use only the ones benchmarked in
the runtime.

Deprecate extrinsics that don't specify WeightLimit, remove their usage
across the repo.

---------

Signed-off-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: command-bot <>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants