Installation
Complete guide to install and configure DoraFactory validator node.
Installation
Install Go (if needed)
cd $HOME
VER="1.20.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
Set Variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="MONIKER"" >> $HOME/.bash_profile
echo "export DORA_CHAIN_ID="vota-testnet"" >> $HOME/.bash_profile
echo "export DORA_PORT="20"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Download Binary
Current Version: v1.0.0
cd $HOME
rm -rf dora
git clone https://github.com/DoraFactory/doravota.git
cd dora
git checkout v1.0.0
make build
sudo mv $HOME/dora/build/dorad $(which dorad)
Config and Init App
dorad init $MONIKER --chain-id $DORA_CHAIN_ID
sed -i \
-e "s/chain-id = .*/chain-id = \"vota-testnet\"/" \
-e "s/keyring-backend = .*/keyring-backend = \"os\"/" \
-e "s/node = .*/node = \"tcp:\/\/localhost:${DORA_PORT}657\"/" $HOME/.dora/config/client.toml
Download Genesis and Addrbook
wget -O $HOME/.dora/config/genesis.json https://server-1.ruangnode.com/testnet/dora/genesis.json
wget -O $HOME/.dora/config/addrbook.json https://server-1.ruangnode.com/testnet/dora/addrbook.json
Set Seeds and Peers
SEEDS="92e80e4f4d1103a7bcfe7258fb3a4cdf585def2d@seed.ruangnode.com:${DORA_PORT}656"
PEERS="92e80e4f4d1103a7bcfe7258fb3a4cdf585def2d@peer.ruangnode.com:${DORA_PORT}656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.dora/config/config.toml
Set Custom Ports
# Set custom ports in app.toml
sed -i.bak -e "s%:1317%:${DORA_PORT}317%g;
s%:8080%:${DORA_PORT}080%g;
s%:9090%:${DORA_PORT}090%g;
s%:9091%:${DORA_PORT}091%g;
s%:8545%:${DORA_PORT}545%g;
s%:8546%:${DORA_PORT}546%g;
s%:6065%:${DORA_PORT}065%g" $HOME/.dora/config/app.toml
# Set custom ports in config.toml
sed -i.bak -e "s%:26658%:${DORA_PORT}658%g;
s%:26657%:${DORA_PORT}657%g;
s%:6060%:${DORA_PORT}060%g;
s%:26656%:${DORA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${DORA_PORT}656\"%g;
s%:26660%:${DORA_PORT}660%g" $HOME/.dora/config/config.toml
Config Pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.dora/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.dora/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.dora/config/app.toml
Set Minimum Gas Price and Other Configs
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "10000000000peaka"|g' $HOME/.dora/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.dora/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.dora/config/config.toml
Create Service File
sudo tee /etc/systemd/system/dorad.service > /dev/null <<EOF
[Unit]
Description=DoraFactory node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.dora
ExecStart=$(which dorad) start --home $HOME/.dora
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable dorad
sudo systemctl restart dorad && sudo journalctl -u dorad -fo cat