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

Properly manage default on chain storage version for pallets added after genesis #1305

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

dmitrylavrenov
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov commented Oct 22, 2024

During humanode-network development there are some pallets that were added after genesis to our runtime containing initial StorageVersion = 1:

During work on #940 the following changes have been acknowledged in substrate codebase - paritytech/substrate@9957da3. So, the following errors have been faced during try-runtime checks:

2024-10-22 18:38:43.021  INFO main runtime::frame-support: ⚠️ BalancedCurrencySwapBridgesInitializer declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`    
2024-10-22 18:38:43.021 ERROR main runtime::frame-support: BalancedCurrencySwapBridgesInitializer: On chain storage version StorageVersion(0) doesn't match current storage version StorageVersion(1).    
2024-10-22 18:38:43.021  INFO main runtime::frame-support: ⚠️ EvmBalancesErc20Support declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    
2024-10-22 18:38:43.021  INFO main runtime::frame-support: ⚠️ DummyPrecompilesCode declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`    
2024-10-22 18:38:43.021 ERROR main runtime::frame-support: DummyPrecompilesCode: On chain storage version StorageVersion(0) doesn't match current storage version StorageVersion(1).

The root cause has been discovered - paritytech/substrate#14641. Unfortunately, we should manually fix current storage versions in next runtime update.

@dmitrylavrenov dmitrylavrenov force-pushed the fix-storage-version branch 2 times, most recently from 73e6114 to b2fb581 Compare October 24, 2024 15:11
@dmitrylavrenov dmitrylavrenov added this pull request to the merge queue Oct 28, 2024
Merged via the queue into master with commit ca44d00 Oct 28, 2024
21 checks passed
@dmitrylavrenov dmitrylavrenov deleted the fix-storage-version branch October 28, 2024 14:09
dmitrylavrenov added a commit that referenced this pull request Nov 15, 2024
dmitrylavrenov added a commit that referenced this pull request Nov 18, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 19, 2024
* Add UpgradeInit for pallet-balanced.. at runtime

* Implement init storage version logic

* Apply InitStorageVersion at humanode-runtime

* Improve log messages

* Improve info message for init storage version logic

Co-authored-by: MOZGIII <[email protected]>

* Remove unused log

* Some renaming

* Revert "Properly manage default on chain storage version for pallets added after genesis (#1305)"

This reverts commit ca44d00.

---------

Co-authored-by: MOZGIII <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants