centrifuge / centrifuge-chain

Centrifuge Chain: the layer-1 blockchain for real-world assets, built on Substrate.
https://centrifuge.io
GNU Lesser General Public License v3.0
182 stars 81 forks source link

feat: LP v2 migrations #1966

Closed wischli closed 1 month ago

wischli commented 2 months ago

Description

Dev

Migration failed here first such that I removed the old entry and re-added it manually.

024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Pre checks done!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::nuke] ClearRelayerList: Cleared all RelayerList storage entries
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::nuke] ClearRelayerList Clear result of RelayerList: backend: 0 unique: 0 loops: 0
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Migration done!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Post checks done!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Pre checks done with 0 items in v2::MessageQueue, 0 in v3::MessageQueue and 0 items in FailedMessageQueue and 0 in v3::FailedMessageQueue!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Migration done with 0 in total!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Post checks done!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE Migration counts 1 updated domains and 0 removed domains
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE: Checks done with 1 domains!
[2024-09-03T06:51:38Z INFO  frame_support::migrations] 🚚 Pallet "LiquidityPoolsGateway" VersionedMigration migrating storage version from 2 to 3.
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig ON_RUNTIME_UPGRADE: Migration done with 1 updated domains!
[2024-09-03T06:51:38Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig POST: Checks done!
[2024-09-03T06:51:38Z INFO  runtime::frame-support] ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `NoStorageVersionSet`
[2024-09-03T06:51:38Z INFO  runtime::executive] βœ… Entire runtime state decodes without error. 343006 bytes total.

Demo

[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Pre checks done!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::nuke] ClearRelayerList: Cleared all RelayerList storage entries
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::nuke] ClearRelayerList Clear result of RelayerList: backend: 13 unique: 13 loops: 13
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Migration done!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Post checks done!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Pre checks done with 0 items in v2::MessageQueue, 0 in v3::MessageQueue and 0 items in FailedMessageQueue and 2 in v3::FailedMessageQueue!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Migration done with 0 in total!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::v2_update_message_queue] InitMessageQueue: Post checks done!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE Migration counts 4 updated domains and 0 removed domains
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE: Checks done with 4 domains!
[2024-09-03T06:51:11Z INFO  frame_support::migrations] 🚚 Pallet "LiquidityPoolsGateway" VersionedMigration migrating storage version from 2 to 3.
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig ON_RUNTIME_UPGRADE: Migration done with 4 updated domains!
[2024-09-03T06:51:11Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig POST: Checks done!

Centrifuge Chain

[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Pre checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::nuke] ClearRelayerList: Cleared all RelayerList storage entries
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::nuke] ClearRelayerList Clear result of RelayerList: backend: 0 unique: 0 loops: 0
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Migration done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Post checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::v0_init_message_queue] InitMessageQueue: Pre checks done with 0 items in OutboundMessageQueue and 0 items in FailedOutboundMessages!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::v0_init_message_queue] InitMessageQueue: Initiating migration of 0 outbound messages
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::v0_init_message_queue] InitMessageQueue: Initiating migration of 0 failed outbound messages
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::v0_init_message_queue] InitMessageQueue: Migration done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::v0_init_message_queue] InitMessageQueue: Post checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE Migration counts 4 updated domains and 0 removed domains
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig PRE: Checks done with 4 domains!
[2024-09-03T06:52:12Z INFO  frame_support::migrations] 🚚 Pallet "LiquidityPoolsGateway" VersionedMigration migrating storage version from 0 to 3.
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig ON_RUNTIME_UPGRADE: Migration done with 4 updated domains!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::init_axelar_router] DomainRoutersToAxelarConfig POST: Checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Pre checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::nuke] ClearRelayerList: Cleared all RelayerList storage entries
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::nuke] ClearRelayerList Clear result of RelayerList: backend: 0 unique: 0 loops: 0
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Migration done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::liquidity_pools_v2::kill_relayer_list] ClearRelayerList: Post checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::foreign_investments_v2] ForeignInvestmentsV2: Pre checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::foreign_investments_v2] ForeignInvestmentsV2: Removed 3 ForeignInvestmentInfo V1 keys
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::foreign_investments_v2] ForeignInvestmentsV2: Migration done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::foreign_investments_v2] ForeignInvestmentsV2: Post checks done!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::increase_storage_version] BumpStorageVersion: Increasing storage version of "ForeignInvestments" from StorageVersion(1) to StorageVersion(2)
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::permissions_v1] PermssionsV1: Pre checks done!
[2024-09-03T06:52:12Z INFO  frame_support::migrations] 🚚 Pallet "Permissions" VersionedMigration migrating storage version from 0 to 1.
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::permissions_v1] PermssionsV1: Migrated 34 permissions!
[2024-09-03T06:52:12Z INFO  runtime_common::migrations::permissions_v1] PermssionsV1: Post checks done!
[2024-09-03T06:52:12Z INFO  runtime::frame-support] ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `NoStorageVersionSet`
[2024-09-03T06:52:12Z INFO  runtime::executive] βœ… Entire runtime state decodes without error. 6103042 bytes total.

Checklist:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 255 lines in your changes missing coverage. Please review.

Project coverage is 48.28%. Comparing base (d26b99e) to head (bf97ee8). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...untime/common/src/migrations/liquidity_pools_v2.rs 0.00% 247 Missing :warning:
runtime/common/src/migrations/nuke.rs 0.00% 6 Missing :warning:
runtime/development/src/lib.rs 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1966 +/- ## ========================================== - Coverage 48.99% 48.28% -0.72% ========================================== Files 183 183 Lines 13201 13403 +202 ========================================== + Hits 6468 6471 +3 - Misses 6733 6932 +199 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

wischli commented 1 month ago

Looks good!

Would you mind approving? Requiring your approval as code owner.