Installation Node

  • Network Type: Testnet
  • Chain-id: raitestnet_77701-1
  • Current Node version: v0.3.0
  • Hardware requirements

    The following requirements are recommended:

    • 4 or more physical CPU cores
    • At least 200GB of SSD disk storage
    • At least 8GB of memory (RAM)
    • At least 100mbps network bandwidth

    Install dependencies Required

    sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

    Install go

    We are gonna use GO Version 1.22.5 If you already have GO installed you can skip this

    ver="1.22.5"
    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"
    echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
    source ~/.bash_profile
    go version

    Install binary ( New Install )

    wget https://github.com/RepublicAI/networks/releases/download/v0.1.0/republicd-linux-amd64 -O republicd
    chmod +x republicd
    mv republicd $HOME/go/bin/

    Verify that you’ve installed successfully

    republicd version  --long | grep -e version -e commit

    Initialize Node

    Please change <MONIKER> To your own Moniker.

    republicd init <MONIKER> --chain-id raitestnet_77701-1

    Download Genesis file and addrbook

    • Genesis
    curl -L https://snapshot.vinjan-inc.com/republic/genesis.json > $HOME/.republic/config/genesis.json
    • Addrbook
    curl -L https://snapshot.vinjan-inc.com/republic/addrbook.json > $HOME/.republic/config/addrbook.jso

    Custom Port

    PORT=133
    sed -i -e "s%:26657%:${PORT}57%" $HOME/.republic/config/client.toml
    sed -i -e "s%:26658%:${PORT}58%; s%:26657%:${PORT}57%; s%:6060%:${PORT}60%; s%:26656%:${PORT}56%; s%:26660%:${PORT}60%" $HOME/.republic/config/config.toml
    sed -i -e "s%:1317%:${PORT}17%; s%:9090%:${PORT}90%; s%:8545%:${PORT}45%; s%:8546%:${PORT}46%; s%:6065%:${PORT}65%" $HOME/.republic/config/app.toml

    Configure Peer & Gas

    peers="6313f892ee50ca0b2d6cc6411ac5207dbf2d164b@peers-t.republic.vinjan-inc.com:13356,7fef6e3bb5c254c777449e09e9cf0ee40f4cdee3@195.201.160.23:13356,1fc361b76cb5d3190027e18299a22e3dcb689dd9@54.159.96.158:26656"
    sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$peers\"|" $HOME/.republic/config/config.toml
    sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"2500000000arai\"/" $HOME/.republic/config/app.toml

    Prunning

    sed -i \
    -e 's|^pruning *=.*|pruning = "custom"|' \
    -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
    -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
    -e 's|^pruning-interval *=.*|pruning-interval = "20"|' \
    $HOME/.republic/config/app.toml

    Indexer Off

    sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.republic/config/config.toml

    create service file and start node

    Create service file Create a wardend.service file in the /etc/systemd/system folder with the following code. You can change USER with your Linux user name. You need sudo previlege to do this step.

    sudo tee /etc/systemd/system/republicd.service > /dev/null <<EOF
    [Unit]
    Description=republic
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=$(which republicd) start
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=65535
    
    [Install]
    WantedBy=multi-user.target
    EOF
    • Enable Service and Start Node
    sudo systemctl daemon-reload
    sudo systemctl enable republicd
    sudo systemctl restart republicd
    sudo journalctl -u republicd -f -o cat

    -Stop

    Upgrade to v0.2.1

    wget https://github.com/RepublicAI/networks/releases/download/v0.2.1/republicd-linux-amd64 -O republicd
    chmod +x republicd
    sudo systemctl stop republicd
    mv republicd $HOME/go/bin/
    sudo systemctl restart republicd
    sudo journalctl -u republicd -f -o cat

    -Stop

    Upgrade to v.0.3.0

    wget https://github.com/RepublicAI/networks/releases/download/v0.3.0/republicd-linux-amd64 -O republicd
    chmod +x republicd
    sudo systemctl stop republicd
    mv republicd $HOME/go/bin/

    Use Snapshot

    Create Validator

    Heads up to the Cheat Sheets to create validator