-
Notifications
You must be signed in to change notification settings - Fork 645
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
Moved presets to the testnet runtimes #5327
base: master
Are you sure you want to change the base?
Conversation
63d05be
to
932e369
Compare
@michalkucharczyk I just saw your branch What if I update this branch to actual |
932e369
to
80475ff
Compare
Can we just merge my PR to master (as it is ready to be merged) and then you can merge master to this PR? |
testnet_parachains_constants::westend::currency::UNITS * 1_000_000, | ||
1000.into(), | ||
)) | ||
.with_genesis_config_patch(asset_hub_westend_development_genesis(para_id.into())) |
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.
You shall use: with_genesis_config_preset_name
.
This would allow to fetch the preset from the wasm blob, w/o necessity to natively compile the runtime.
I noticed the same in polkadot-fellows/runtimes#379 (review)
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.
yes, I saw that fellows comment, it is still in my TODOs :)
ok, let's merge your and I will adjust and continue here with other testnets |
Thank you |
Not sure if you are interested - there is one more I plan to merge soon: #4739 |
89133a0
to
493ad6b
Compare
The CI pipeline was cancelled due to failure one of the required jobs. |
The CI pipeline was cancelled due to failure one of the required jobs. |
493ad6b
to
4ae31df
Compare
bot fmt |
@bkontur https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7214774 was started for your command Comment |
@bkontur Command |
cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs
Outdated
Show resolved
Hide resolved
e96f540
to
24d28ae
Compare
bc435cd
to
8238baf
Compare
b95e603
to
c35a621
Compare
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.
understood, although I think we could migrate rococo/westend already to omni anyways, as only some of the bridge ones fail until those fix?
@michalkucharczyk I could possibly also revert using |
Honestly, I don't know. |
cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs
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.
LGTM.
Would be nice to add some tests verifying that presets are actually convertible to genesis storage - sample approach given here:
fn build_config_from_json_works() { |
But this could be done in follow-up, especially in context of #5700.
get_preset
to the testnet runtimes@@ -66,6 +66,10 @@ pub type PresetId = sp_runtime::RuntimeString; | |||
/// [`GenesisBuilder`] interface. | |||
pub const DEV_RUNTIME_PRESET: &'static str = "development"; | |||
|
|||
/// The default `local-testnet` preset used to communicate with the runtime via | |||
/// [`GenesisBuilder`] interface. | |||
pub const LOCAL_TESTNET_RUNTIME_PRESET: &'static str = "local_testnet"; |
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.
Sorry for nit-picking: maybe it would good to add some note on which preset is mandatory and which is optional? (Having these predefined names maybe somewhat confusing for runtime's maintainer in terms what is actually needed and how it will be used).
Seems that we kinda require "development" (e.g. for benchmarking, perhaps for omni-node - not sure what is the status there?).
And "local_testnet" is just for "our" runtimes? Not really required anywhere in generic tools?
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 see those constants as a unified good common "examples". It is hard to say which is mandatory or optional here.
I mean, the module sp-genesis-builder
does not even know that some frame-omni-bencher
exists and uses those constants.
It is a first step for switching to the
frame-omni-bencher
for CI.This PR includes several changes related to generating chain specs plus:
assigned_slots
fix missing#[serde(skip)]
for phantomparas_inherent
benchmark fix - cherry-picked from fix rococo-dev bench #5688get_preset
to the relevant runtimesCloses: #5680
Follow-ups
frame-omni-bencher
#5706get_preset
- Refactorpolkadot-parachain-bin
chain-specs for cumulus runtimes and move genesis presets to the runtimesget_preset
#5704get_account_id_from_seed
/get_from_seed
to one common place #5705