Requirements
The current Tangle testnet is a standalone network, meaning that it is not connected to the Polkadot or Kusama relay chain. Since the Tangle is not a parachain, the size of nodes are quite a small build as it only contains code to run the standalone Tangle network and not syncing the relay chain or communicate between the two. As such, the build is smaller, and does not require the same minumum spec requirements as a parachain node.
The following specifications are the ideal or recommended, but nodes can be run with less. Testnet nodes have also been run using AWS t3.Large instances.
Component | Requirements |
---|---|
CPU | Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz |
Storage | An NVMe solid state drive of 500 GB (As it should be reasonably sized to deal with blockchain growth). |
Memory | 32GB ECC |
Firewall | P2P port must be open to incoming traffic: - Source: Any - Destination: 30333, 30334 TCP |
Running Ports
As stated before, the standalone nodes will listen on multiple ports. The default Substrate ports are used in the standalone, while the relay chain will listen on the next higher port.
The only ports that need to be open for incoming traffic are those designated for P2P.
Default Ports for a Tangle Full-Node:
Description | Port |
---|---|
P2P | 30333 (TCP) |
RPC | 9933 |
WS | 9944 |
Prometheus | 9615 |
Dependencies
In order to build a Tangle node from source your machine must have specific dependecies installed. This guide outlines those requirements.
This guide uses https://rustup.rs (opens in a new tab) installer and the rustup
tool to manage the Rust toolchain. Rust is required to
compile a Tangle node.
First install and configure rustup
:
# Install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Configure
source ~/.cargo/env
Configure the Rust toolchain to default to the latest stable version, add nightly and the nightly wasm target:
rustup default nightly
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
Great! Now your Rust environment is ready! 🚀🚀
Substrate Dependencies
Debian version:
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
Arch version:
pacman -Syu --needed --noconfirm curl git clang make protobuf
Fedora version:
sudo dnf update
sudo dnf install clang curl git openssl-devel make protobuf-compiler
Opensuse version:
sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel make protobuf
Remember that different distributions might use different package managers and bundle packages in different ways. For example, depending on your installation selections, Ubuntu Desktop and Ubuntu Server might have different packages and different requirements. However, the packages listed in the command-line examples are applicable for many common Linux distributions, including Debian, Linux Mint, MX Linux, and Elementary OS.
Build from Source 💻
Once the development environment is set up, you can build the Tangle node from source.
git clone https://github.com/webb-tools/tangle.git
cargo build --release
NOTE: You must use the release builds! The optimizations here are required as in debug mode, it is expected that nodes are not able to run fast enough to produce blocks.
You will now have the tangle-standalone
binary built in target/release/
dir
Feature Flags
Some features of tangle node are setup behind feature flags, to enable these features you will have to build the binary with these flags enabled
- txpool
This feature flag is useful to help trace and debug evm transactions on the chain, you should build node with this flag if you intend to use the node for any evm transaction following
cargo build --release --features txpool
- relayer
This feature flag is used to start the embedded tx relayer with tangle node, you should build node with this flag if you intend to run a node with a relayer which can be used for transaction relaying or data querying
cargo build --release --features relayer
- light-client
This feature flag is used to start the embedded light client with tangle node, you should build node with this flag if you intend to run a node with a light client relayer to sync EVM data on Tangle
cargo build --release --features light-client
Use Precompiled binary 💻
Every release of tangle node includes a Precompiled binary, its currently limited to amd-64 architecture but we plan to support more soon. You can view all releases here (opens in a new tab).
In the below commands, substiture LATEST_RELEASE
with the version you want to use, the current latest version is 0.4.6
Get tangle binary
wget https://github.com/webb-tools/tangle/releases/download/<LATEST_RELEASE>/tangle-standalone-linux-amd64
Get tangle binary with txpool feature
wget https://github.com/webb-tools/tangle/releases/download/<LATEST_RELEASE>/tangle-standalone-txpool-linux-amd64
Get tangle binary with relayer feature
wget https://github.com/webb-tools/tangle/releases/download/<LATEST_RELEASE>/tangle-standalone-relayer-linux-amd64
Get tangle binary with light-client feature
wget https://github.com/webb-tools/tangle/releases/download/<LATEST_RELEASE>/tangle-standalone-light-client-linux-amd64