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

chain-spec/presets reference docs added #4678

Merged
merged 17 commits into from
Jun 4, 2024
Merged

Conversation

michalkucharczyk
Copy link
Contributor

@michalkucharczyk michalkucharczyk commented Jun 3, 2024

Added reference doc about:

  • the pallet genesis config and genesis build,
  • runtime genesis-builder API,
  • presets,
  • interacting with the chain-spec-builder tool

I've added minimal runtime to demonstrate above topics.

I also sneaked in some little improvement to chain-spec-builder which allows to parse output of the list-presets command.

@michalkucharczyk michalkucharczyk changed the title chain-spec reference docs added chain-spec/prestets reference docs added Jun 3, 2024
@michalkucharczyk michalkucharczyk changed the title chain-spec/prestets reference docs added chain-spec/presets reference docs added Jun 3, 2024
@skunert skunert self-requested a review June 3, 2024 12:29
@michalkucharczyk michalkucharczyk requested review from a team and kianenigma June 3, 2024 12:29
@michalkucharczyk michalkucharczyk added R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation. labels Jun 3, 2024
Co-authored-by: Alexandru Vasile <[email protected]>
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6383640

@michalkucharczyk michalkucharczyk requested a review from a team June 3, 2024 15:22
const CHAIN_SPEC_BUILDER_PATH: &str = "../../../../../target/release/chain-spec-builder";

fn get_chain_spec_builder_path() -> &'static str {
// dev-dependencies do not build binary. So let's do the naive work-around here:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been brainstorming with how e can format this nicely into the docs with @rzadp, and the outcome is sam0x17/docify#26

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, this is a superb documentation, very aligned with how it should be.

I hope you can testify that writing this is mostly writing new e2e tests that in general ensure the code you are writing is correct. The doc part is a small part of it that we extract.

I hope to see more important APIs to be written like this from day-zero, with documentation in mind. A lot of the e2e testing and then actually live inside the polkadot-sdk-docs crate.

Some nitpicks pointed out, but all in all looks great.

This motivates me also bring #3946 up to date and merge it.

docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/chain_spec_genesis.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@skunert skunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@michalkucharczyk michalkucharczyk added this pull request to the merge queue Jun 4, 2024
Merged via the queue into master with commit 42ddb5b Jun 4, 2024
155 of 156 checks passed
@michalkucharczyk michalkucharczyk deleted the mku-chain-spec-guide branch June 4, 2024 18:31
hitchhooker pushed a commit to ibp-network/polkadot-sdk that referenced this pull request Jun 5, 2024
Added reference doc about:
- the pallet genesis config and genesis build, 
- runtime `genesis-builder` API,
- presets,
- interacting with the `chain-spec-builder` tool

I've added [minimal
runtime](https://github.com/paritytech/polkadot-sdk/tree/mku-chain-spec-guide/docs/sdk/src/reference_docs/chain_spec_runtime)
to demonstrate above topics.

I also sneaked in some little improvement to `chain-spec-builder` which
allows to parse output of the `list-presets` command.

---------

Co-authored-by: Alexandru Vasile <[email protected]>
Co-authored-by: Sebastian Kunert <[email protected]>
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Added reference doc about:
- the pallet genesis config and genesis build, 
- runtime `genesis-builder` API,
- presets,
- interacting with the `chain-spec-builder` tool

I've added [minimal
runtime](https://github.com/paritytech/polkadot-sdk/tree/mku-chain-spec-guide/docs/sdk/src/reference_docs/chain_spec_runtime)
to demonstrate above topics.

I also sneaked in some little improvement to `chain-spec-builder` which
allows to parse output of the `list-presets` command.

---------

Co-authored-by: Alexandru Vasile <[email protected]>
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
Labels
R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants