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

Sane pallet genesis state defaults #2713

Closed
liamaharon opened this issue Dec 14, 2023 · 1 comment · Fixed by #3412
Closed

Sane pallet genesis state defaults #2713

liamaharon opened this issue Dec 14, 2023 · 1 comment · Fixed by #3412
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@liamaharon
Copy link
Contributor

Our benchmarks are written under the assumption that the runtime genesis state is sane.

This works fine when using the old chain spec CLI, where we explicitly specify sane genesis state for our runtimes.

However the new chain-spec-builder uses the Default value for each pallets genesis state. Many of the Defaults are incoherent and cause immediate runtime panicing, so the chain spec requires lots of non-trivial manual modification to get working.

We need to

  1. Fix Default implementations for our pallet genesis state so they are sane and suitable at least for benchmarking
  2. Add CI to ensure we chain specs built with the new builder (therefore also Default configs) can be used for benchmarking purposes
@liamaharon liamaharon added I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. labels Dec 14, 2023
bkchr added a commit to polkadot-fellows/runtimes that referenced this issue Jan 17, 2024
…ss (#127)

Closes #50

- Adds the `chain-spec-generator` from
#78 and
#81, updated to work
with `master`.
- Adds detailed instructions to the `README.md` for generating weights
for fellowship runtimes

I am currently generating weights and will add them in a seperate PR
when they are ready.

TODO
- [x] Add step for checking weight outputs using
https://github.com/ggwpez/substrate-weight-compare in readme
- [ ] Fix encointer chain spec defaults, or open new issue for it

### Why not use the `polkadot-sdk` generic chain-spec-builder?

The genesis state configs generated by this CLI are unusable for
benchmarking, due to poor defaults. We need better defaults for our
pallet genesis state before we can use this CLI. See also
paritytech/polkadot-sdk#2713.

---------

Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: NachoPal <ignacio.palacios.santos@gmail.com>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
@ggwpez
Copy link
Member

ggwpez commented Feb 20, 2024

Hitting this again as part of #2664
It will implicitly add a CI check since the benchmarks fail otherwise.

github-merge-queue bot pushed a commit that referenced this issue Feb 22, 2024
Closes #2713

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this issue Mar 25, 2024
Closes paritytech#2713

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants