-
Notifications
You must be signed in to change notification settings - Fork 4
feat: update docs for pop with latest changes #55
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5651569
feat: update docs for pop call chain
moliholy 7b4cf9a
feat: update docs about pop build spec
moliholy b772304
refactor: remove unused images
moliholy c41231d
feat: update pop build spec docs
moliholy be8cf90
feat: add instruction on how to install from brew
moliholy 06b61d9
refactor: address PR feedback
moliholy 129dcd0
fix: review feedback
moliholy 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
Binary file not shown.
Binary file removed
BIN
-312 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-05-09 at 7.31.17 PM.png
Binary file not shown.
Binary file removed
BIN
-96.2 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-05 at 5.03.46 PM.png
Binary file not shown.
Binary file removed
BIN
-65 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-06 at 4.04.37 PM.png
Binary file not shown.
Binary file removed
BIN
-300 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-18 at 3.56.34 PM.png
Binary file not shown.
Binary file removed
BIN
-113 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.14.37 AM.png
Binary file not shown.
Binary file removed
BIN
-212 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.17.59 AM.png
Binary file not shown.
Binary file removed
BIN
-349 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.23.53 AM.png
Binary file not shown.
Binary file removed
BIN
-169 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.37.32 AM.png
Binary file not shown.
Binary file removed
BIN
-214 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.38.09 AM.png
Binary file not shown.
Binary file removed
BIN
-305 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.38.50 AM.png
Binary file not shown.
Binary file removed
BIN
-143 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.39.09 AM.png
Binary file not shown.
Binary file removed
BIN
-191 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.45.44 AM.png
Binary file not shown.
Binary file removed
BIN
-286 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.46.09 AM.png
Binary file not shown.
Binary file removed
BIN
-145 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.46.30 AM.png
Binary file not shown.
Binary file removed
BIN
-174 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 11.50.18 AM.png
Binary file not shown.
Binary file removed
BIN
-817 KB
...-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 12.20.38 PM (1) (1).png
Binary file not shown.
Binary file removed
BIN
-817 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 12.20.38 PM (1).png
Binary file not shown.
Binary file removed
BIN
-178 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-24 at 2.21.37 PM.png
Binary file not shown.
Binary file removed
BIN
-80.6 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 11.59.52 AM.png
Binary file not shown.
Binary file removed
BIN
-114 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 12.06.57 PM.png
Binary file not shown.
Binary file removed
BIN
-76.8 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 3.15.11 PM.png
Binary file not shown.
Binary file removed
BIN
-76.2 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 3.18.17 PM.png
Binary file not shown.
Binary file removed
BIN
-257 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 3.23.15 PM.png
Binary file not shown.
Binary file removed
BIN
-107 KB
pop-cli-for-appchains/.gitbook/assets/Screenshot 2024-09-25 at 3.25.53 PM.png
Binary file not shown.
Oops, something went wrong.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,108 @@ | ||
| --- | ||
| description: Generate a plain chain specification and optional artifacts for your chain. | ||
| --- | ||
|
|
||
| # Build you Chain Spec | ||
|
|
||
| The chain specification ("chain spec") captures the initial state and configuration of your chain. Nodes use it to start | ||
| a network or to join and sync with an existing one. With Pop CLI you can generate a plain chain spec interactively or | ||
| non‑interactively, and optionally produce extra artifacts such as genesis state and wasm code, and even inject a | ||
| deterministically built runtime. | ||
|
|
||
| ## Interactive walkthrough | ||
|
|
||
| Run the command without arguments to be guided through all choices: | ||
|
|
||
| ```bash | ||
| pop build spec | ||
| ``` | ||
|
|
||
| This will prompt you for key values like output file name, parachain id, relay chain, chain type, protocol id, | ||
| properties, whether to generate genesis files, and whether to build and inject a deterministic runtime. | ||
|
|
||
| <figure><img src="../.gitbook/assets/build_spec.gif" alt="pop build spec"><figcaption></figcaption></figure> | ||
|
|
||
| > Tip: You can press Tab to accept defaults and type to filter list selections. | ||
|
|
||
| ### What you’ll typically provide | ||
|
|
||
| - Output file name/path for the plain spec (default: ./chain-spec.json) | ||
| - Parachain ID (default: 2000) | ||
| - Chain type (Development / Local / Live) | ||
| - Relay chain (paseo, westend, kusama, polkadot and their local variants) | ||
| - Protocol ID and optional properties (token symbol/decimals/SS58) | ||
| - Whether to also generate genesis state and genesis code files | ||
| - Optional: Build the runtime deterministically and inject it into the spec | ||
|
|
||
| ## Non‑interactive usage | ||
|
|
||
| Prefer to skip prompts? Provide flags up front. | ||
|
|
||
| ```bash | ||
| # Minimal example: write a plain chain spec | ||
| pop build spec -o ./chain-spec.json | ||
|
|
||
| # Provide basics explicitly | ||
| pop build spec -o ./chain-spec.json \ | ||
| --id 2000 \ | ||
| --type Local \ | ||
| --relay paseo \ | ||
| --protocol-id my-protocol \ | ||
| --properties "tokenSymbol=UNIT,decimals=12" | ||
|
|
||
| # Include build profile, features, and skip building binaries (if already built) | ||
| pop build spec -o ./chain-spec.json \ | ||
| --profile release \ | ||
| --features foo,bar \ | ||
| --skip-build | ||
|
|
||
| # Also generate genesis state and wasm code files alongside the spec | ||
| pop build spec -o ./chain-spec.json \ | ||
| --genesis-state \ | ||
| --genesis-code | ||
| ``` | ||
|
|
||
| ### Deterministic runtime build and injection (optional) | ||
|
|
||
| Pop CLI can build your runtime deterministically using srtool and inject the resulting wasm code into the chain spec | ||
| generation flow. | ||
|
|
||
| ```bash | ||
| # Minimal deterministic build example | ||
| pop build spec --deterministic --runtime ./runtime/mainnet | ||
|
|
||
| # Optionally specify the runtime package name used by srtool | ||
| # note: --package is only applicable when --deterministic is set | ||
| pop build spec --deterministic --runtime ./runtime/mainnet --package parachain-template-runtime | ||
| ``` | ||
|
|
||
| Notes about flags: | ||
|
|
||
| - You can now pass --runtime without --deterministic to pre-select the runtime directory for the command. This alone | ||
| will not trigger a deterministic build you must add --deterministic to enable srtool. | ||
| - The --package flag is available to explicitly set the runtime package name when doing a deterministic build; if | ||
| omitted, Pop CLI will infer it from the runtime directory. | ||
|
|
||
| > [!TIP] | ||
| > Omni-node-based chains: If your chain uses the community `polkadot-omni-node` host (ships only a runtime), you can still | ||
| use `pop build spec` the same way. Deterministic builds are recommended; Pop can also auto-source the | ||
| `polkadot-omni-node` binary when needed in related workflows. | ||
|
|
||
| ## Outputs | ||
|
|
||
| Depending on the flags used you’ll get: | ||
|
|
||
| - A plain chain spec JSON. | ||
| - Optionally, a raw chain spec JSON. | ||
| - Optionally, a genesis state file. | ||
| - Optionally, a genesis wasm code file. | ||
|
|
||
|
|
||
| #### Learning Resources | ||
|
|
||
| - 🧑🏫 Background on Polkadot/Parachains: wiki.polkadot.network | ||
| - 🧑🔧 srtool: https://github.com/paritytech/srtool | ||
|
|
||
| **Need help?** | ||
|
|
||
| Ask on Polkadot Stack Exchange (tag it `pop`) or drop by our Telegram: https://t.me/onpopio. We're here to help! |
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.