Skip to content

Upgrade Polkadot and Kusama to XCM v5#753

Merged
fellowship-merge-bot[bot] merged 58 commits into
polkadot-fellows:mainfrom
Snowfork:upgrade-to-xcm-v5
Jul 2, 2025
Merged

Upgrade Polkadot and Kusama to XCM v5#753
fellowship-merge-bot[bot] merged 58 commits into
polkadot-fellows:mainfrom
Snowfork:upgrade-to-xcm-v5

Conversation

@claravanstaden

@claravanstaden claravanstaden commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Upgrades Kusama and Polkadot AssetHub and BridgeHub to use XCM V5. Adds a no-migration to check that changing ForeignAssets and AssetConversion pallets to XCM V5 do not wreck storage.

@acatangiu acatangiu moved this from Todo to In Progress in Runtime releases Jun 6, 2025
@claravanstaden claravanstaden marked this pull request as ready for review June 9, 2025 12:30
// See the License for the specific language governing permissions and
// limitations under the License.

pub mod migration {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This module is generic, and can be reused for Polkadot and Kusama AssetHub. I couldn't mind a common place to put it in this repo though, so I copied the module for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you could create a system-parachains-common crate under runtimes/system-parachains/common - i've seen code duplicated before because of lack of common dir/crate

@claravanstaden

Copy link
Copy Markdown
Contributor Author

@yrong @alistair-singh @vgeddes please review. :)

Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/verify_xcm_upgrade_migration.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/verify_xcm_upgrade_migration.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Outdated
Comment thread integration-tests/emulated/helpers/src/common.rs
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Outdated
@claravanstaden

Copy link
Copy Markdown
Contributor Author

@ggwpez do you know what to do with the failing Clippy workflow, related to the revive pallet? I see in #782 you commented it out.

@ggwpez

ggwpez commented Jun 27, 2025

Copy link
Copy Markdown
Member

Yea I tried to fix it here. Hope CI goes green now paritytech/polkadot-sdk#8980 after my MR.

/// storage. This migration doesn't actually alter storage, it only verifies that:
/// 1. XCM V4 encoded locations can be decoded as V5
/// 2. Location encoding remains the same between V4 and V5
pub struct VerifyXcmV4ToV5Compatibility<T, I = crate::ForeignAssetsInstance>(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we adding tests to production code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably discussable, because most code is hidden behind try-runtime, but I don't see any need for adding this to the repo. You have tested it and now we can remove it? Better would be a proper test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@bkchr I added sample data tests here: https://github.com/polkadot-fellows/runtimes/pull/753/files#diff-d2b25217b924763d262a2a61b7c4a291cce0854d8a28fb425d35c30f462f0731R176 The try-runtime checks are nice because it is directly against storage. I still think this is helpful to ensure a successful migration, but if you don't think it is useful I guess I could remove it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still think this is helpful to ensure a successful migration

But you already have ensured this? And outside of CI we are not executing these checks right now.

@claravanstaden claravanstaden Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, updated over here: 7b06295 :)

@acatangiu

Copy link
Copy Markdown
Contributor

/merge

@fellowship-merge-bot fellowship-merge-bot Bot enabled auto-merge (squash) July 2, 2025 10:48
@fellowship-merge-bot

Copy link
Copy Markdown
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@fellowship-merge-bot fellowship-merge-bot Bot merged commit 356837c into polkadot-fellows:main Jul 2, 2025
68 of 70 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in Runtime releases Jul 2, 2025
@claravanstaden claravanstaden deleted the upgrade-to-xcm-v5 branch July 2, 2025 11:50
@bkontur bkontur mentioned this pull request Jul 2, 2025
2 tasks
@ggwpez

ggwpez commented Jul 3, 2025

Copy link
Copy Markdown
Member

Please no futher big changes to Asset Hub polkadot or relay while we are preparing runtimes for the Asset Hub Migration, thanks.

@claravanstaden

Copy link
Copy Markdown
Contributor Author

@ggwpez do you mean this change needs to wait for the Asset Hub migration, or it can be done before the Asset Hub migration but no further big changes? I am asking because we are aiming to get Snowbridge V2 live on Polkadot in August, and we cannot do so without this change.

@bkontur

bkontur commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Please no futher big changes to Asset Hub polkadot or relay while we are preparing runtimes for the Asset Hub Migration, thanks.

I think this PR is totally fine and can be released - it doesn’t affect migrated data, since we’re not changing any encoding here. My guess is that Oliver had a lot of conflicts and code changes (v4 → v5) while rebasing the AHM dev-migration branch, right? Or is there another reason?

@ggwpez do you mean this change needs to wait for the Asset Hub migration, or it can be done before the Asset Hub migration but no further big changes? I am asking because we are aiming to get Snowbridge V2 live on Polkadot in August, and we cannot do so without this change.

The only thing, @franciscoaguirre @anaelleltd do we need to notify - UIs/dapps/... about this change? How did we handle v3->v4 change, #472? Maybe, we don't need to?

@anaelleltd

Copy link
Copy Markdown
Collaborator

The only thing, @franciscoaguirre @anaelleltd do we need to notify - UIs/dapps/... about this change? How did we handle v3->v4 change, #472? Maybe, we don't need to?

No notification needed this time.

Here is the feedback from Cisco who did extra checks with PAPI team:
"The encoding is the same, so there should be no issue with anyone already reading the values. Tl;dr it won't break dapps. There is a case where it could break them but only if the network ids Westend or Rococo where used, since we removed them. This is not the case however since neither Polkadot nor Kusama or Paseo reference assets from Westend or Rococo."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants