Skip to content

Install

Website

Twitter

Discord

GitHub

Explorer

dApp

Chain ID: elys-1 Latest Version: v4.1.0 Custom Port: 160
Section titled “Chain ID: Latest Version: Custom Port: ”
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
Section titled “Specify the name of your “MONIKER” (validator) which will be visible in the explorer”
MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu btop -y
cd $HOME
version="1.23.6"
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
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
cd $HOME
git clone https://github.com/elys-network/elys.git
cd elys
git checkout v4.1.0
make install
elysd version --long | grep -e commit -e version
# Set node configuration
elysd config set client chain-id elys-1
elysd config set client keyring-backend file
elysd config set client node tcp://localhost:16057
# Initialize node
elysd init $MONIKER --chain-id elys-1
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.org/mainnet/elys/genesis.json > $HOME/.elys/config/genesis.json
curl -Ls https://snapshots.moonbridge.org/mainnet/elys/addrbook.json > $HOME/.elys/config/addrbook.json
# Set seeds and peers
SEEDS=""
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.0003uelys,0.001ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349,0.001ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9\"|" $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-interval *=.*|pruning-interval = "10"|' $HOME/.elys/config/app.toml
sed -i -e 's|^db_backend *=.*|db_backend = "pebbledb"|' $HOME/.elys/config/config.toml
sed -i -e 's/timeout_commit = "5s"/timeout_commit = "3s"/g' $HOME/.elys/config/config.toml
sed -i -e 's|^app-db-backend *=.*|app-db-backend = "pebbledb"|' $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:16058\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:16057\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:16060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:16056\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):16056\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":16066\"%" $HOME/.elys/config/config.toml
sed -i -e "s%:1317%:16017%g; s%:8080%:16080%g; s%:9090%:16090%g; s%:9091%:16091%g; s%:8545%:16045%g; s%:8546%:16046%g; s%:6065%:16065%g" $HOME/.elys/config/app.toml
mkdir -p $HOME/.elys/cosmovisor/genesis/bin
mkdir -p $HOME/.elys/cosmovisor/upgrades
cp $HOME/go/bin/elysd $HOME/.elys/cosmovisor/genesis/bin/
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="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
curl -o - -L https://snapshots.moonbridge.org/mainnet/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
sudo systemctl start elysd && sudo journalctl -u elysd -f --no-hostname -o cat
elysd keys add wallet
elysd q bank balances $(elysd keys show wallet -a)

Get pubkey

elysd comet show-validator
cd $HOME/.elys/config
nano validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000uelys",
"moniker": "YOUR_MONIKER_NAME",
"identity": "YOUR_KEYBASE_ID",
"details": "YOUR_DETAILS",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_EMAIL_ADDRESS",
"commission-rate": "0.05",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
elysd tx staking create-validator $HOME/.elys/config/validator.json \
--chain-id elys-1 \
--from wallet \
--gas-prices "0.0003uelys" \
--gas auto \
--gas-adjustment 1.4 \
-y
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