Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[bajun-runtime] add missing migrations for production network and add migration check to CI #396

Merged
merged 40 commits into from
Feb 12, 2024

Conversation

clangenb
Copy link
Contributor

@clangenb clangenb commented Feb 9, 2024

This adds the missing storage migrations. All storage migrations are very cheap, hence they can be included into one runtime. Additionally, the CI verifies the storage migrations with try-runtime against on-chain live data.

The weight executed for the storage migration is tiny and should not pose problems. Output from the try-runtime on my machine:

[2024-02-11T12:41:48Z INFO  try_runtime_core::commands::on_runtime_upgrade] -------------------------------------------------------------------
[2024-02-11T12:41:50Z INFO  runtime::fix::scheduler::migration] agendas present which will be left untouched: 0/0...
[2024-02-11T12:41:50Z INFO  runtime::fix::scheduler::migration] migrating from StorageVersion(0) to 4
[2024-02-11T12:41:50Z INFO  runtime::fix::scheduler::migration] agendas present a posteriori: 0/0...
[2024-02-11T12:41:50Z INFO  runtime::preimage::migration::v1] Migrating 0 images
[2024-02-11T12:41:50Z INFO  pallet_xcm::migration::v1] v1 applied successfully
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(3)` vs current storage version `StorageVersion(2)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(1)`
[2024-02-11T12:41:50Z INFO  try_runtime_core::commands::on_runtime_upgrade] -------------------------------------------------------------------


[2024-02-11T12:41:50Z INFO  try_runtime_core::commands::on_runtime_upgrade] 🔬 TryRuntime_on_runtime_upgrade succeeded! Running it again without checks for weight measurements.


[2024-02-11T12:41:50Z INFO  try_runtime_core::commands::on_runtime_upgrade] -------------------------------------------------------------------
[2024-02-11T12:41:50Z INFO  runtime::fix::scheduler::migration] migrating from StorageVersion(0) to 4
[2024-02-11T12:41:50Z INFO  pallet_xcm::migration::v1] v1 applied successfully
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(3)` vs current storage version `StorageVersion(2)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`
[2024-02-11T12:41:50Z INFO  runtime::frame-support] ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(1)`
[2024-02-11T12:41:50Z INFO  try_runtime_core::commands::on_runtime_upgrade] ℹ Skipping idempotency check
[2024-02-11T12:41:50Z INFO  try-runtime::cli] PoV size (zstd-compressed compact proof): 1.1 KB. For parachains, it's your responsibility to verify that a PoV of this size fits within any relaychain constraints.
[2024-02-11T12:41:50Z INFO  try-runtime::cli] Consumed ref_time: 0.000575s (0.12% of max 0.5s)
[2024-02-11T12:41:50Z INFO  try-runtime::cli] ✅ No weight safety issues detected. Please note this does not guarantee a successful runtime upgrade. Always test your runtime upgrade with recent state, and ensure that the weight usage of your migrations will not drastically differ between testing and actual on-chain execution.

@clangenb clangenb marked this pull request as draft February 9, 2024 02:26
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (bajun-stable@3ee9391). Click here to learn what that means.

Additional details and impacted files
@@               Coverage Diff               @@
##             bajun-stable     #396   +/-   ##
===============================================
  Coverage                ?   75.76%           
===============================================
  Files                   ?       33           
  Lines                   ?     3508           
  Branches                ?        0           
===============================================
  Hits                    ?     2658           
  Misses                  ?      850           
  Partials                ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clangenb clangenb changed the title Introduce migration-check CI and add first batch of migrations [bajun-runtime] add missing migrations for production network and add migration check to CI Feb 11, 2024
@clangenb clangenb marked this pull request as ready for review February 11, 2024 11:56
@clangenb clangenb merged commit 48323e4 into bajun-stable Feb 12, 2024
15 checks passed
@clangenb clangenb deleted the cl/fix-bajun-migrations branch February 12, 2024 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants