-
Notifications
You must be signed in to change notification settings - Fork 64
[XCM]: Remove fees mode #106
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
Open
franciscoaguirre
wants to merge
4
commits into
polkadot-fellows:main
Choose a base branch
from
franciscoaguirre:xcm-remove-fees-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d1fdc53
feat(xcm-remove-fees-mode): add RFC for removing XCM fees mode
franciscoaguirre deda2ae
Update text/0106-xcm-remove-fees-mode.md
franciscoaguirre 2fd984b
Merge branch 'polkadot-fellows:main' into xcm-remove-fees-mode
franciscoaguirre 1a598a7
doc(xcm-remove-fees-mode): add more comments on compatibility
franciscoaguirre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # RFC-0106: Remove XCM fees mode | ||
|
|
||
| | | | | ||
| | --------------- | ------------------------------------------------------------------------------------------- | | ||
| | **Start Date** | 23 July 2024 | | ||
| | **Description** | Remove the `SetFeesMode` instruction and `fees_mode` register from XCM | | ||
| | **Authors** | Francisco Aguirre | | ||
|
|
||
| ## Summary | ||
|
|
||
| The `SetFeesMode` instruction and the `fees_mode` register allow for the existence of JIT withdrawal. | ||
| JIT withdrawal complicates the fee mechanism and leads to bugs and unexpected behaviour. | ||
| The proposal is to remove said functionality. | ||
| Another effort to simplify fee handling in XCM. | ||
|
|
||
| ## Motivation | ||
|
|
||
| The JIT withdrawal mechanism creates bugs such as not being able to get fees when all assets are put into holding and none left in the origin location. | ||
| This is a confusing behavior, since there are funds for fees, just not where the XCVM wants them. | ||
| The XCVM should have only one entrypoint to fee payment, the holding register. | ||
| That way there is also less surface for bugs. | ||
|
|
||
| ## Stakeholders | ||
|
|
||
| - Runtime Users | ||
| - Runtime Devs | ||
| - Wallets | ||
| - dApps | ||
|
|
||
| ## Explanation | ||
|
|
||
| The `SetFeesMode` instruction will be removed. | ||
| The `Fees Mode` register will be removed. | ||
|
|
||
| ## Drawbacks | ||
|
|
||
| Users will have to make sure to put enough assets in `WithdrawAsset` when previously some things might have been charged directly from their accounts. | ||
| This leads to a more predictable behaviour though so it will only be a drawback for the minority of users. | ||
|
|
||
| ## Testing, Security, and Privacy | ||
|
|
||
| Describe the the impact of the proposal on these three high-importance areas - how implementations can be tested for adherence, effects that the proposal has on security and privacy per-se, as well as any possible implementation pitfalls which should be clearly avoided. | ||
|
|
||
| ## Performance, Ergonomics, and Compatibility | ||
|
|
||
| ### Performance | ||
|
|
||
| Performance will be improved since unnecessary checks will be avoided. | ||
|
|
||
| ### Ergonomics | ||
|
|
||
| The removal of JIT withdrawal simplifies code for developers and results in a more predictable behaviour for users. | ||
franciscoaguirre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Compatibility | ||
|
|
||
| For backwards-compatibility, there should be a version of XCM in between the approval of this RFC and the actual removal of the instruction, to give time to the | ||
| ecosystem to adapt. | ||
franciscoaguirre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Prior Art and References | ||
|
|
||
| The previous RFC PR on the xcm-format repo, before XCM RFCs were moved to fellowship RFCs: https://github.com/polkadot-fellows/xcm-format/pull/57. | ||
|
|
||
| ## Unresolved Questions | ||
|
|
||
| None. | ||
|
|
||
| ## Future Directions and Related Material | ||
|
|
||
| None. | ||
franciscoaguirre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.