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

📝 add docs on Node #216

Merged
merged 20 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the manta .rpm package contains:

- the manta binary (which is also used to run manta)
- manta and manta systemd services
- manta, manta, polkadot and kusama chain specifications
- manta, polkadot and kusama chain specifications
- a script which runs after installation and creates the manta system account which the systemd service runs under

get started (see also: [rpm.manta.systems](https://rpm.manta.systems/)):
Expand Down Expand Up @@ -73,7 +73,7 @@ the manta .deb package contains:

- the manta binary (which is also used to run manta)
- manta and manta systemd services
- manta, manta, polkadot and kusama chain specifications
- manta, polkadot and kusama chain specifications
- a script which runs after installation and creates the manta system account which the systemd service runs under

get started (see also: [deb.manta.systems](https://deb.manta.systems/)):
Expand Down
4 changes: 0 additions & 4 deletions docs/manta-atlantic/Collation/03-SetupAndRun/05-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ If your collator node logs do not contain both `[Relaychain] 💤 Idle` and `[Pa
Account binding is done on-chain. The simplest way to do this is using polkadot.js.
- Load [manta/developer/extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.manta.systems%2F#/extrinsics) in a browser:
![session.setkeys()](/img/collator-program/session.setkeys-manta.png)
:::note
Although the screenshot shows a connected dolphin node, the procedure is identical when connected to the Manta Network
:::
- In the first box, labelled "using the selected account", select the collator account holding the [collator MANTA bond](../Requirements#manta-bond).
- In the second (dropdown) box labelled "submit the following extrinsic", select `session`.
Expand All @@ -195,8 +193,6 @@ Although the screenshot shows a connected dolphin node, the procedure is identic
- Click on the `Submit Transaction` button and wait for confirmation (a green tick), to appear in the upper right corner of the browser window.
- Verfy that the collator account and the Session keys are *bound* by loading [manta/developer/chain state](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.manta.systems%2F#/chainstate) in a browser:
![session.nextkeys()](/img/collator-program/session.nextkeys-manta.png)
:::note
Although the screenshot shows a connected dolphin node, the procedure is identical when connected to the Manta Network
:::
- In the first (dropdown) box, labelled "selected state query", select `session`.
- In the second (dropdown) box, select `nextKeys(AccountId32): Option<MantaRuntimeOpaqueSessionKeys>`.
Expand Down
7 changes: 3 additions & 4 deletions docs/manta-atlantic/Collation/07-CollatorFAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ https://manta.subscan.io/account_list?role=validator
A: Come join us on the Manta & Calamari Network Discord Community in the #collator-candidates channel and you’ll find both community members who’ve had similar questions before and team members to help out.

### Q: What are the different networks?
A: There are three networks, each will require dedicated hardware. The Dolphin Testnet is free and should be used to familiarize yourself with the setup.
A: There are two networks, each will require dedicated hardware.

Manta Network - production network on Polkadot (Not yet live)
Calamari Network - canary network on Kusama
Dolphin Testnet - development network
- Manta Network - production network on Polkadot (live)
- Calamari Network - canary network on Kusama

### Q: What are Nimbus keys?
A: A Nimbus key is a type of session key. It is your node’s identification to the block production/verification method on the network, which is called Nimbus. It does NOT store or access funds. The node must always have access to this key in order to collate, so it is a hot key stored on the filesystem. You should keep a backup of this key in a safe - offline - location to be able to transfer your node’s identity to another device should you need to. Find more about nimbus session keys in the docs.
Expand Down
9 changes: 3 additions & 6 deletions docs/manta-atlantic/Collator Requirement.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,6 @@ sudo firewall-cmd --reload

- NOTE

Although the screenshot shows a connected dolphin node, the procedure is identical when connected to the Manta Network

- In the first box, labelled "using the selected account", select the collator account holding the [collator MANTA bond](https://docs.calamari.network/docs/calamari/Staking/Collation/Requirements#kma-bond).
- In the second (dropdown) box labelled "submit the following extrinsic", select `session`.
- In the third (dropdown) box, select `setKeys(keys, proof)`
Expand All @@ -672,8 +670,6 @@ sudo firewall-cmd --reload

NOTE

Although the screenshot shows a connected dolphin node, the procedure is identical when connected to the Manta Network

- In the first (dropdown) box, labelled "selected state query", select `session`.
- In the second (dropdown) box, select `nextKeys(AccountId32): Option<MantaRuntimeOpaqueSessionKeys>`.
- In the third (dropdown) box, select the collator account holding the MANTA collator bond.
Expand Down Expand Up @@ -796,9 +792,10 @@ sudo firewall-cmd --reload

### Q: What are the different networks?[](https://docs.calamari.network/docs/calamari/Staking/Collation/CollatorFAQ#q-what-are-the-different-networks)

A: There are three networks, each will require dedicated hardware. The Dolphin Testnet is free and should be used to familiarize yourself with the setup.
A: There are two networks, each will require dedicated hardware.

Manta Network - production network on Polkadot (Not yet live) MantaNetwork - canary network on Polkadot Dolphin Testnet - development network
- Manta Network - production network on Polkadot (Not yet live)
- Calamari Network - canary network on Kusama

### Q: What are Nimbus keys?[](https://docs.calamari.network/docs/calamari/Staking/Collation/CollatorFAQ#q-what-are-nimbus-keys)

Expand Down
16 changes: 16 additions & 0 deletions docs/manta-atlantic/Node/01-Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 🧩 Overview

Node maintainers are encouraged and welcome to run Manta Node. Varies types of node can be Archive Node, Full Node, RPC Node.

## Benefits of Running a Node

- The capability to deploy, oversee, and upgrade nodes as required, along with continuous monitoring of their performance.
- Establishment of high-quality connectivity suitable for creating and administering smart contracts, handling transactions, and retrieving blockchain data through protocols such as JSON-RPC, REST, and WebSockets.
- Access to real-time blockchain data and analytics.
- Simplified integration of blockchain technology into applications, avoiding the need for complex configurations.
- Consistent, reliable connectivity
- Service Level Agreements (SLAs) to align with specific business needs, ensuring the delivery of services.

## Join the node maintainer community discussion

- Telegram: [Collator Program](https://t.me/+C6zfp5cRG-A3ZDQ1)
27 changes: 27 additions & 0 deletions docs/manta-atlantic/Node/02-Requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Hardware and Infrastructure

a. Running on your own hardware and within you own premises (recommended):

- node system host
- cpu: 8 cores
- memory: 32 gb of ram (more is better)
- disk space: 500 gb of disk space dedicated to the blockchain basepath (more is better)
- infrastructure and environment
- network bandwidth: 100 mbps+
- internet-accessible ports:
- **31333**: default manta peer-to-peer port
- **31334**: default (embedded-relay) polkadot peer-to-peer port
- **9615**: default manta metrics port
- **9616**: default (embedded-relay) polkadot metrics port

you should monitor your own node using the techniques described on the [polkadot wiki](https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node). the metrics exposed on ports 9615 and 9616 facilitate this, so these ports should be accessible both from your own prometheus/alertmanager server (which should be configured to alert you) and manta devops' [pulse server](https://pulse.pelagos.systems) at `18.156.192.254` (monitored by manta devops).
- an uninterrupted power supply to both the node and the network switches and routers that provide its connectivity must be capable of keeping the system online during provider power outages
- a failover 4g or 5g router should be included in your network topology to provide connectivity in the event of a wired or fibre connection failure
- your network management should include automatic dns updates in the event of changes to your nodes publicly accessible ip addressing

b. Running on AWS EC2
- instance type: r5ad.xlarge or similar
- image: Ubuntu 22.04 (latest ubuntu server ami from Canonical/099720109477)

c. Azure/GCP or other cloud/datacenter provider
- Please use your judgement to match or surpass the requirements for other environments above
68 changes: 68 additions & 0 deletions docs/manta-atlantic/Node/03-SetupAndRun/01-full_node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
sidebar_position: 2
sidebar_label: 🦾 Full Node
title: 🚄 Setup and run a Full Node
hide_title: false
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## 🥡 Full Node
A full node prunes historical states: all finalized blocks' states older than a configurable number except the genesis block's state. This is 256 blocks from the last finalized one by default. A pruned node this way requires much less space than an archive node.

By specifying RPC endpoint parameters, node can be accessed over the WebSocket protocol, which can be used to access the underlying network and/or validator node. By default, you can access your node's RPC server from localhost (for example, to rotate keys or do other maintenance).

### Configuration

- --base-path <PATH\> (e.g `/opt/manta/lib`)
- --chain manta

for version `>= v4.6.0` (inclusive)

- --rpc-port <PORT\> (e.g `9944`)
- --rpc-cors <ORIGINS\> (e.g `all`)
- --rpc-max-connections <COUNT\> (default: `100`)
- --rpc-methods <METHOD\> (e.g `safe`)

for version `< v4.6.0` (exclusive)

- --ws-port <PORT\> (e.g `9944`)
- --ws-max-connections <COUNT\> (default: `100`)
- --rpc-port <PORT\> (e.g `9933`)
- --rpc-cors <ORIGINS\> (e.g. `all`)
- --rpc-methods <METHOD\> (e.g `safe`)


### Example Command

for version `>= v4.6.0` (inclusive)

```bash
./manta --base-path /opt/manta/lib --chain manta --rpc-port 9944 --rpc-cors all --rpc-max-connections 100 --rpc-methods safe
```

for version `< v4.6.0` (exclusive)

```bash
./manta --base-path /opt/manta/lib --chain manta --rpc-port 9933 --rpc-cors all --ws-max-connections 100 --ws-port 9944
```

### Check Full Node Logs

check for `👤 Role: FULL` line in logs

```bash
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 ❤️ by Manta Network, 2020-2024
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 📋 Chain specification: Manta Parachain
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 🏷 Node name: 🦾 f1 🦾
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 👤 Role: FULL
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 💾 Database: RocksDb at /var/lib/substrate/chains/manta/db/full
Jan 10 00:06:40 f1.manta.systems manta[2795938]: 2024-01-10 00:06:40 ⛓ Native runtime: manta-4600 (manta-1.tx7.au1)
```

### Test RPC Node

```bash
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "rpc_methods"}' http://127.0.0.1:9944/
```
68 changes: 68 additions & 0 deletions docs/manta-atlantic/Node/03-SetupAndRun/02-archive_node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
sidebar_position: 1
sidebar_label: 🗃️ Archive Node
title: 🚄 Setup and run a Archive Node
hide_title: false
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## 🥡 Archive Node

An archive node keeps all the past blocks and their states. An archive node makes it convenient to query the past state of the chain at any point in time. Finding out what an account's balance at a particular block was or which extrinsics resulted in a specific state change are fast operations when using an archive node. However, an archive node takes up a lot of disk space.(For Polkadot's 20 millionth block, it took up around 328 GB.)

Similar to full node rpc parameters can also be specified serve the archive node as rpc node

### Configuration

- --pruning archive
- --base-path <PATH\> (e.g `/opt/manta/lib`)
- --chain manta

for version `>= v4.6.0` (inclusive)

- --rpc-port <PORT\> (e.g `9944`)
- --rpc-cors <ORIGINS\> (e.g `all`)
- --rpc-max-connections <COUNT\> (default: `100`)
- --rpc-methods <METHOD\> (e.g `safe`)

for version `< v4.6.0` (exclusive)

- --ws-port <PORT\> (e.g `9944`)
- --ws-max-connections <COUNT\> (default: `100`)
- --rpc-port <PORT\> (e.g `9933`)
- --rpc-cors <ORIGINS\> (e.g. `all`)

### Example Command

for version `>= v4.6.0` (inclusive)

```bash
./manta --base-path /opt/manta/lib --chain manta --pruning archive --rpc-port 9944 --rpc-cors all --rpc-max-connections 100 --rpc-methods safe
```

for version `< v4.6.0` (exclusive)

```bash
./manta --base-path /opt/manta/lib --chain manta --pruning archive --rpc-port 9933 --rpc-cors all --ws-max-connections 100 --ws-port 9944
```

### Check Archive Node Logs

check for `👤 Role: FULL` line in logs

```bash
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 ❤️ by Manta Network, 2020-2024
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 📋 Chain specification: Manta Parachain
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 🏷 Node name: 🗃️ a7 🗃️
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 👤 Role: FULL
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 💾 Database: RocksDb at /var/lib/substrate/chains/manta/db/full
Jan 10 00:06:40 a7.manta.systems manta[2795938]: 2024-01-10 00:06:40 ⛓ Native runtime: manta-4600 (manta-1.tx7.au1)
```

### Test RPC Node

```bash
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "rpc_methods"}' http://127.0.0.1:9944/
```
22 changes: 14 additions & 8 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,24 @@ module.exports = {
type: "category",
label: "Collator",
items: [
"manta-atlantic/Collation/Overview",
"manta-atlantic/Collation/Requirements",
{
type: "autogenerated",
dirName: "manta-atlantic/Collation",
},
],
},
{
type: "category",
label: "Node",
items: [
"manta-atlantic/Node/Overview",
"manta-atlantic/Node/Requirements",
{
type: "category",
label: "SetupAndRun",
items: [
"manta-atlantic/Collation/SetupAndRun/installation",
"manta-atlantic/Collation/SetupAndRun/configuration",
"manta-atlantic/Collation/SetupAndRun/running",
"manta-atlantic/Collation/SetupAndRun/sync",
"manta-atlantic/Collation/SetupAndRun/keys",
"manta-atlantic/Collation/SetupAndRun/bond",
"manta-atlantic/Node/SetupAndRun/full_node",
"manta-atlantic/Node/SetupAndRun/archive_node",
],
},
],
Expand Down
Loading