website logo
⌘K
📜Overview
Getting Started
DOS Tokenomics
Network Details
DOS Ecosystem
Validators
Run a Mainnet Node on DOS Chain
Monitor and troubleshoot your validator
Bridge
Migrate to DOS Chain
Polygon
BNB Chain
Docs powered by archbee 

Run a Mainnet Node on DOS Chain

15min

Introduction

This article describes how to run a Mainnet node on DOS Chain. Following necessary steps are needed to run your node on the DOS Chain:

  1. Install AvalancheGo using the Install Script
  2. Download the plugin binary for the DOS Subnet-EVM
  3. Track the DOS Subnet
  4. Connect to the DOS Subnet!

This install script assumes:

  • AvalancheGo is not running and not already installed as a service
  • User running the script has superuser privileges (can run sudo)

Install AvalancheGo using the Install Script

First, you need to download and install AvalancheGo (handles the orchestration of running Custom VMs). You can follow this comprehensive guide to complete this step. For this tutorial, we recommend using the AvalancheGo Installer.

Notes: Some configurations you should notice:

  • Enter your connection type [1,2]: 2
  • RPC port should be public (this is a public API node) or private (this is a validator)? [public, private]: private
  • Detected 'x.x.x.x' as your public IP. Is this correct? [y,n]: y

Download subnet-evm Binary

For the steps below, we will assume that you completed first step successfully and are now in your AvalancheGo directory (within your $GOPATH).

Next, you will download the DOS-EVM binary (please notice that we use the same Binary file with the Ava Labs repo):

Linux
|
cd ~/avalanche-node
mkdir plugins


Download and unzip the latest subnet evm (evm 5.0 compatible with AvalancheGo 1.10.0)

Linux
|
wget https://github.com/ava-labs/subnet-evm/releases/download/v0.5.0/subnet-evm_0.5.0_linux_amd64.tar.gz
tar -xvzf subnet-evm_0.5.0_linux_amd64.tar.gz
cp subnet-evm ~/avalanche-node/plugins/evm
cp subnet-evm ~/avalanche-node/plugins/X5tFvg9JwoXgaYPQbceSzhGoCF6dhwrDm5BnAav6meFp3xxmg


The long string X5tFvg9JwoXgaYPQbceSzhGoCF6dhwrDm5BnAav6meFp3xxmg is the CB58 encoded VMID of the DOS Subnet-EVM. AvalancheGo will use the name of this file to determine what VMs are available to run from the plugins directory.

Tracking DOS Chain and Restarting the Node

AvalancheGo will only validate the primary network by default. In order to add the DOS Chain, you will need to add the DOS Subnet ID to the set of tracked Subnets in the node's config file or pass it through the command-line options of the node. Once the node's config file has been updated, you will need to start the Avalanche node (restart if already running). Once you start the node, it will begin syncing the Primary Network. Once the node reaches the point in the Platform Chain where the DOS Subnet is created, it will begin syncing the DOS Subnet as well, and will start validating once it has fully bootstrapped.

Updating Config File

You need to create a new config file or edit your existing one for your node. Since you use Install Script in this tutorial, it created the node config file at: ~/.avalanchego/configs/node.json. Note: you can create a config file anywhere on your file system, you will just need to specify its location via the flag --config-file=<file path> when you start your node. See this for more info on configuration file and flags.

You will need to add the DOS Subnet ID to the track Subnets section of the config file:

{ <OTHER-CONFIGURATIONS> "track-subnets": "nQCwF6V9y8VFjvMuPeQVWWYn6ba75518Dpf6ZMWZNb3NyTA94" }

Track Subnets is a comma separated list of Subnet IDs, so if you are validating more than one Subnet, you can simply add a comma to the end of the list and append the DOS Chain ID nQCwF6V9y8VFjvMuPeQVWWYn6ba75518Dpf6ZMWZNb3NyTA94.

So the content of file ~/.avalanchego/configs/node.json should be like:

{ "http-host": "", "public-ip": "your_public_ip", "track-subnets":"nQCwF6V9y8VFjvMuPeQVWWYn6ba75518Dpf6ZMWZNb3NyTA94", "plugin-dir": "/home/ubuntu/avalanche-node/plugins" }

Running the Node

First, make sure to shut down your node in case it is still running. Then, you will navigate back into the AvalancheGo directory:

Linux
|
cd $GOPATH/src/github.com/ava-labs/avalanchego


If you went through the steps to set up a config file, then you can launch your node by specifying the config file on the command line:

./build/avalanchego --config-file ~/.avalanchego/configs/node.json

If you want to track the Subnets through the command-line flag. You can append the other flags or even the --config-file flag as well, according to your need.

./build/avalanchego --track-subnets nQCwF6V9y8VFjvMuPeQVWWYn6ba75518Dpf6ZMWZNb3NyTA94

Config Chain

DOS Chain allows the node operator to provide some custom configurations. The config file for DOS Chain is located at ~/.avalanchego/configs/chains/22v7AG7h6qaVxd4bLvAsSsg2LZ4RCn5iVYgFn7a2Fj1LCuYwjv/config.json

The content of config.json file should be like:

{ "feeRecipient": "0x50B65C1e3206621b6f9A5Ab2950Ae69f20634b82",//input your wallet }

Just Want the Commands? We Got You

Linux
|
wget -nd -m https://raw.githubusercontent.com/ava-labs/avalanche-docs/master/scripts/avalanchego-installer.sh
chmod 755 avalanchego-installer.sh
./avalanchego-installer.sh
cd ~/avalanche-node
mkdir plugins
gwet https://github.com/ava-labs/subnet-evm/releases/download/v0.5.0/subnet-evm_0.5.0_linux_amd64.tar.gz
tar -xvzf subnet-evm_0.5.0_linux_amd64.tar.gz
cp subnet-evm ~/avalanche-node/plugins/evm
cp subnet-evm ~/avalanche-node/plugins/X5tFvg9JwoXgaYPQbceSzhGoCF6dhwrDm5BnAav6meFp3xxmg
cd /home/ubuntu/.avalanchego/configs/chains
mkdir 22v7AG7h6qaVxd4bLvAsSsg2LZ4RCn5iVYgFn7a2Fj1LCuYwjv
vi  /home/ubuntu/.avalanchego/configs/chains/22v7AG7h6qaVxd4bLvAsSsg2LZ4RCn5iVYgFn7a2Fj1LCuYwjv/config.json
cd /home/ubuntu/.avalanchego/configs/subnets
vi /home/ubuntu/.avalanchego/configs/subnets/nQCwF6V9y8VFjvMuPeQVWWYn6ba75518Dpf6ZMWZNb3NyTA94.json


And finally, share us your nodeID.

Updated 24 Apr 2023
Did this page help you?
Yes
No
PREVIOUS
Validators
NEXT
Monitor and troubleshoot your validator
Docs powered by archbee 
TABLE OF CONTENTS
Introduction
Install AvalancheGo using the Install Script
Download subnet-evm Binary
Tracking DOS Chain and Restarting the Node
Updating Config File
Running the Node
Config Chain
Just Want the Commands? We Got You