Skip to content

Install

Website | Twitter | Discord | Explorer


Public Endpoints | Genesis | Addrbook

https://elys-test.rpc.moonbridge.team
Chain ID: elystestnet-1 | Latest Version: v0.30.0 | Custom Port: 146
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
MONIKER="YOUR_MONIKER_NAME"

Update system and install tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu bashtop -y

Install GO

cd $HOME
version="1.21.5"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Install Cosmovisor

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

Download and install

cd $HOME
git clone https://github.com/elys-network/elys.git
cd elys
git checkout v0.30.0
make install
elysd version --long | grep -e commit -e version

Config and Init node

# Set node configuration
elysd config chain-id elystestnet-1
elysd config keyring-backend test
elysd config node tcp://localhost:14657
# Initialize node
elysd init $MONIKER --chain-id elystestnet-1
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.team/testnet/elys/genesis.json > $HOME/.elys/config/genesis.json
curl -Ls https://snapshots.moonbridge.team/testnet/elys/addrbook.json > $HOME/.elys/config/addrbook.json
# Set seeds and peers
SEEDS="8d9845f7ef934ade824981b9145a26f00192b575@45.79.24.206:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:22056"
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.elys/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0018ibc/2180E84E20F5679FCC760D8C165B60F42065DEF7F46A72B447CFF1B7DC6C0A65,0.00025ibc/E2D2F6ADCC68AA3384B2F5DFACCA437923D137C14E86FB8A10207CF3BED0C8D4,0.00025uelys\"|" $HOME/.elys/config/app.toml
sed -i -e "s|^timeout_commit *=.*|timeout_commit = \"3s\"|" $HOME/.elys/config/config.toml
sed -i -e "s|^db_backend *=.*|db_backend = \"pebbledb\"|" $HOME/.elys/config/config.toml
sed -i "s|^app-db-backend *=.*/app-db-backend = \"pebbledb\"|" $HOME/.elys/config/app.toml
# Setting pruning
sed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.elys/config/app.toml
sed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.elys/config/app.toml
sed -i -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' $HOME/.elys/config/app.toml
sed -i -e 's|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.elys/config/app.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.elys/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.elys/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:14658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:14657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14660\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14656\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):14656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14666\"%" $HOME/.elys/config/config.toml
sed -i -e "s%:1317%:14617%g; s%:8080%:14680%g; s%:9090%:14690%g; s%:9091%:14691%g; s%:8545%:14645%g; s%:8546%:14646%g; s%:6065%:14665%g" $HOME/.elys/config/app.toml

Configure Cosmovisor

mkdir -p $HOME/.elys/cosmovisor/genesis/bin
mkdir -p $HOME/.elys/cosmovisor/upgrades
cp $HOME/go/bin/elysd $HOME/.elys/cosmovisor/genesis/bin/

Create service

sudo tee /etc/systemd/system/elysd.service > /dev/null << EOF
[Unit]
Description=Elys Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="LD_LIBRARY_PATH=/usr/local/lib"
Environment="DAEMON_NAME=elysd"
Environment="DAEMON_HOME=$HOME/.elys"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable elysd

Download latest snapshot

curl -o - -L https://snapshots.moonbridge.team/testnet/elys/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.elys
[[ -f $HOME/.elys/data/upgrade-info.json ]] && cp $HOME/.elys/data/upgrade-info.json $HOME/.elys/cosmovisor/genesis/upgrade-info.json

Start service and check the logs

sudo systemctl start elysd && sudo journalctl -u elysd -f --no-hostname -o cat

Create wallet

elysd keys add wallet

Check wallet balance

elysd q bank balances $(elysd keys show wallet -a)

Create validator

elysd tx staking create-validator \
--amount 1000000uelys \
--pubkey $(elysd tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--security-contact "YOUR_EMAIL_ADDRESS" \
--chain-id elystestnet-1 \
--commission-rate 0.10 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.00025uelys \
-y

Delete node

sudo systemctl stop elysd
sudo systemctl disable elysd
sudo rm -rf /etc/systemd/system/elysd.service
sudo systemctl daemon-reload
sudo rm -f $(which elysd)
sudo rm -rf $HOME/.elys
sudo rm -rf $HOME/elys