-
Notifications
You must be signed in to change notification settings - Fork 836
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 presets for glutton westend #7481
add genesis presets for glutton westend #7481
Conversation
/cmd prdoc --audience runtime_dev --bump minor |
cumulus/parachains/runtimes/glutton/glutton-westend/src/genesis_config_presets.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clangenb also please clean cumulus/polkadot-parchain/src/chain_spec/glutton.rs
Hmm, I don't think this is a good idea, polkadot-parachain-bin CLI wants to extract the para-id from the command, see
But we can't do this with the genesis presets, as the para-id is hardcoded. So I think I should only clean this up, if we decide to remove the option for passing custom para-ids from the CLI. What is your take on this? |
…s_config_presets.rs Co-authored-by: Branislav Kontur <bkontur@gmail.com>
I see, so you don't need to use
at least we will use one source of this genesis, and it should be ok, while we are referencing the |
Ahh, damn you are right. I could have thought of this too. Thanks. 🚀 |
/cmd prdoc --audience runtime_dev --bump minor |
Command "prdoc --audience runtime_dev --bump minor" has failed ❌! See logs here |
/cmd prdoc --audience runtime_dev --bump minor --force |
…bump minor --force'
PR is ready for more reviews. 🚀 |
…stend-genesis-presets # Conflicts: # Cargo.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're aiming to deprecate the use of polkadot-parachain
with its hardcoded list of runtimes in favour of the omni-node anyway, which just takes the runtime wasm and other configs as arguments. You always need to recompile the wasm to change the para id in the presets though.
Cool, thanks for the reviews! I guess we can add this to the merge queue if someone could add a label? |
.with_genesis_config_patch( | ||
glutton_westend_runtime::genesis_config_presets::glutton_westend_genesis( | ||
authorities, | ||
para_id, | ||
), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you not using the preset here? Why are you calling the code from the runtime here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the current implementation wants to pass the para-id from the CLI, but the presets have a hardcoded para-id (see above discussion). If this is no longer the desired behaviour I am happy to change it.
Only glutton has this behaviour, and I remember that some wanted to launch many gluttons on one relay chain for stress testing. So I thought it should remain like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw the comments above. Maybe we need some with_genesis_config_patch_and_preset
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, ideally if presets/more patches could be stacked.
But also GenesisConfigBuilderRuntimeCaller::get_named_preset
could be called to get preset from wasm, and then simply merge the patch:
crate::json_patch::merge(&mut config, json!({... para_id}));
And use merged output in ChainSpecBuilder::with_genesis_config_patch
.
That flow would avoid call into the native runtime.
cbc9b90
/tip medium |
The referendum has appeared on Polkassembly. |
Extracted from #7473.
Part of: #5704.