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

Add genesis config presets to runtime #3138

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

manuelmauro
Copy link
Contributor

@manuelmauro manuelmauro commented Jan 17, 2025

What does it do?

When running run-benches-for-runtime.sh to generate the runtime weights, the following warning appears in the logs:

Using the chain spec instead of the runtime to generate the genesis state is deprecated. Please remove the `--chain`/`--dev`/`--local` argument, point `--runtime` to your runtime blob and set `--genesis-builder=runtime`. This warning may become a hard error any time after December 2024. 

This PR updates the script to use --runtime <runtime> instead of --chain=<chain-spec>.

In order to address the issue above, we need move the creation of the genesis config presets to the runtime. (Example PR on polkadot-sdk)

What important points reviewers should 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?

Copy link
Contributor

github-actions bot commented Jan 17, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2412 KB (no changes) 🚨

Moonbeam runtime: 2404 KB (no changes) 🚨

Moonriver runtime: 2400 KB (no changes) ✅

Compared to latest release (runtime-3401)

Moonbase runtime: 2412 KB (+380 KB compared to latest release) 🚨

Moonbeam runtime: 2404 KB (+392 KB compared to latest release) 🚨

Moonriver runtime: 2400 KB (+388 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Jan 17, 2025

Coverage Report

@@                                Coverage Diff                                 @@
##           master   manuel/update-deprecation-in-benchmarks-script      +/-   ##
==================================================================================
+ Coverage   74.58%                                           74.59%   +0.01%     
+ Files         377                                              380       +3     
+ Lines       96042                                            96064      +22     
==================================================================================
+ Hits        71632                                            71656      +24     
- Misses      24410                                            24408       -2     
Files Changed Coverage
/node/cli/src/command.rs 16.94% (+0.02%) 🔼
/node/service/src/chain_spec/moonbase.rs 79.28% (+0.97%) 🔼
/node/service/src/chain_spec/moonbeam.rs 32.04% (+20.00%) 🔼
/node/service/src/chain_spec/moonriver.rs 32.04% (+20.00%) 🔼
/runtime/common/src/apis.rs 29.21% (+0.36%) 🔼
/runtime/moonbase/src/lib.rs 50.50% (+0.16%) 🔼
/runtime/moonbeam/src/lib.rs 44.71% (+0.28%) 🔼
/runtime/moonriver/src/lib.rs 44.93% (+0.28%) 🔼

Coverage generated Thu Jan 23 16:29:09 UTC 2025

@manuelmauro manuelmauro changed the title Update deprecation in benchmarks script Update deprecated option in benchmarks script Jan 20, 2025
@manuelmauro manuelmauro changed the title Update deprecated option in benchmarks script Add genesis config presets to runtime Jan 23, 2025
@manuelmauro manuelmauro added the B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes label Jan 23, 2025
@manuelmauro manuelmauro self-assigned this Jan 23, 2025
@manuelmauro manuelmauro marked this pull request as ready for review January 23, 2025 10:33
@manuelmauro manuelmauro requested review from a team as code owners January 23, 2025 10:33
@manuelmauro manuelmauro added not-breaking Does not need to be mentioned in breaking changes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit labels Jan 23, 2025
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