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

Extend logic of managing storage version at humanode-runtime #1332

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

dmitrylavrenov
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov commented Nov 15, 2024

The goal is to extend #1305 that allows to properly init storage version for substrate related pallets in addition to humanode pallets.

As a follow up of #1315 (comment).

Needs for #940

Tested

2024-11-15 14:14:42.703  INFO main humanode_runtime::storage_version_initializer: DummyPrecompilesCode: Initializing an unset on-chain storage version to StorageVersion(1), assuming the effective state version is the latest pallet version    
2024-11-15 14:14:42.703  INFO main humanode_runtime::storage_version_initializer: BalancedCurrencySwapBridgesInitializer: Initializing an unset on-chain storage version to StorageVersion(1), assuming the effective state version is the latest pallet version

@dmitrylavrenov dmitrylavrenov changed the title Properly manage storage version at humanode-runtime for some pallets Extend logic of managing storage version at humanode-runtime Nov 15, 2024
@dmitrylavrenov dmitrylavrenov marked this pull request as ready for review November 18, 2024 16:33
@dmitrylavrenov dmitrylavrenov force-pushed the runtime-upgrade-init-storage-version branch from 9715f32 to ad3e821 Compare November 18, 2024 18:02
@MOZGIII
Copy link
Contributor

MOZGIII commented Nov 18, 2024

Note that with this mode of operation, we could also select what the version to set is explicitly instead of assuming the current version; I'm thinking something like passing storage_version_initializer::StorageVersionInitializer<DummyPrecompilesCode, Runtime, ExplicitVersion<123>>, and for the current mode of operation storage_version_initializer::StorageVersionInitializer<DummyPrecompilesCode, Runtime, CurrentPalletVersion>,

This is a potential improvement for this logic that we don't need in this PR - we can postpone it for later, potentially forever.

@dmitrylavrenov dmitrylavrenov added this pull request to the merge queue Nov 19, 2024
Merged via the queue into master with commit 83d40c3 Nov 19, 2024
21 checks passed
@dmitrylavrenov dmitrylavrenov deleted the runtime-upgrade-init-storage-version branch November 19, 2024 13:44
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.

3 participants