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

Remove require_weight_at_most from XCM Transact #101

Conversation

acatangiu
Copy link
Contributor

@acatangiu acatangiu commented Jul 12, 2024

This is a continuation of polkadot-fellows/xcm-format#55 following the migration of XCM RFCs to this repo.

Summary

Remove the require_weight_at_most: Weight parameter of the Transact instruction.

Motivation

The UX of using Transact is not great, and one part of the problem is guesstimating this require_weight_at_most.
We've seen multiple Transacts on-chain failures caused by the "incorrect" use or the parameter. In practice, this parameter only adds UX overhead. Use cases fall in one of two categories:

  1. Unpaid execution of Transacts - in these cases the require_weight_at_most is not really useful, caller doesn't have to pay for it, and on the call site it either fits the block or not;
  2. Paid execution of single Transact - the weight to be spent by the Transact is already covered by the BuyExecution weight limit parameter.

We've had multiple OpenGov root/whitelisted_caller proposals initiated by core-devs, completely or partially fail because of incorrect configuration of require_weight_at_most parameter. This is a strong indication that the instruction in its current form is hard to use.

@acatangiu acatangiu force-pushed the xcm-transact-allow-unlimited-weight branch from 61e7e8e to 46de281 Compare July 23, 2024 13:51
Replace the `require_weight_at_most: Weight` parameter of the Transact
instruction with a weight limit: `weight_limit: WeightLimit` that allows
`Unlimited` variant.

Motivation

The UX of using Transact is not great, and one part of the problem is
guesstimating this require_weight_at_most.
We've seen multiple Transacts on-chain failures caused by the "incorrect"
use or the parameter. In practice, this parameter only adds UX overhead.
Use cases fall in one of two categories:

1. Unpaid execution of Transacts - in these cases the require_weight_at_most
   is not really useful, caller doesn't have to pay for it, and on the call
   site it either fits the block or not;
2. Paid execution of single Transact - the weight to be spent by the Transact
   is already covered by the BuyExecution weight limit parameter.

We've had multiple OpenGov root/whitelisted_caller proposals initiated
by core-devs, completely or partially fail because of incorrect configuration
of `require_weight_at_most` parameter. This is a strong indication that the
instruction in its current form is hard to use.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
@acatangiu acatangiu force-pushed the xcm-transact-allow-unlimited-weight branch from 46de281 to d18bf46 Compare July 24, 2024 12:09
@acatangiu acatangiu changed the title Allow XCM Transact Unlimited weight Remove require_weight_at_most from XCM Transact Jul 30, 2024
@acatangiu
Copy link
Contributor Author

@xlc @bkchr @seadanda I think this is good to propose on-chain, wdyt?

Copy link

@seadanda seadanda left a comment

Choose a reason for hiding this comment

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

Just gave it another pass, I think it's ready to propose

@franciscoaguirre
Copy link
Contributor

/rfc propose

@paritytech-rfc-bot
Copy link
Contributor

Hey @franciscoaguirre, here is a link you can use to create the referendum aiming to approve this RFC number 0101.

Instructions
  1. Open the link.

  2. Switch to the Submission tab.

  1. Adjust the transaction if needed (for example, the proposal Origin).

  2. Submit the Transaction


It is based on commit hash eb318aed0c8e0282f17197b9ddad8102c79c90b4.

The proposed remark text is: RFC_APPROVE(0101,efffb2344e378aae56bcd48b8c2a06daa8ef9bd1ad7826416c3a3459a013ce53).

Copy link

Voting for this referenda is ongoing.

Vote for it here

Copy link

github-actions bot commented Aug 5, 2024

PR can be merged.

Write the following command to trigger the bot

/rfc process 0xff7432136fbaa2c74352e316264820c79078f2b0550d41de6e7e901e4f748833

@xlc
Copy link
Contributor

xlc commented Aug 5, 2024

/rfc process 0xff7432136fbaa2c74352e316264820c79078f2b0550d41de6e7e901e4f748833

@paritytech-rfc-bot paritytech-rfc-bot bot merged commit ab53bd3 into polkadot-fellows:main Aug 5, 2024
@paritytech-rfc-bot
Copy link
Contributor

The on-chain referendum has approved the RFC.

@acatangiu acatangiu deleted the xcm-transact-allow-unlimited-weight branch August 7, 2024 13:07
@vgeddes
Copy link

vgeddes commented Aug 8, 2024

Just belatedly confirming that removing require_weight_at_most won't conflict with Snowbridge's upcoming Transact bridge. 👍

@anaelleltd anaelleltd added the Approved Has passed on-chain voting. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Has passed on-chain voting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants