Comment on page
Run a Mainnet Node on DOS Chain
This article describes how to run a Mainnet node on DOS Chain. The 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)
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
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):
Download and unzip the latest subnet evm (evm 5.0 compatible with AvalancheGo 1.10.0)
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.
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.
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" }
First, make sure to shut down your node in case it is still running. Then, you will navigate back into the AvalancheGo directory:
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
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 }
And finally, share us your nodeID.
Last modified 1mo ago