-
Notifications
You must be signed in to change notification settings - Fork 696
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
Only customized fields in preset json blob? #5700
Comments
8 tasks
some proposal from #5327 discussion: #5327 (comment) |
bkontur
added
A4-needs-backport
Pull request must be backported to all maintained releases.
and removed
A4-needs-backport
Pull request must be backported to all maintained releases.
labels
Sep 13, 2024
|
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 22, 2024
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: - [x] pallet `assigned_slots` fix missing `#[serde(skip)]` for phantom - [x] pallet `paras_inherent` benchmark fix - cherry-picked from #5688 - [x] migrates `get_preset` to the relevant runtimes - [x] fixes Rococo genesis presets - does not work https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7317249 - [x] fixes Rococo benchmarks for CI - [x] migrate westend genesis - [x] remove wococo stuff Closes: #5680 ## Follow-ups - Fix for frame-omni-bencher #5655 - Enable new short-benchmarking CI - #5706 - Remove gitlab pipelines for short benchmarking - refactor all Cumulus runtimes to use `get_preset` - #5704 - #5705 - #5700 - [ ] Backport to the stable --------- Co-authored-by: command-bot <> Co-authored-by: ordian <[email protected]>
bkontur
added a commit
that referenced
this issue
Sep 22, 2024
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: - [x] pallet `assigned_slots` fix missing `#[serde(skip)]` for phantom - [x] pallet `paras_inherent` benchmark fix - cherry-picked from #5688 - [x] migrates `get_preset` to the relevant runtimes - [x] fixes Rococo genesis presets - does not work https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7317249 - [x] fixes Rococo benchmarks for CI - [x] migrate westend genesis - [x] remove wococo stuff Closes: #5680 - Fix for frame-omni-bencher #5655 - Enable new short-benchmarking CI - #5706 - Remove gitlab pipelines for short benchmarking - refactor all Cumulus runtimes to use `get_preset` - #5704 - #5705 - #5700 - [ ] Backport to the stable --------- Co-authored-by: command-bot <> Co-authored-by: ordian <[email protected]> (cherry picked from commit 8735c66)
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 25, 2024
This PR adds `build_struct_json_patch` which helps to generate a JSON used for preset. Here is doc and example: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/substrate/frame/support/src/generate_genesis_config.rs#L168-L266 And real-world usage: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs#L37-L61 Closes #5700 --------- Co-authored-by: Sebastian Kunert <[email protected]>
mordamax
pushed a commit
to paritytech-stg/polkadot-sdk
that referenced
this issue
Oct 29, 2024
This PR adds `build_struct_json_patch` which helps to generate a JSON used for preset. Here is doc and example: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/substrate/frame/support/src/generate_genesis_config.rs#L168-L266 And real-world usage: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs#L37-L61 Closes paritytech#5700 --------- Co-authored-by: Sebastian Kunert <[email protected]>
mordamax
pushed a commit
to paritytech-stg/polkadot-sdk
that referenced
this issue
Oct 29, 2024
This PR adds `build_struct_json_patch` which helps to generate a JSON used for preset. Here is doc and example: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/substrate/frame/support/src/generate_genesis_config.rs#L168-L266 And real-world usage: https://github.com/paritytech/polkadot-sdk/blob/d868b858758d3886d16c8ba8feb3c93c188044f3/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs#L37-L61 Closes paritytech#5700 --------- Co-authored-by: Sebastian Kunert <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably not super important, but wanted to know your opinion on that, so I am leaving it here for your consideration.
This is about how to provide preset's JSON and what is potential outcome.
There are two approaches.
JSON blob, containing only overridden fields
and second:
full `RuntimeGenesisConfig` blob, containing defaults and overwritten fields:
When we generate two two runtime wasm blobs using two above approaches, and then we use
chain-spec-builder display-preset
util to get the json preset representation, and we display the diff, we will get following:So the preset constructed from the full
RuntimeGenesisConfig
struct contains some fields that are just defaults and were not actually customized.In practice, in most cases that should not matter, but it potentially may lead to some strange behavior - e.g. imagine fetching the preset to the file, then using it to against different runtime version (e.g. newer version with
transactionPayment::multiplier
updated) where defaults are changed may lead to some strange situation.On the other hand - using JSON approach may lead to invalid JSON (and we would addition coverage in tests).
tagging @kianenigma , @bkchr.
Originally posted by @michalkucharczyk in #5327 (comment)
The text was updated successfully, but these errors were encountered: