Skip to content

Commit

Permalink
validator quickstart buide (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj authored Oct 4, 2023
1 parent 8340395 commit 1c228d6
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 9 deletions.
15 changes: 15 additions & 0 deletions components/TangleQuickstart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ import {
} from "./Icons";
import { DetailedFeatureLink } from "./Feature";

export const QuickDeployArea = () => {
return (
<div className="grid grid-cols-1 mt-10 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-10 lg:gap-x-8 lg:gap-y-12">
<DetailedFeatureLink
feature={{
Icon: ServerIcon,
description: `Deploy a Tangle node in two steps`,
name: "Quick Deployment",
}}
href="/docs/ecosystem-roles/validator/systemd/quick-node/"
></DetailedFeatureLink>
</div>
);
};

export const DeployArea = () => {
return (
<div className="grid grid-cols-1 mt-10 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-10 lg:gap-x-8 lg:gap-y-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ To start the node run the following command:

```
docker run --rm -it -v /var/lib/tangle/:/data ghcr.io/webb-tools/tangle/tangle-standalone:main \
--chain /data/chainspec/tangle-standalone.json \
--chain tangle-testnet \
--name="YOUR-NODE-NAME" \
--base-path /data \
--rpc-cors all \
--port 9946
--port 9946 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --name <NODE_NAME>
```

<Callout type="info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@ To start the node run the following command:
docker run --platform linux/amd64 --network="host" -v "/var/lib/data" --entrypoint ./tangle-standalone \
ghcr.io/webb-tools/tangle/tangle-standalone:main \
--base-path=/data \
--chain dev \
--chain tangle-testnet \
--name="YOUR-NODE-NAME" \
--execution wasm \
--wasm-execution compiled \
--trie-cache-size 0 \
--validator
--validator \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --name <NODE_NAME>
```

<Callout type="info">
Expand Down
8 changes: 6 additions & 2 deletions pages/docs/ecosystem-roles/validator/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Node Operator Quickstart
description: Participate in the Webb ecosystem by deploying a Tangle node, to validate, serve data or more.
---

import { DeployArea, SupportArea, MonitoringArea } from "../../../../components/TangleQuickstart"
import { QuickDeployArea, DeployArea, SupportArea, MonitoringArea } from "../../../../components/TangleQuickstart"
import { RepoArea } from "../../../../components/RepoArea";
import FullWebbCTA from "../../../../components/FullWebbCTA";

Expand All @@ -14,7 +14,11 @@ is a collection of quick links for quick setups!

**If you're looking to understand how to become a Validator in Substrate systems like Tangle, see the [Polkadot Docs](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot) as well.**

## Deploy Quickly
## Quick Setup

<QuickDeployArea />

## Advanced Setup

<DeployArea />

Expand Down
3 changes: 2 additions & 1 deletion pages/docs/ecosystem-roles/validator/systemd/full-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ ExecStart=/usr/bin/tangle-standalone \
--node-key-file "/home/<USERNAME>/node-key" \
--rpc-cors all \
--port 9946 \
--no-mdns
--no-mdns \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --name <NODE_NAME>
[Install]
WantedBy=multi-user.target
Expand Down
91 changes: 91 additions & 0 deletions pages/docs/ecosystem-roles/validator/systemd/quick-node.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Quickstart
description: Run a Tangle Validator node using systemd.
---

# Tangle Validator Quickstart

<mark>**Caution:** The following guide is only meant as a quickstart for anyone looking to run a tangle node with minimal
config, this guide uses automated keys and it is not recommended to run a validator using this setup long term, refer to [advanced](/docs/ecosystem-roles/validator/systemd/validator-node/) guide
for a more secure long term setup.</mark>

Before following this guide you should have already set up your machines environment, installed the dependencies, and
compiled the Tangle binary. If you have not done so, please refer to the [Requirements](/docs/ecosystem-roles/validator/requirements/) page.


## Standalone Testnet

### 1. Fetch the tangle binary

Use the latest release version in the url in place of `<VERSION>`, you can visit [releases](https://github.com/webb-tools/tangle/releases) page to view the latest info

```
wget https://github.com/webb-tools/tangle/releases/download/<VERSION>/tangle-standalone-linux-amd64
```

For example, at the time of writing this document, the latest release is v0.4.7 and the link would be as follows

```
wget https://github.com/webb-tools/tangle/releases/download/v0.4.7/tangle-standalone-linux-amd64
```

### 2. Start the node binary

To start the binary you can run the following command (ensure you are in the same folder where tangle-standalone is downloaded)

Make sure to change the following params before executing the command

1. `<BASE_PATH>` : This is the path where your chain DB will live
2. `<NODE_NAME>` : This is a unique node name for your node, use a unique name here to help identity your node to other validators and telemetry data

```
./tangle-standalone-linux-amd64 \
--base-path <BASE_PATH> \
--name <NODE_NAME> \
--chain tangle-testnet \
--port 9944 \
--validator \
--auto-insert-keys \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --name <NODE_NAME>
```

If the node is running correctly, you should see an output similar to below:

```
2023-03-22 14:55:51 Tangle Standalone Node
2023-03-22 14:55:51 ✌️ version 0.1.15-54624e3-aarch64-macos
2023-03-22 14:55:51 ❤️ by Webb Technologies Inc., 2017-2023
2023-03-22 14:55:51 📋 Chain specification: Tangle Testnet
2023-03-22 14:55:51 🏷 Node name: cooing-morning-2891
2023-03-22 14:55:51 👤 Role: FULL
2023-03-22 14:55:51 💾 Database: RocksDb at /Users/local/Library/Application Support/tangle-standalone/chains/local_testnet/db/full
2023-03-22 14:55:51 ⛓ Native runtime: tangle-standalone-115 (tangle-standalone-1.tx1.au1)
2023-03-22 14:55:51 Bn254 x5 w3 params
2023-03-22 14:55:51 [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators
2023-03-22 14:55:51 [0] 💸 generated 5 npos targets
2023-03-22 14:55:51 [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators
2023-03-22 14:55:51 [0] 💸 generated 5 npos targets
2023-03-22 14:55:51 [0] 💸 new validator set of size 5 has been processed for era 1
2023-03-22 14:55:52 🔨 Initializing Genesis block/state (state: 0xfd16…aefd, header-hash: 0x7c05…a27d)
2023-03-22 14:55:52 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2023-03-22 14:55:53 Using default protocol ID "sup" because none is configured in the chain specs
2023-03-22 14:55:53 🏷 Local node identity is: 12D3KooWDaeXbqokqvEMqpJsKBvjt9BUz41uP9tzRkYuky1Wat7Z
2023-03-22 14:55:53 💻 Operating system: macos
2023-03-22 14:55:53 💻 CPU architecture: aarch64
2023-03-22 14:55:53 📦 Highest known block at #0
2023-03-22 14:55:53 〽️ Prometheus exporter started at 127.0.0.1:9615
2023-03-22 14:55:53 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-03-22 14:55:53 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]
2023-03-22 14:55:53 discovered: 12D3KooWMr4L3Dun4BUyp23HZtLfxoQjR56dDp9eH42Va5X6Hfgi /ip4/192.168.0.125/tcp/30304
2023-03-22 14:55:53 discovered: 12D3KooWNHhcCUsZTdTkADmDJbSK9YjbtscHHA8R4jvrbGwjPVez /ip4/192.168.0.125/tcp/30305
2023-03-22 14:55:53 discovered: 12D3KooWMr4L3Dun4BUyp23HZtLfxoQjR56dDp9eH42Va5X6Hfgi /ip4/192.168.88.12/tcp/30304
2023-03-22 14:55:53 discovered: 12D3KooWNHhcCUsZTdTkADmDJbSK9YjbtscHHA8R4jvrbGwjPVez /ip4/192.168.88.12/tcp/30305
```

**Note** : Since the `--auto-insert-keys` flag was used the logs will print out the keys automatically generated for you,
make sure to note down and keep this safely, in case you need to migrate or restart your node, these keys are essential.

Congratulations! You have officially setup an Tangle Network node. The quickstart is only meant as a quickstart for anyone looking to run a tangle node with minimal
config, this guide uses automated keys and it is not recommended to run a validator using this setup long term, refer to [advanced](/docs/ecosystem-roles/validator/systemd/validator-node/) guide
for a more secure long term setup.. If you are interested
in learning how to setup monitoring for your node, please refer to the [monitoring](../monitoring/quickstart.mdx) page.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ or crashes (and helps to avoid getting slashed!).
Before following this guide you should have already set up your machines environment, installed the dependencies, and
compiled the Tangle binary. If you have not done so, please refer to the [Requirements](/docs/ecosystem-roles/validator/requirements/) page.

## Standalone Testnet
## Standalone Testnet

### Generate and store keys

Expand Down Expand Up @@ -130,7 +130,8 @@ ExecStart=/usr/bin/tangle-standalone \
--node-key-file "/home/<USERNAME>/node-key" \
--port 9944 \
--validator \
--no-mdns
--no-mdns \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --name <NODE_NAME>
[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit 1c228d6

Please sign in to comment.