Installation Node

  • Network Type: Testnet
  • Chain-id: self-dev-1
  • Current Node version: v
  • Hardware requirements

    The following requirements are recommended for running Defund:

    • 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.20.4 If you already have GO installed you can skip this

    ver="1.20.4"
    cd $HOME
    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

    cd $HOME
    mkdir -p /root/go/bin/
    wget https://ss-t.self.nodestake.top/selfchaind
    chmod +x selfchaind
    mv selfchaind /root/go/bin/

    Initialize Node

    Please change <MONIKER> To your own Moniker.

    selfchaind init $MONIKER --chain-id self-dev-1
    selfchaind config chain-id self-dev-1
    selfchaind config keyring-backend test

    Download Genesis file and addrbook

    • Genesis
    wget -O $HOME/.selfchain/config/genesis.json https://raw.githubusercontent.com/hotcrosscom/selfchain-genesis/main/networks/devnet/genesis.json

    Configure Seeds and Peers

    SEEDS=""
    sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.selfchain/config/config.toml
    peers="94a7baabb2bcc00c7b47cbaa58adf4f433df9599@157.230.119.165:26656,d3b5b6ca39c8c62152abbeac4669816166d96831@165.22.24.236:26656,35f478c534e2d58dc2c4acdf3eb22eeb6f23357f@165.232.125.66:26656"
    sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.selfchain/config/config.toml
    sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.005uself\"|" $HOME/.selfchain/config/app.toml

    config pruning

    pruning="custom"
    pruning_keep_recent="100"
    pruning_keep_every="0"
    pruning_interval="10"
    sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.selfchain/config/app.toml
    sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.selfchain/config/app.toml
    sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.selfchain/config/app.toml
    sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.selfchain/config/app.toml

    create service file and start node

    Create service file Create a selfchaind.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/selfchaind.service > /dev/null <<EOF
    [Unit]
    Description=selfchain
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=$(which selfchaind) 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 selfchaind
    sudo systemctl restart selfchaind
    sudo journalctl -u selfchaind -f -o cat

    Create Validator

    Heads up to the Cheat Sheets to create validator