To setup the node for joining Hero Testnet, first we have to join the Avalanche Fuji testnet then install subnet-evm to plugins with the correct VM ID.
# First download go
# install the version > 1.20.2
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
# install go
sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
# add go to $PATH by using avalanche/validators/.profile
# copy the content to the last line of user .profile file
echo "export PATH=$PATH:/usr/local/go/bin:/home/admin/go/bin" >>> .profile
# use updated .profile
source .profile
####################################
# Prebuilt Binaries
# Use avalanche-installer script to join Avalanche Fuji network
# **NOTE:** This script uses **sudo**
wget -nd -m https://raw.githubusercontent.com/ava-labs/avalanche-docs/master/scripts/avalanchego-installer.sh;\
chmod 755 avalanchego-installer.sh;\
./avalanchego-installer.sh
# - OR - Directly download the latest pre-built binary to join Avalanche Fuji
cd ~
wget https://github.com/ava-labs/avalanchego/releases/download/vx.x.x/avalanchego-<distro>-vx.x.x.zip
unzip avalanchego-<distro>-v<x.x.x>.zip
# rename the build folder into avalanche-node
mv build avalanche-node
# Download the subnet-evm binaries for joining Hero Testnet
# darwin amd64 for apple amd chips / darwin for arm64 (apple m series chips)
wget https://github.com/ava-labs/subnet-evm/releases/download/vx.x.x/subnet-evm_x.x.x_<distro>_<chip>.tar.gz
tar xfz subnet-evm_x.x.x_<distro>_<chip>.tar.gz
mv subnet-evm nyfSdZmrxTXbJrxdUoqLegVGQzWF6RVL4jYn7Yr6NsMzpdrFA
# copy plugin to avalanchego/plugins
mkdir ~/.avalanchego/plugins
cp ./nyfSdZmrxTXbJrxdUoqLegVGQzWF6RVL4jYn7Yr6NsMzpdrFA ~/.avalanchego/plugins/
# ** Configs **
# Local node config for whitelisting Hero Subnet & connecting to Fuji
vim ~/.avalanchego/configs/node.json
# paste content below
{
"http-host": "127.0.0.1",
"http-port": 9650,
"network-id": "fuji",
"track-subnets": "21HEmZx5zVHYcP3JzbmRGVsYdm3HjrM2BMEPoCpoS3fHmZshq9"
}
# Vm alias config
vim ~/.avalanchego/vms/aliases.json
# paste content below
{
"nyfSdZmrxTXbJrxdUoqLegVGQzWF6RVL4jYn7Yr6NsMzpdrFA": ["hero", "herovm", "hvm"]
}
# Paste the following contents of upgrade.json into
vim ~/.avalanchego/configs/chains/2KV1ighhTjNpuQq8BVgHeJF3QHdF3KxhY9AqB9M1GfUuBCKjNo/upgrade.json