Skip to content

Added fallback_max_weight to Transact for sending messages to V4 chains#6643

Merged
franciscoaguirre merged 34 commits intomasterfrom
xcm-transact-compatibility
Dec 5, 2024
Merged

Added fallback_max_weight to Transact for sending messages to V4 chains#6643
franciscoaguirre merged 34 commits intomasterfrom
xcm-transact-compatibility

Conversation

@franciscoaguirre
Copy link
Copy Markdown
Contributor

@franciscoaguirre franciscoaguirre commented Nov 26, 2024

Closes: #6585

Removing the require_weight_at_most parameter in V5 Transact had only one problem. Converting a message from V5 to V4 to send to chains that didn't upgrade yet. The conversion would not know what weight to give to the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an Option<Weight> called fallback_max_weight. This can be set to None if you don't intend to deal with a chain that hasn't upgraded yet. If you set it to Some(_), the behaviour is the same. The plan is to totally remove this in V6 since there will be a good conversion path from V6 to V5.

@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Nov 26, 2024
@franciscoaguirre franciscoaguirre self-assigned this Nov 26, 2024
@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

/cmd fmt

@github-actions
Copy link
Copy Markdown
Contributor

Command "fmt" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

Command "fmt" has finished ✅ See logs here

@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience runtime_dev --bump major

@franciscoaguirre franciscoaguirre marked this pull request as ready for review November 26, 2024 17:49
@franciscoaguirre franciscoaguirre requested a review from a team as a code owner November 26, 2024 17:49
@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 26, 2024 17:50
Copy link
Copy Markdown
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

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

See comments. Please also add an explicit Transact test from V5 chain -> V4 chain.

@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 29, 2024 17:43
@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

/cmd fmt

@github-actions
Copy link
Copy Markdown
Contributor

Command "fmt" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

Command "fmt" has finished ✅ See logs here

@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

/cmd fmt

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2024

Command "fmt" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2024

Command "fmt" has finished ✅ See logs here

@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/12182142278
Failed job name: fmt

@franciscoaguirre franciscoaguirre added this pull request to the merge queue Dec 5, 2024
Merged via the queue into master with commit f31c70a Dec 5, 2024
@franciscoaguirre franciscoaguirre deleted the xcm-transact-compatibility branch December 5, 2024 17:18
franciscoaguirre added a commit that referenced this pull request Dec 5, 2024
…ns (#6643)

Closes: #6585

Removing the `require_weight_at_most` parameter in V5 Transact had only
one problem. Converting a message from V5 to V4 to send to chains that
didn't upgrade yet. The conversion would not know what weight to give to
the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an `Option<Weight>`
called `fallback_max_weight`. This can be set to `None` if you don't
intend to deal with a chain that hasn't upgraded yet. If you set it to
`Some(_)`, the behaviour is the same. The plan is to totally remove this
in V6 since there will be a good conversion path from V6 to V5.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
EgorPopelyaev pushed a commit that referenced this pull request Dec 9, 2024
#6778)

Backport of #6643 to
stable2412.

We need it before the release so we have a good story with chains that
haven't upgraded yet.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Branislav Kontur <[email protected]>
Krayt78 pushed a commit to Krayt78/polkadot-sdk that referenced this pull request Dec 18, 2024
…ns (paritytech#6643)

Closes: paritytech#6585

Removing the `require_weight_at_most` parameter in V5 Transact had only
one problem. Converting a message from V5 to V4 to send to chains that
didn't upgrade yet. The conversion would not know what weight to give to
the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an `Option<Weight>`
called `fallback_max_weight`. This can be set to `None` if you don't
intend to deal with a chain that hasn't upgraded yet. If you set it to
`Some(_)`, the behaviour is the same. The plan is to totally remove this
in V6 since there will be a good conversion path from V6 to V5.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
dudo50 pushed a commit to paraspell-research/polkadot-sdk that referenced this pull request Jan 4, 2025
…ns (paritytech#6643)

Closes: paritytech#6585

Removing the `require_weight_at_most` parameter in V5 Transact had only
one problem. Converting a message from V5 to V4 to send to chains that
didn't upgrade yet. The conversion would not know what weight to give to
the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an `Option<Weight>`
called `fallback_max_weight`. This can be set to `None` if you don't
intend to deal with a chain that hasn't upgraded yet. If you set it to
`Some(_)`, the behaviour is the same. The plan is to totally remove this
in V6 since there will be a good conversion path from V6 to V5.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T6-XCM This PR/Issue is related to XCM.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[xcm] Transact v4 vs v5 compatibility

6 participants