Skip to content
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

Sync StorageVersion of external dependencies #1641

Closed
3 of 5 tasks
wischli opened this issue Dec 5, 2023 · 3 comments
Closed
3 of 5 tasks

Sync StorageVersion of external dependencies #1641

wischli opened this issue Dec 5, 2023 · 3 comments
Assignees
Labels
I3-annoyance The code behaves as expected, but "expected" is an issue. I9-release A specific release. P5-soon Issue should be addressed soon.

Comments

@wischli
Copy link
Contributor

wischli commented Dec 5, 2023

Description

During the execution of try-runtime as part of the release process of #1607, I stumbled upon a few lines of mismatching storage versions for external dependencies for Centrifuge Chain. We need to investigate all of these for the next release 1025 and update to the latest versions.

2023-12-05 08:50:53.521  INFO main runtime::frame-support: ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`
2023-12-05 08:50:53.521 ERROR main runtime::frame-support: **Balances**: On chain storage version StorageVersion(0) doesn't match current storage version **StorageVersion(1**).
2023-12-05 08:50:53.521  INFO main runtime::frame-support: ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(3)` vs current storage version `StorageVersion(2)`
2023-12-05 08:50:53.521 ERROR main runtime::frame-support: XcmpQueue: On chain storage version StorageVersion(3) doesn't match current storage version StorageVersion(2).
2023-12-05 08:50:53.521  INFO main runtime::frame-support: ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`
2023-12-05 08:50:53.521  INFO main runtime::frame-support: ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(1)`
2023-12-05 08:50:53.521 ERROR main runtime::frame-support: DmpQueue: On chain storage version StorageVersion(2) doesn't match current storage version StorageVersion(1).
2023-12-05 08:50:53.522 ERROR main runtime::frame-support: **OrmlAssetRegistry**: On chain storage version StorageVersion(0) doesn't match current storage version **StorageVersion(2)**.
2023-12-05 08:50:53.522 ERROR main runtime::frame-support: **PriceOracleMembership**: On chain storage version **StorageVersion(0)** doesn't match current storage version **StorageVersion(4)**.
2023-12-05 08:50:53.522  INFO main runtime::frame-support: ⚠️ **Ethereum** declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `NoStorageVersionSet`

TODO

For the following 5 pallets, only two require action:

  • XCM related pallets
  • Balances
  • Ethereum
  • OrmlRegistry
  • PriceOracleMembership

✅ XCM related pallets

No action required, error message will be gone by upgrading to Polkadot v1.0.0+.

These were upgraded as part of the 1020 upgrade: https://github.com/centrifuge/centrifuge-chain/pull/1522/files#diff-a23bc93c9cdd2a38e36a62edebd1ada7b653b375374674590717116f2e368b32

Apparently, we upgraded to a newer version than marked in the pallet version which we are currently using as dependency.

Example: dmp-queue

🚧 Balances v0 -> v1

Action required: Apply migration

https://github.com/paritytech/substrate/pull/12840/files

🚧 ORML Registry v0 -> v2

Action required: Bump storage versions

AFAICT, we have already executed the v2 migration as part of our 1020 Centrifuge Chain upgrade: https://github.com/centrifuge/centrifuge-chain/pull/1522/files#diff-a23bc93c9cdd2a38e36a62edebd1ada7b653b375374674590717116f2e368b32

pallet_ethereum v0 vs NoStorageVersionSet

No action required, because the pallet has not been versioned.

/// If the storage_version attribute isn't given
/// this is set to [NoStorageVersionSet] to inform the user that the attribute is missing.
/// This should prevent that the user forgets to set a storage version when required. However,
/// this will only work when the user actually tries to call [Self::current_storage_version]
/// to compare it against the [Self::on_chain_storage_version]. If the attribute is given,
/// this will be set to [StorageVersion].

PriceOracleMembership

No action required because dependency will be dropped soon.

How will this affect the code base

Increased security

What are foreseen obstacles or hurdles to overcome?

  • Migrations needed, at least for bumping the StorageVersion
  • Some of these might have been executed already without us having bumped the storage version
@wischli wischli added I3-annoyance The code behaves as expected, but "expected" is an issue. I9-release A specific release. P5-soon Issue should be addressed soon. labels Dec 5, 2023
@wischli wischli added this to the Centrifuge 1025 milestone Dec 11, 2023
@wischli wischli self-assigned this Jan 30, 2024
@lemunozm
Copy link
Contributor

lemunozm commented Feb 22, 2024

Important note. OrderBook needs to close its current order before applying 1025. Is this something that we can do already?

@lemunozm
Copy link
Contributor

Is this already complete right? @wischli

@wischli
Copy link
Contributor Author

wischli commented Mar 13, 2024

Is this already complete right? @wischli

Yes, fixed by #1747

@wischli wischli closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I3-annoyance The code behaves as expected, but "expected" is an issue. I9-release A specific release. P5-soon Issue should be addressed soon.
Projects
None yet
Development

No branches or pull requests

2 participants