-
Notifications
You must be signed in to change notification settings - Fork 78
Add node infrastructure guides and restructure section #1246
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
base: staging/product-ia
Are you sure you want to change the base?
Conversation
- Add comprehensive guide for running system parachain RPC nodes - Covers People Chain, Bridge Hub, and Coretime Chain - Provides both Docker and systemd deployment options - Includes snapshot setup, monitoring, and security best practices - Add conclusion sections to RPC and collator guides - polkadot-hub-rpc.md: summarize benefits and next steps - system-parachain-rpc.md: highlight adaptability across system parachains - collator.md: emphasize operator role and responsibilities - Restructure documentation from nodes-and-validators to node-infrastructure
- Resolve conflict in .nav.yml by keeping 'Node Infrastructure' and adding 'Technical Reference' - Integrate latest changes from staging/product-ia
Update polkadot-omni-node from stable2506-4 to v1.20.2 and Rust from 1.86 to 1.91.1 in the system parachain RPC documentation. This ensures users are working with the latest stable releases. Changes: - Docker image: parity/polkadot-omni-node:v1.20.2 - Cargo package: polkadot-omni-node@0.11.0 - Rust toolchain: 1.91.1 All versions have been tested and verified to work correctly.
Resolve merge conflict in .nav.yml by keeping the Node Infrastructure navigation structure from this branch.
- Update Rust toolchain to 1.91.1 (from 1.86) - Update polkadot-omni-node to v0.11.0 for collator (from v0.5.0) - Update Docker image to v1.20.2 for RPC nodes (from stable2506-4) - Update chain-spec-builder to v14.0.0 (from v10.0.0) - Update AI-generated page files to reflect latest changes - Clean up old nodes-and-validators AI page files
dawnkelly09
left a comment
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.
Not done yet but wanted to surface a couple of questions for @brunopgalvao
|
|
||
| ## Complete Initial Sync | ||
|
|
||
| Your collator must sync both the relay chain and parachain before producing blocks. |
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.
I'm confused as to why we are telling them they must do this, but we give no steps/guidance as to how to do it. Is there a guide somewhere else we can at least point them toward?
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.
When they run the collator it will do this automatically.
|
|
||
| ## Install Dependencies | ||
|
|
||
| 1. Install Rust using the following commands: |
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.
Please clarify whether the user should run both of these Rust installation commands (# Install Rust vs # Install specific Rust version) or pick one or the other.
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.
Yes they should run all commands inside that snippet.
nhussein11
left a comment
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.
Left some comment for polkadot-hub-rpc page, but please check that most of them also apply to parachain-rpc.md
| ``` | ||
|
|
||
| The output will be similar to the following: | ||
| ```bash |
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.
This should be a termynal element
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.
artkaseman
left a comment
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.
Added some comments.
…nfra/running-a-collator
- Remove 9944/9615 from external firewall ports (localhost only) - Add pruning flags for para and relay chains (--blocks-pruning=256, --state-pruning=256) - Use --database=paritydb and --sync=fast for collators - Disable relay chain RPC with --rpc-port=0 - Add --pool-limit=0 for relay chain on collators - Replace archive-canonical with pruned relay chain config - Add chown root:root for binary ownership
|
Thanks @artkaseman - valuable feedback. Incorporated all your suggestions. |
| rm files.txt | ||
| ``` | ||
|
|
||
| **Relay chain pruned snapshot** (~200 GB): |
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.
So they should always use the pruned relay chain snapshot, even if they used the archived asset hub snapshot?
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.
Yes.
| # Check https://snapshots.polkadot.io/ for the latest snapshot URL | ||
| export SNAPSHOT_URL_ASSET_HUB="https://snapshots.polkadot.io/polkadot-asset-hub-rocksdb-prune/LATEST" |
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.
Can this be run separately from the rclone commands? Curious about this so I can possibly update formatting of this section.
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.
Yes it can. It's only use is for the rclone command though.
| sudo journalctl -u polkadot-hub-rpc -f | ||
| ``` | ||
|
|
||
| 7. You can use a few different commands to verify your node is running properly: |
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.
These commands can be used regardless of docker and systemd setup, right?
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.
The sudo journalctl... commands are systemd specific. The docker ... commands are ... docker specific.
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.
the ones I was talking about were curl commands 😆
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.
haha so yes for the curl commands, they apply for both docker and systemd setup.
eshaben
left a comment
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.
just looking for clarity on what steps are for what setup option (docker vs systemd)
| - **Docker-based Setup**: Best for simpler setup and maintenance | ||
| - **Manual/systemd Setup**: Best for production environments requiring more control | ||
|
|
||
| === "Docker Setup" |
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.
Are these steps required before generating a node key?
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.
No. Theses steps are part of installing dependencies that will be used later in this guide.
| sudo mkdir -p /var/lib/polkadot-collator | ||
| ``` | ||
|
|
||
| 2. Generate your node key using Docker with the following command: |
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.
This is the same regardless of whether the user wants to go with docker or systemd setup?
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.
Yes.
|
|
||
| Generate an account for on-chain transactions as follows: | ||
|
|
||
| 1. Generate an account key with `sr25519` scheme using the following command: |
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.
This is the same regardless of whether the user wants to go with docker or systemd setup?
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.
Yes.
|
|
||
| ## Create User and Directory Structure | ||
|
|
||
| 1. Create a dedicated user with the following command: |
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.
are these systemd-specific instructions?
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.
Nice catch. Updated to have a docker setup and a systemd setup
|
|
||
| ## Register Collator for Selection | ||
|
|
||
| System parachains use different collator selection mechanisms. Explore the following tabs to see how mechanisms compare and determine the most suitable mechanism for registering your collator. |
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.
most suitable mechanism? Is this right? It's not like the user gets to decide, right? Like the parachain defines how to register collators
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.
If my understanding is correct, I'm struggling with why we're listing out this information. Can't we just say these are some of the mechanisms seen in the wild, refer to your parachain's documentation to determine how to register your collator? I could maybe add specifics for like system parachains here and explicitly state they use invulnerables, right?
Even with the fellowship decisions, "Technical Fellowship may manage some system parachain collators" - this just seems a little vague to me. What are we trying to say?
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.
most suitable mechanism? Is this right? It's not like the user gets to decide, right? Like the parachain defines how to register collators
Correct, it is up to how the parachain is configured.
If my understanding is correct, I'm struggling with why we're listing out this information. Can't we just say these are some of the mechanisms seen in the wild, refer to your parachain's documentation to determine how to register your collator? I could maybe add specifics for like system parachains here and explicitly state they use invulnerables, right?
Yes. We can remove this information and say, consult the specific parachain's documentation for onboarding a collator.
Even with the fellowship decisions, "Technical Fellowship may manage some system parachain collators" - this just seems a little vague to me. What are we trying to say?
For system parachains there is no place where users can go to figure out how to onboard, they would have to drop into a Polkadot Element channel and ask around or communicate with Parity to ask what the onboarding process is.
|
@brunopgalvao I've made a lot of changes locally, just awaiting your responses so I can make modifications as needed. Thanks! |
- Switch from rocksdb to paritydb snapshots where available - Update relay chain pruned snapshot size from ~200 GB to ~822 GB - Fix non-existent pruned snapshot URLs (Asset Hub, People Chain) - Clarify storage requirements: archive nodes (~1.2 TB) vs pruned nodes (200+ GB) - Update system parachain snapshot sizes with accurate values
Remove duplicate tabs for archive/pruned snapshots since the same archive snapshots are used for both node types.
Restructure Run the Collator section to provide both Docker and systemd setup options in tabs, consistent with other node documentation.
…into bruno/infra/running-a-collator
| - `--size-only`: Only transfers if sizes differ (prevents unnecessary re-downloads) | ||
| 2. Download the snapshots: | ||
|
|
||
| **Parachain archive snapshot** (People Chain example, ~71 GB): |
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.
Why is this number 71 GB, but above you said a parachain archive is 900 GB?
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.
Because you need to take into account ~822 GB for the relay chain.
| - **Storage**: | ||
| - Storage requirements vary by parachain. System parachains: Asset Hub (~600-800 GB), Bridge Hub (~500-600 GB), Collectives (~400-500 GB), People Chain (~300-400 GB), Coretime (~300-400 GB). For non-system parachains, check the [snapshot sizes](https://snapshots.polkadot.io/){target=\_blank} if available. | ||
| - Additional 200+ GB for relay chain pruned database | ||
| - Archive node: Storage varies by parachain. Using snapshots, system parachain totals are: Asset Hub (~1.2 TB), Bridge Hub (~1.1 TB), Collectives (~1 TB), People Chain (~900 GB), Coretime (~900 GB). For non-system parachains, check the [snapshot sizes](https://snapshots.polkadot.io/){target=\_blank} and add ~822 GB for the relay chain. |
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.
822 GB for the archived relay chain?
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.
I guess I'm confused why we're combining the values here (I'm assuming you're adding archive parachain snapshot + archive relay chain - although was not clear initially to me from this sentence alone) but our instructions do not include using an archived relay chain.
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.
~822 GB for a pruned snapshot of the relay chain. So you need to add the storage size needed for the parachain + the relay chain. An archived version of the relay chain would be ~3.19 TB...
| - **CPU**: 8+ cores (16+ cores for high traffic) | ||
| - **Memory**: 64 GB RAM minimum (128 GB recommended for high traffic) | ||
| - **Storage**: | ||
| - **Archive node**: Storage varies by parachain. Using snapshots, system parachain totals are: Asset Hub (~1.2 TB), Bridge Hub (~1.1 TB), Collectives (~1 TB), People Chain (~900 GB), Coretime (~900 GB). For non-system parachains, check the [snapshot sizes](https://snapshots.polkadot.io/){target=\_blank} and add ~822 GB for the relay chain |
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.
The link doesn't provide info on non-system parachains - seems like only relay chains?
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.
Yes. https://snapshots.polkadot.io only supports sysetm parachains and relay chains.
For non-system parachains, the user would need to consult the associated parachain's documentation, perhaps they have a snapshot service or maybe not.
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.
I believe there is a not around line 108:
!!! note
Snapshots are available for system parachains and the Polkadot relay chain. For other parachains, check with the parachain team for snapshot availability or sync from genesis.
| mkdir -p my-node-data/chains/polkadot/db | ||
| ``` | ||
|
|
||
| 2. Choose between archive (complete history; ~71 GB for People Chain) or pruned (recent state; TODO: ERIN) snapshots of the parachain and set the snapshot URL accordingly: |
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.
do we know pruned storage amounts? Or should I say something generic like depends on specified number of blocks to keep?
I have a few TODO: ERINs scattered around this PR, all are trying to add pruned storage amounts
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.
There is no pruned snapshot for people parachain just archive snapshot.
| === "Archive" | ||
|
|
||
| ```bash | ||
| # Check https://snapshots.polkadot.io/ for the latest snapshot URL | ||
| export SNAPSHOT_URL_PARACHAIN="https://snapshots.polkadot.io/polkadot-people-rocksdb-archive/INSERT_LATEST" | ||
| ``` | ||
|
|
||
| === "Pruned" | ||
|
|
||
| ```bash | ||
| # Check https://snapshots.polkadot.io/ for the latest snapshot URL | ||
| export SNAPSHOT_URL_PARACHAIN="https://snapshots.polkadot.io/polkadot-people-rocksdb-prune/INSERT_LATEST" | ||
| ``` | ||
|
|
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.
I had this change locally before you committed a bunch of stuff. I saw you got rid of the pruned info. So I'm curious why you got rid of it? Should we give the user the option? This seems like an easy way to do that
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.
Because I later found out that there was no pruned snapshot for people... which is fine because they can run the parachain in pruned mode and it will sync quickly.
| The registration process varies by system parachain. General steps include the following: | ||
|
|
||
| 1. Check the existing collators for your target parachain: | ||
| <!--TODO: What is the URL? Also, why is the user following this step? Will this query return info needed in next steps or ???--> |
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.
This should still be here? When can this be addressed?
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.
Can remove that. Personally, as a best practice, I am not in favor of adding TODO's in code unless it is a dire need (usually there is another way around it).
I have included an example screenshot for collatorSelection.invulnerables() here:




Summary
Resolves #1216
Resolves #1217
Resolves #1185
Refactored the "Nodes and Validators" section to accommodate Polkadot Hub, collators, and system parachains with an emphasis on running a Polkadot Hub RPC node. With this, the section has been renamed to "Node Infrastructure" to better accommodate what is contained in this section (Polkadot Hub RPC node, system parachain RPC node, relay chain nodes, collators, validators, etc)
New content to: