From e8c9aad747a5ef8bb0286cf735d242fcadbf69b4 Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Wed, 19 Jun 2024 12:06:12 +0200 Subject: [PATCH 1/3] add expanded explanation of node roles with a diagram --- README.md | 2 +- src/SUMMARY.md | 2 +- .../parachain-node-diagram.drawio.svg | 656 ++++++++++++++++++ src/deployments/roles.md | 33 + src/deployments/types.md | 12 - 5 files changed, 691 insertions(+), 14 deletions(-) create mode 100644 src/deployments/parachain-node-diagram.drawio.svg create mode 100644 src/deployments/roles.md delete mode 100644 src/deployments/types.md diff --git a/README.md b/README.md index b4c0aca..95c75f4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# Substrate DevOps Guidebook +# Parachain DevOps Guidebook [https://paritytech.github.io/devops-guide/](https://paritytech.github.io/devops-guide/) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 4631253..7aa8b14 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -5,7 +5,7 @@ - [Parachain Deployment](./guides/parachain_deployment.md) - [Explanations](./explanations/index.md) - [Deployment Options](./deployments/index.md) - - [Role Types](./deployments/types.md) + - [Node Roles](./deployments/roles.md) - [Remote Targets](./deployments/targets.md) - [Role Specific Arguments](./deployments/options.md) - [Server Deployments](./serverdeploy/index.md) diff --git a/src/deployments/parachain-node-diagram.drawio.svg b/src/deployments/parachain-node-diagram.drawio.svg new file mode 100644 index 0000000..c369330 --- /dev/null +++ b/src/deployments/parachain-node-diagram.drawio.svg @@ -0,0 +1,656 @@ + + + + + + + + +
+
+
+ Relaychain +
+ Network +
+
+
+
+ + Relaychain... + +
+
+ + + + +
+
+
+ Parachain +
+ Network +
+
+
+
+ + Parachain... + +
+
+ + + + +
+
+
+ Parachain Collator +
+
+
+
+
+
+
+
+ + Parachain Collator... + +
+
+ + + + +
+
+
+ 30333 +
+
+
+
+ + 30333 + +
+
+ + + + +
+
+
+ Parachain +
+ RPC Node +
+
+
+
+ + Parachain... + +
+
+ + + + +
+
+
+ 30333 +
+
+
+
+ + 30333 + +
+
+ + + + + + +
+
+
+ P2P +
+
+
+
+ + P2P + +
+
+ + + + +
+
+
+ 9944 +
+
+
+
+ + 9944 + +
+
+ + + + + +
+
+
+ Public RPC +
+ + (HTTP/WS) + +
+
+
+
+ + Public RPC... + +
+
+ + + + +
+
+
+ 30334 +
+
+
+
+ + 30334 + +
+
+ + + + +
+
+
+ Relaychain Validator +
+
+
+
+
+
+
+
+
+
+
+
+ + Relaychain Validator... + +
+
+ + + + +
+
+
+ + Para Block +
+ Validation +
+
+
+
+
+ + Para Block... + +
+
+ + + + + +
+
+
+ +
+ Para +
+ DB +
+
+
+
+
+ + Para... + +
+
+ + + + + +
+
+
+ +
+ Pruned +
+ DB +
+
+
+
+
+ + Pruned... + +
+
+ + + + + + +
+
+
+ Aura Key +
+
+
+
+ + Aura K... + +
+
+ + + + +
+
+
+ + Block +
+ Production +
+
+
+
+
+ + Block... + +
+
+ + + + +
+
+
+ 30334 +
+
+
+
+ + 30334 + +
+
+ + + + + + +
+
+
+ P2P +
+
+
+
+ + P2P + +
+
+ + + + + +
+
+
+ +
+ Para +
+ DB +
+
+
+
+
+ + Para... + +
+
+ + + + +
+
+
+ Open +
+ Port +
+
+
+
+ + Open... + +
+
+ + + + + +
+
+
+ +
+ Archive +
+ DB +
+
+
+
+
+ + Archive... + +
+
+ + + + + +
+
+
+ +
+ Relay +
+ DB +
+
+
+
+
+ + Relay... + +
+
+ + + + + + +
+
+
+ Protocol Key +
+
+
+
+ + Protoc... + +
+
+ + + + +
+
+
+ Parachain +
+ Boot Node +
+
+
+
+ + Parachain... + +
+
+ + + + +
+
+
+ 30333 +
+
+
+
+ + 30333 + +
+
+ + + + + +
+
+
+ + /dns/bootnode.example.com +
+ /tcp/30333/p2p/<ADDRESS> +
+
+
+
+
+ + /dns/bootnode.example.com... + +
+
+ + + + + + +
+
+
+ P2P +
+
+
+
+ + P2P + +
+
+ + + + + + +
+
+
+ Babe +
+
+
+
+ + Babe + +
+
+ + + + + + +
+
+
+ Grandpa +
+
+
+
+ + Grandpa + +
+
+ + + + + +
+
+
+ +
+ Relay +
+ DB +
+
+
+
+
+ + Relay... + +
+
+ + + + +
+
+
+ + Symbols used + +
+
+
+
+ + Symbols used + +
+
+ + + + + +
+
+
+ +
+ Para +
+ DB +
+
+
+
+
+ + Para... + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/src/deployments/roles.md b/src/deployments/roles.md new file mode 100644 index 0000000..cbce28b --- /dev/null +++ b/src/deployments/roles.md @@ -0,0 +1,33 @@ +# Blockchain Node Roles + +A non exhaustive list of some common roles assumed by nodes: + +| Role | Description | +| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Validator | Secures the Relay Chain by staking DOT, validating proofs from collators on parachains and voting on consensus along with other validators. | +| Collator | Maintains a parachain by collecting parachain transactions and producing state transition proofs for the validators. | +| Bootnode | A node with a static address and p2p public key, used to bootstrap a node onto the network’s distributed hash table and find peers. | +| RPC Node | Expose an RPC interface over http or websocket for the relay chain or parachain and allow users to read the blockchain state and submit transactions (extrinsics). There are often multiple RPC nodes behind a load balancer. | + +Additionally, we also usually distinguish types of nodes: + +| Type | Description | +| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Full Node | A node which is syncing the relay chain or parachain to the current best block. It can make use of database pruning to reduce its disk usage. | +| Archive Node | A full node which has a complete database starting all the way from the genesis block. +| Light Node | Also called light client, can connect to a chain network but does not require to have full copy of the entire blockchain | + +## Simplified Diagram of the Parachain Network architecture + +The diagram below illustrate how different nodes play different roles in the network by having different configuration. + +![parachain node diagram](./parachain-node-diagram.drawio.svg) + +- Bootnodes expose their P2P port behind an easy to find IP or DNS address. +- RPC nodes expose their RPC endpoint publicly. +- Collators sign blocks and propose them for validation to the Relaychain validators +- We can adjust the database pruning (archive or pruned) depending on the node role. + +## Downsides of deploying nodes without clear role separation + +Although, it is possible for a single node to assume multiple roles (collator, RPC, bootnode), robust network deployments are composed of multiple nodes of each types to ensure reliability (eg. several dedicated RPC nodes behind a load balancer can handle increased user traffic, having more collators allows downtime of a single collator without slowing down block production, etc.). diff --git a/src/deployments/types.md b/src/deployments/types.md deleted file mode 100644 index 2776c70..0000000 --- a/src/deployments/types.md +++ /dev/null @@ -1,12 +0,0 @@ -# Node Types - -A non exhaustive list of some common node types: - -| Type | Function | -| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Validator | Secures the Relay Chain by staking DOT, validating proofs from collators on parachains and voting on consensus along with other validators. | -| Collator | Maintains a parachain by collecting parachain transactions and producing state transition proofs for the validators. | -| Bootnode | A node with a static address and p2p public key, used to bootstrap a node onto the network’s distributed hash table and find peers. | -| RPC Node | Expose an RPC interface over http or websocket for the relay chain or parachain and allow users to read the blockchain state and submit transactions (extrinsics). There are often multiple RPC nodes behind a load balancer. | -| Archive Node | A node which is syncing to the relay chain or parachain and has a complete database starting all the way from the genesis block. | -| Full Node | A node which is syncing the relay chain or parachain to the current best block. | From 0ee1a72329d2b8bb3cb7410cc0d7d37ab06f62e3 Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Wed, 19 Jun 2024 12:11:26 +0200 Subject: [PATCH 2/3] improve downside section --- src/deployments/roles.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/deployments/roles.md b/src/deployments/roles.md index cbce28b..7f62c3a 100644 --- a/src/deployments/roles.md +++ b/src/deployments/roles.md @@ -30,4 +30,6 @@ The diagram below illustrate how different nodes play different roles in the net ## Downsides of deploying nodes without clear role separation -Although, it is possible for a single node to assume multiple roles (collator, RPC, bootnode), robust network deployments are composed of multiple nodes of each types to ensure reliability (eg. several dedicated RPC nodes behind a load balancer can handle increased user traffic, having more collators allows downtime of a single collator without slowing down block production, etc.). +Although, it is possible for a single node to assume multiple roles (collator, RPC, bootnode), robust network deployments are composed of multiple nodes of each types to ensure reliability. + +For example, if a collator node also serves as an RPC node, receiving increased user traffic might overload the node and bring down block production. To prevent this from happening, it is possible to set up several dedicated RPC nodes behind a load balancer. Similarly, setting up additional collators in your network will allows downtime of fraction of the collator set without slowing down block production. From 0d3a3739fcd9874a3e7e4ab185aebc2611d76f42 Mon Sep 17 00:00:00 2001 From: Pierre Besson Date: Wed, 19 Jun 2024 12:12:49 +0200 Subject: [PATCH 3/3] rename substrate -> parachain devops guide --- book.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book.toml b/book.toml index 31fc768..fb877a2 100644 --- a/book.toml +++ b/book.toml @@ -3,7 +3,7 @@ authors = ["Parity DevOps Team", "ddorgan", "PierreBesson"] language = "en" multilingual = false src = "src" -title = "Substrate Devops Guide" +title = "Parachain Devops Guide" [output.html] additional-css = ["last-changed.css"]