-
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
templates: make node compilation optional #5954
Merged
kianenigma
merged 83 commits into
paritytech:master
from
iulianbarbu:ib-make-node-compilation-optional
Nov 4, 2024
Merged
Changes from 78 commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
29c9d09
templates: make node compilation optional
iulianbarbu 0488023
don't add default-members for solochain
iulianbarbu a9fb4fe
remove extra spaces
iulianbarbu b20001c
added zombienet tests for omni node
iulianbarbu 6a7946a
assert on the finality instead
iulianbarbu dae9b73
omni-node: remove in/out peers limitation
iulianbarbu 5af79ea
Merge branch 'master' of github.com:paritytech/polkadot-sdk into ib-m…
iulianbarbu 8e2450d
explained how to run minimal in multi-node setup
iulianbarbu b75bff2
Revert "omni-node: remove in/out peers limitation"
iulianbarbu e9ba647
polish minimal template docs
iulianbarbu 67bc652
more polish to the docs
iulianbarbu f0232c4
add parachain id const
iulianbarbu 73695bd
more docs polishing
iulianbarbu 62c4a49
add prdoc
iulianbarbu 868302d
Merge branch 'master' into ib-make-node-compilation-optional
iulianbarbu e1cbdfe
fix md checks
iulianbarbu 3418a41
fix md to pass checker
iulianbarbu d02f136
remove line
iulianbarbu d0e7ee0
fix parachain id type
iulianbarbu 94d6d0d
more polish to the READMEs
iulianbarbu 16738e5
even more polish
iulianbarbu 716b440
self review fixes
iulianbarbu adb3f92
fix clippy
iulianbarbu 2ada6af
fix more clippy
iulianbarbu 707e28c
more clippy fix
iulianbarbu a877784
finally fixed clippy
iulianbarbu 245f7db
reorganizing sections and fixing parachain omni node run
iulianbarbu d51387a
some more fixes after self review
iulianbarbu aed2d66
small clarification
iulianbarbu 6c5179e
fix markdown
iulianbarbu 99bff3e
remove Cargo.toml comment
iulianbarbu ef9543d
Merge branch 'master' into ib-make-node-compilation-optional
iulianbarbu fe6b93f
remove todo for adding links
iulianbarbu bd8d547
resolve conflicts
iulianbarbu c091f84
small polish
iulianbarbu e8cbb68
added templates Cargo.toml comments
iulianbarbu 3412c41
rlib is the default crate-type already
iulianbarbu 6b17432
add high-level usage docs to omni-node crate
iulianbarbu c2cc3f6
polish omni-node README & add chain-spec-builder README
iulianbarbu 0db0b59
fix capitalization
iulianbarbu ff56fc0
Update minimal README
iulianbarbu 9dfce4f
deduplicate polkadot img tag
iulianbarbu 69d213f
rever polkadot img tag removal
iulianbarbu 3486884
refactored template zombienet tests
iulianbarbu 58fd9bb
fix md and semvr
iulianbarbu cc4e036
fix fmt
iulianbarbu cc56e51
fix broken ToC links
iulianbarbu 145e622
not quite
iulianbarbu d3b16ab
updated minimal & parachain README
iulianbarbu b74eacf
fix parachain template links
iulianbarbu 9104370
fix typos
iulianbarbu ccad82f
chain spec builder README fixes
iulianbarbu 8f4a0c1
make minimal single-node focused
iulianbarbu a01d114
include README as doc str
iulianbarbu 24ec943
document chain-spec-builder and add doc tests too
iulianbarbu 231802c
polish docs tests display in README.md
iulianbarbu 37e43c0
made the links look better
iulianbarbu 62f757c
improve polkadot-omni-node README
iulianbarbu e7dfb68
disable docs tests
iulianbarbu 995af51
simplified tests after setting doctest to false
iulianbarbu 5ff577b
more minimal README updates
iulianbarbu 7326ee2
templates README installation sections updates
iulianbarbu 922ae7f
adjusted README importing and compilation
iulianbarbu 5b16b64
polish after michal review
iulianbarbu ef957f2
Merge branch 'master' into ib-make-node-compilation-optional
iulianbarbu f94402c
fixes after review
iulianbarbu e6c3ab4
fix generate readme
iulianbarbu ac3bba1
update wasm-builder docs
iulianbarbu 6f9c200
compile markdown simplifications
iulianbarbu 8b4884d
to remove: try clippy without cache
iulianbarbu d224db5
rever forklift but remove SKIP_WASM_BUILD
iulianbarbu 0a79b74
remove forklift again
iulianbarbu 51c1814
some more templates' READMEs fixes
iulianbarbu 92dbdd8
update minimal template README
iulianbarbu fa71ef5
Merge branch 'master' into ib-make-node-compilation-optional
iulianbarbu 46d0be7
fix clippy
iulianbarbu e6327ae
try one more time unsetting SKIP_WASM_BUILD
iulianbarbu 28583e2
just disable forklift
iulianbarbu 8ca2e65
temporary fix for doc tests disabling
iulianbarbu 256d932
rever forklift
iulianbarbu 8eed5a3
Merge branch 'master' into ib-make-node-compilation-optional
kianenigma 4126edb
upgrade docify to 0.2.9
iulianbarbu 9f4c95f
remove forklift based caching for clippy checks
iulianbarbu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Polkadot Omni Node | ||
|
||
This is a white labeled implementation based on [`polkadot-omni-node-lib`](https://crates.io/crates/polkadot-omni-node-lib). | ||
It can be used to start a parachain node from a provided chain spec file. It is only compatible with runtimes that use block | ||
number `u32` and `Aura` consensus. | ||
|
||
## Installation | ||
|
||
Download & expose it via `PATH`: | ||
|
||
```bash | ||
# Download and set it on PATH. | ||
wget https://github.com/paritytech/polkadot-sdk/releases/download/<stable_release_tag>/polkadot-omni-node | ||
chmod +x polkadot-omni-node | ||
export PATH="$PATH:`pwd`" | ||
``` | ||
|
||
Compile & install via `cargo`: | ||
|
||
```bash | ||
# Assuming ~/.cargo/bin is on the PATH | ||
cargo install polkadot-omni-node | ||
``` | ||
|
||
## Usage | ||
|
||
A basic example for an Omni Node run starts from a runtime which implements the [`sp_genesis_builder::GenesisBuilder`](https://docs.rs/sp-genesis-builder/latest/sp_genesis_builder/trait.GenesisBuilder.html). | ||
The interface mandates the runtime to expose a [`named-preset`](https://docs.rs/staging-chain-spec-builder/latest/staging_chain_spec_builder/#generate-chain-spec-using-runtime-provided-genesis-config-preset). | ||
|
||
iulianbarbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### 1. Install chain-spec-builder | ||
|
||
**Note**: `chain-spec-builder` binary is published on [`crates.io`](https://crates.io) under | ||
[`staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder) due to a name conflict. | ||
Install it with `cargo` like bellow : | ||
|
||
```bash | ||
cargo install staging-chain-spec-builder | ||
``` | ||
|
||
### 2. Generate a chain spec | ||
|
||
Omni Node expects for the chain spec to contain parachains related fields like `relay_chain` and `para_id`. | ||
These fields can be introduced by running [`staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder) | ||
with additional flags: | ||
|
||
```bash | ||
chain-spec-builder create --relay-chain <relay_chain_id> --para-id <id> -r <runtime.wasm> named-preset <preset_name> | ||
``` | ||
|
||
### 3. Run Omni Node | ||
|
||
And now with the generated chain spec we can start Omni Node like so: | ||
|
||
```bash | ||
polkadot-omni-node --chain <chain_spec.json> | ||
``` | ||
|
||
## Useful links | ||
|
||
* [`Omni Node Polkadot SDK Docs`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/omni_node/index.html) | ||
* [`Chain Spec Genesis Reference Docs`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/chain_spec_genesis/index.html) | ||
* [`polkadot-parachain-bin`](https://crates.io/crates/polkadot-parachain-bin) | ||
* [`polkadot-sdk-parachain-template`](https://github.com/paritytech/polkadot-sdk-parachain-template) | ||
* [`frame-omni-bencher`](https://crates.io/crates/frame-omni-bencher) | ||
* [`staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@EgorPopelyaev is this workflow called in the release process, or should we do it manually?
The person who made them has left, so a bit worried that it will go stale.
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.
It must be called manually: https://github.com/paritytech/polkadot-sdk/blob/master/.github/workflows/misc-sync-templates.yml#L18. I can do it after the release (or leave it to the release team if they handled it historically). We'll need to update this too: paritytech/polkadot-sdk-parachain-template#19.
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.
Created this #6329.