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

Polkadot OmniNode Docs #6094

Merged
merged 34 commits into from
Oct 23, 2024
Merged

Polkadot OmniNode Docs #6094

merged 34 commits into from
Oct 23, 2024

Conversation

kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Oct 16, 2024

provides low-level documentation on how the omni-node is meant to work. This is meant to act as reusable material for other teams (e.g. Papermoon and W3F) to use and integrate into the high level Polkadot documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to focus on the following crates, all of which got a bit of love in this PR:

  1. sp-genesis-builder
  2. polkadot-omni-node
  3. polkadot-omni-node-lib
  4. frame-omni-bencher

On top of this, we have now:

  • polkadot_sdk_docs::guides contains two new steps demonstrating the most basic version of composing your pallet, putting it into a runtime, and putting that runtime into omni-node
  • polkadot_sdk_docs::reference_docs::omni_node to explain in more detail how omni-node differs from the old-school node.
  • polkadot_sdk_docs::reference_docs::frame_weight_benchmarking to finally have a minimal reference about weights and benchmarking.
  • It provides tests for some of the steps in polkadot-omni-node Meta: Tutorials and reference docs.  #5568

closes #5568
closes #4781

Next steps

  • Ensure the README of the parachain template is up-to-date. @iulianbarbu
  • Readme for polkadot-omni-node and similar is updated. For now, use cargo-readme and copy over the rust-docs.

To build the branch locally and run this: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/umbrella_crate.rs Outdated Show resolved Hide resolved
substrate/primitives/genesis-builder/src/lib.rs Outdated Show resolved Hide resolved
@@ -76,6 +76,8 @@ fn local_testnet_genesis() -> Value {
],
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect(),
Sr25519Keyring::Alice.to_account_id(),
// TODO: this is super opaque, how should one know they should configure this? add to
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we mention it in an issue to avoid forgetting about it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, @iulianbarbu I believe this is something that should be covered in the parachain template docs/README, can you note it please?

Copy link
Contributor

Choose a reason for hiding this comment

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

Noted!

Copy link
Contributor

@michalkucharczyk michalkucharczyk left a comment

Choose a reason for hiding this comment

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

Left some nits. Will do one more round.

cumulus/polkadot-omni-node/lib/src/lib.rs Outdated Show resolved Hide resolved
substrate/primitives/genesis-builder/src/lib.rs Outdated Show resolved Hide resolved
substrate/primitives/genesis-builder/src/lib.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Show resolved Hide resolved
@kianenigma kianenigma added R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation. labels Oct 21, 2024
@@ -76,6 +76,8 @@ fn local_testnet_genesis() -> Value {
],
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect(),
Sr25519Keyring::Alice.to_account_id(),
// TODO: this is super opaque, how should one know they should configure this? add to
Copy link
Contributor

Choose a reason for hiding this comment

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

Noted!

docs/sdk/src/guides/your_first_node.rs Show resolved Hide resolved
Comment on lines +59 to +60
//! --para-id 42 \
//! --relay-chain dontcare \
Copy link
Contributor

@iulianbarbu iulianbarbu Oct 22, 2024

Choose a reason for hiding this comment

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

Haven't seen these flags in the latest chain-spec-builer version (e.g. chain-spec-builder create help). I think it would be great to add these flags in a follow-up (so creating an issue to track it would be great). By then, my approach in the templates docs was to add the flags "manually" post chain_spec.json generation with (not the greatest UX for now but we can iterate later):

jq '. + {"relay_chain": "rococo-local", "para_id": 1000 }' <path/to/chain_spec.json> > tmp.json && mv tmp.json <path/to/chain_spec.json>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you using the latest version of the chain-spec-builer

Quite possibly, it is because the PR with the change that added this flag is not released yet.

In general, we can either merge this PR speculatively, or freeze it until the first RC is out.

@ggwpez @EgorPopelyaev at which stage in the new release process do we publish the binaries to crates.io?

Copy link
Contributor

Choose a reason for hiding this comment

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

Quite possibly, it is because the PR with the change that added this flag is not released yet.

Indeed. Leaving this unresolved to clarify how the publishing of the binaries happen.

docs/sdk/src/guides/your_first_node.rs Show resolved Hide resolved
docs/sdk/src/guides/your_first_runtime.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
docs/sdk/src/reference_docs/omni_node.rs Outdated Show resolved Hide resolved
kianenigma and others added 3 commits October 22, 2024 13:44
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
kianenigma and others added 2 commits October 23, 2024 13:11
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
kianenigma and others added 3 commits October 23, 2024 14:00
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
@kianenigma
Copy link
Contributor Author

@kianenigma: random thoughts: we have this substrate binary section out there, I have a feeling that it would be good to put the link to omni-node there. Techincally it is not a substrate product - but IMO still worth linking there. And we could also put a link in cumulus overview. wdyt?

This is a great suggestion! I will actually reword this at the top level now, under polkadot-sdk

@kianenigma kianenigma added this pull request to the merge queue Oct 23, 2024
Merged via the queue into master with commit fc486e5 Oct 23, 2024
194 of 196 checks passed
@kianenigma kianenigma deleted the kiz-omni-node-docs branch October 23, 2024 16:49
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 29, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 29, 2024
provides low-level documentation on how the omni-node is meant to work.
This is meant to act as reusable material for other teams (e.g.
Papermoon and W3F) to use and integrate into the high level Polkadot
documentation.

Broadly speaking, for omni-node to have great rust-docs, we need to
focus on the following crates, all of which got a bit of love in this
PR:

1. `sp-genesis-builder`
2. `polkadot-omni-node`
3. `polkadot-omni-node-lib`
4. `frame-omni-bencher`

On top of this, we have now: 

* `polkadot_sdk_docs::guides` contains two new steps demonstrating the
most basic version of composing your pallet, putting it into a runtime,
and putting that runtime into omni-node
* `polkadot_sdk_docs::reference_docs::omni_node` to explain in more
detail how omni-node differs from the old-school node.
* `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to
finally have a minimal reference about weights and benchmarking.
* It provides tests for some of the steps in
paritytech#5568


closes paritytech#5568
closes paritytech#4781

Next steps

- [x] Ensure the README of the parachain template is up-to-date.
@iulianbarbu
- [ ] Readme for `polkadot-omni-node` and similar is updated. For now,
use `cargo-readme` and copy over the rust-docs.

To build the branch locally and run this:
https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
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.

polkadot-omni-node Meta: Tutorials and reference docs. document the nuances of DispatchResult
5 participants