This folder contains genesis data for the testnet ares-1
and instructions on how to join the network.
name | value |
---|---|
genesis.json | https://raw.githubusercontent.com/mars-protocol/networks/main/ares-1/genesis.json |
git tag | v1.0.0-rc7 |
block explorer | https://testnet-explorer.marsprotocol.io |
seeds | [email protected]:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:18556 |
Here are the minimal hardware configs required for running a validator/sentry node:
- 16 GB RAM
- 4 vCPUs
- 200 GB disk space
- Linux operating system (the following instructions are based on Ubuntu 20.04+)
- Go v1.19+
sudo apt update
sudo apt upgrade
sudo apt install make build-essential gcc git jq chrony
Follow the instructions here to install Go.
Alternatively, for Ubuntu LTS, you can do:
wget -q -O - https://go.dev/dl/go1.19.5.linux-amd64.tar.gz | sudo tar xvzf - -C /usr/local
Configure relevant environment variables:
cat <<EOT >> $HOME/.bashrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/.go
export GOBIN=$GOPATH/bin
export GO111MODULE=on
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
EOT
source ~/.bashrc
Test the installation:
$ go version
go version go1.19.5 linux/amd64
Compile marsd:
git clone https://github.com/mars-protocol/hub
cd hub
git checkout v1.0.0-rc7
make install
Initialize config folder:
marsd init <moniker> --chain-id ares-1
Create a key to be used as the validator operator – make sure you save the mnemonics!
marsd keys add <key-name>
Download genesis file:
wget -O ~/.mars/config/genesis.json https://raw.githubusercontent.com/mars-protocol/networks/main/ares-1/genesis.json
Set seed node(s):
export SEEDS=`[email protected]:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:18556`
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" ~/.mars/config/config.toml
You can now launch the network!
marsd start
However, running the network this way requires a shell to always be open. You can, instead, create a service file that will manage running the network for you.
sudo cat <<EOF >> /etc/systemd/system/marsd.service
[Unit]
Description=Mars Service
After=network.target
[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME
ExecStart=$HOME/.go/bin/marsd start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl start marsd
journalctl -o cat -fu marsd
There are certain files that you need to backup to be able to restore your validator if, for some reason, it is damaged or lost in some way. Please make a secure backup of the following file(s):
~/.mars/config/priv_validator_key.json
It is recommended that you encrypt the backup of these file(s).