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

Retrieve state_version from WASM in export-genesis-state subcommand #3164

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

manuelmauro
Copy link
Contributor

What does it do?

Retrieve state_version from WASM blob in export-genesis-state subcommand.

What important points should reviewers know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@manuelmauro manuelmauro self-assigned this Jan 30, 2025
Copy link
Contributor

github-actions bot commented Jan 30, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2416 KB (no changes) 🚨

Moonbeam runtime: 2408 KB (no changes) 🚨

Moonriver runtime: 2384 KB (no changes) ✅

Compared to latest release (runtime-3500)

Moonbase runtime: 2416 KB (+464 KB compared to latest release) 🚨

Moonbeam runtime: 2408 KB (+472 KB compared to latest release) 🚨

Moonriver runtime: 2384 KB (+448 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Jan 30, 2025

Coverage Report

@@                            Coverage Diff                            @@
##           master   manuel/define-state-version-from-wasm      +/-   ##
=========================================================================
- Coverage   74.52%                                  74.51%   -0.01%     
  Files         380                                     380              
+ Lines       96102                                   96103       +1     
=========================================================================
  Hits        71611                                   71611              
+ Misses      24491                                   24492       +1     
Files Changed Coverage
/node/cli/src/cli.rs 30.00% (+0.33%) 🔼
/node/cli/src/command.rs 17.03% (-0.05%) 🔽

Coverage generated Mon Feb 10 11:19:44 UTC 2025

@manuelmauro manuelmauro added D3-trivial PR contains trivial changes in a runtime directory that do not require an audit D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. B0-silent Changes should not be mentioned in any release notes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes not-breaking Does not need to be mentioned in breaking changes and removed D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. B0-silent Changes should not be mentioned in any release notes labels Feb 3, 2025
@manuelmauro manuelmauro marked this pull request as ready for review February 3, 2025 08:51
@manuelmauro manuelmauro requested review from a team as code owners February 3, 2025 08:51
Comment on lines +423 to +426
let state_version = sc_chain_spec::resolve_state_version_from_wasm::<
_,
HashingFor<Block>,
>(&storage, &executor)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running moonbeam export-genesis-state --chain moonriver, the expected state_version is StateVersion::V1, but it returns StateVersion::V0.

I think the issue is on the executor.

@manuelmauro manuelmauro marked this pull request as draft February 10, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants