This documentation under development by nodex.one team! πŸ‘·β€β™‚οΈπŸ‘‹
Networks
Mainnet
βš”οΈ Install

Manual Installation

Let's explore the manual installation process as we set up a node with Cosmovisor!

Install Dependencies

Update system package and install build tools
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade

Secure Setup

πŸ“’

While this step is optional, it is strongly recommended for those running on the mainnet to take a closer look, as it plays a crucial role in ensuring basic security. If you don't want to, you can skip ahead to configure moniker.

Setup ssh for entangle user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser entangle --disabled-password -q
sudo usermod -aG sudo entangle
sudo -u entangle bash -c 'mkdir -p ~/.ssh && echo "YOUR_PUBLIC_SSH_KEY" >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys'

Configure Moniker

Replace <your-moniker-name> with your own validator name
MONIKER="<your-moniker-name>"

Install Go

install go version 1.21.1
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.1.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Build Binaries

Cloning project repository & Compile binaries
cd $HOME
rm -rf entangle-blockchain
git clone https://github.com/Entangle-Protocol/entangle-blockchain
cd entangle-blockchain
git checkout main
make build

Latest commit : ab99e72d09196ab52fab2042341b0949a798e38e

Prepare binaries for cosmovisor
mkdir -p $HOME/.entangled/cosmovisor/genesis/bin
mv build/entangled $HOME/.entangled/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.entangled/cosmovisor/genesis $HOME/.entangled/cosmovisor/current -f
sudo ln -s $HOME/.entangled/cosmovisor/current/bin/entangled /usr/local/bin/entangled -f

Cosmovisor Setup

Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Create Service

Create a systemd service
sudo tee /etc/systemd/system/entangle.service > /dev/null << EOF
[Unit]
Description=entangle node service
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home $HOME/.entangled --chain-id entangle_33033-1
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.entangled"
Environment="DAEMON_NAME=entangled"
Environment="UNSAFE_SKIP_BACKUP=true"
 
[Install]
WantedBy=multi-user.target
EOF

Enable Service

Enable entangle systemd service
sudo systemctl daemon-reload
sudo systemctl enable entangle

Initialize Node

Setting node configuration
entangled config chain-id entangle_33033-1
entangled config keyring-backend file
entangled config node tcp://localhost:12757
Initialize node
entangled init $MONIKER --chain-id entangle_33033-1

Download Genesis & Addrbook

Download genesis & addrbook file
curl -Ls https://snap.nodex.one/entangle/genesis.json > $HOME/.entangled/config/genesis.json
curl -Ls https://snap.nodex.one/entangle/addrbook.json > $HOME/.entangled/config/addrbook.json

sha256sum genesis.json : 1f5c9a4fff8fba674ba1334a2bac8c9bcdcac5ffe801b487b3f76b06e05476ec

Configure Seeds

Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"5f5cfac5c38506fbb4275c19e87c4107ec48808d@seeds.nodex.one:12710\"|" $HOME/.entangled/config/config.toml

Configure Gas Prices

Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"10aNGL\"|" $HOME/.entangled/config/app.toml

Pruning Setting

Configure pruning setting
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 = "19"|' \
  $HOME/.entangled/config/app.toml

Custom Port

Please note that updating the port is optional!

Configure a custom port
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:12758\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:12757\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:12760\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:12756\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":12766\"%" $HOME/.entangled/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:12717\"%; s%^address = \":8080\"%address = \":12780\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:12790\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:12791\"%; s%:8545%:12745%; s%:8546%:12746%; s%:6065%:12765%" $HOME/.entangled/config/app.toml

Download Snapshots

Download latest chain snapshot
curl -L https://snap.nodex.one/entangle/entangle-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.entangled
[[ -f $HOME/.entangled/data/upgrade-info.json ]] && cp $HOME/.entangled/data/upgrade-info.json $HOME/.entangled/cosmovisor/genesis/upgrade-info.json

Start Service

Letss f*cking goooo!
sudo systemctl start entangle