Chain ID | Latest Version Tag | Custom Port |
---|---|---|
chiado_10010-1 | genesis | 178 |
Setup validator name
Replace YOUR_MONIKER_GOES_HERE with your validator name
MONIKER="YOUR_MONIKER_GOES_HERE"
Install dependencies
Update system and install build tools
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade
Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.23.2.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)
Download binaries
# Download project binaries
mkdir -p $HOME/.warden/cosmovisor/genesis/bin
wget -O $HOME/.warden/cosmovisor/genesis/bin/wardend https://snapshots.kjnodes.com/warden-testnet/wardend-v0.5.4-linux-amd64
chmod +x $HOME/.warden/cosmovisor/genesis/bin/wardend
# Create application symlinks
sudo ln -s $HOME/.warden/cosmovisor/genesis $HOME/.warden/cosmovisor/current -f
sudo ln -s $HOME/.warden/cosmovisor/current/bin/wardend /usr/local/bin/wardend -f
Install Cosmovisor and create a service
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.6.0
# Create service
sudo tee /etc/systemd/system/warden-testnet.service > /dev/null << EOF
[Unit]
Description=warden node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.warden"
Environment="DAEMON_NAME=wardend"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.warden/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable warden-testnet.service
Initialize the node
# Set node configuration
wardend config set client chain-id chiado_10010-1
wardend config set client keyring-backend test
wardend config set client node tcp://localhost:17857
# Initialize the node
wardend init $MONIKER --chain-id chiado_10010-1
# Download genesis and addrbook
curl -Ls https://snapshots.kjnodes.com/warden-testnet/genesis.json > $HOME/.warden/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/warden-testnet/addrbook.json > $HOME/.warden/config/addrbook.json
# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@warden-testnet.rpc.kjnodes.com:17859\"|" $HOME/.warden/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"250000000000000award\"|" $HOME/.warden/config/app.toml
# Set pruning
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/.warden/config/app.toml
# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:17858\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:17857\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:17860\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:17856\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":17866\"%" $HOME/.warden/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:17817\"%; s%^address = \":8080\"%address = \":17880\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:17890\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:17891\"%; s%:8545%:17845%; s%:8546%:17846%; s%:6065%:17865%" $HOME/.warden/config/app.toml
Download latest chain snapshot
curl -L https://snapshots.kjnodes.com/warden-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.warden
[[ -f $HOME/.warden/data/upgrade-info.json ]] && cp $HOME/.warden/data/upgrade-info.json $HOME/.warden/cosmovisor/genesis/upgrade-info.json
Start service and check the logs
sudo systemctl start warden-testnet.service && sudo journalctl -u warden-testnet.service -f --no-hostname -o cat
Set up Slinky
This guide is only for validator nodes
Official documentation: https://docs.wardenprotocol.org/operate-a-node/operate-connect
The Slinky Oracle consists of two main elements:
-
An on-chain component that retrieves price data from the sidecar with each block, forwards these prices to the blockchain through vote extensions, and compiles prices from all validators involved.
-
A sidecar process dedicated to polling price information from various providers and delivering this data to the on-chain component.
Step 1: Clone the Repository and build binaries
# Clone repository
cd $HOME
rm -rf slinky
git clone https://github.com/skip-mev/slinky.git
cd slinky
# Build binaries
make build
# Move binary to local bin
mv build/slinky /usr/local/bin/
rm -rf build
Step 2: Run oracle
Create systemd service
sudo tee /etc/systemd/system/warden-slinky.service > /dev/null <<EOF
[Unit]
Description=W Slinky Oracle
After=network-online.target
[Service]
User=$USER
ExecStart=$(which slinky) --market-map-endpoint 127.0.0.1:17890
Restart=on-failure
RestartSec=30
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and start systemd service
sudo systemctl daemon-reload
sudo systemctl enable warden-slinky.service
sudo systemctl start warden-slinky.service
Step 3: Enable Oracle Vote Extension
In order to utilize the Slinky oracle data in the Initia node, the Oracle setting should be enabled in the config/app.toml file.
###############################################################################
### Oracle ###
###############################################################################
[oracle]
# This option indicates whether the oracle is enabled.
enabled = "true"
# This is the URL of the out-of-process oracle sidecar used to connect
# to the oracle sidecar when the application boots up. Note that the address
# can be modified at any point, but will only take effect after the application is
# restarted. This can be the address of an oracle container running on the same
# machine or a remote machine.
oracle_address = "127.0.0.1:8080"
# This is the time that the client is willing to wait for responses from
# the oracle before timing out.
client_timeout = "2s"
# This option determines whether oracle metrics are enabled. Specifically
# this enables instrumentation of the oracle client and the interaction between
# the oracle and the app.
metrics_enabled = "true"
Step 5: Check the systemd logs
To check service logs use command below:
journalctl -fu warden-slinky -o cat
Successfull Log example:
14T19:07:08.296Z","num_prices":65}
May 14 19:07:08 slinky[877177]: {"level":"info","ts":"2024-05-14T19:07:08.547Z","caller":"oracle/oracle.go:163","msg":"oracle updated prices","pid":877177,"process":"oracle","last_sync":"2024-05-14T19:07:08.547Z","num_prices":65}
May 14 19:07:08 slinky[877177]: {"level":"info","ts":"2024-05-14T19:07:08.796Z","caller":"oracle/oracle.go:163","msg":"oracle updated prices","pid":877177,"process":"oracle","last_sync":"2024-05-14T19:07:08.796Z","num_prices":65}
May 14 19:07:09 slinky[877177]: {"level":"info","ts":"2024-05-14T19:07:09.045Z","caller":"oracle/oracle.go:163","msg":"oracle updated prices","pid":877177,"process":"oracle","last_sync":"2024-05-14T19:07:09.045Z","num_prices":65}
May 14 19:07:09 slinky[877177]: {"level":"info","ts":"2024-05-14T19:07:09.296Z","caller":"oracle/oracle.go:163","msg":"oracle updated prices","pid":877177,"process":"oracle","last_sync":"2024-05-14T19:07:09.296Z","num_prices":65}
May 14 19:07:09 slinky[877177]: {"level":"info","ts":"2024-05-14T19:07:09.544Z","caller":"marketmap/fetcher.go:116","msg":"successfully fetched market map data from module; checking if market map has changed","pid":877177,"process":"provider_orchestrator"}
Step 6: Check Slinky oracle prices
To check oracle prices use command below:
curl -s http://localhost:18080/slinky/oracle/v1/prices | jq
Successfull Output example:
{
"prices": {
"AAVE/USD": "14586392373",
"ADA/USD": "3450582900",
"AEVO/USD": "358748700",
"ALGO/USD": "1213849710",
"APE/USD": "1147196400",
"APT/USD": "10256515410",
"ARB/USD": "560307510",
"ARKM/USD": "1700808600",
"ASTR/USD": "583491270",
"ATOM/USD": "4735682700",
"AVAX/USD": "2676225330",
"AXL/USD": "822074145",
"BCH/USD": "3601477200",
"BLUR/USD": "2487257700",
"BNB/USD": "5913857400",
"BONK/USD": "2265070132",
"BTC/USD": "6768883272",
"COMP/USD": "4363943100",
"CRV/USD": "2501247900",
"DOGE/USD": "14044162200",
"DOT/USD": "4180892306",
"DYDX/USD": "1087038540",
"DYM/USD": "1655840100",
"EOS/USD": "4701706500",
"ETC/USD": "1878783930",
"ETH/USD": "2520394488",
"FET/USD": "13359641700",
"FIL/USD": "3713398800",
"GRT/USD": "1627410015",
"HBAR/USD": "514869680",
"ICP/USD": "825122010",
"IMX/USD": "1460876670",
"INJ/USD": "2022383340",
"JTO/USD": "2346826071",
"JUP/USD": "10145393250",
"LDO/USD": "1104113250",
"LINK/USD": "11431992000",
"LTC/USD": "7107021600",
"MANA/USD": "3176210447",
"MATIC/USD": "3555168297",
"MKR/USD": "1142899410",
"NEAR/USD": "4635752700",
"NTRN/USD": "39677206",
"OP/USD": "1687149029",
"ORDI/USD": "3426599700",
"PEPE/USD": "98980665000",
"PYTH/USD": "3678423300",
"RUNE/USD": "5373505766",
"SEI/USD": "4227039000",
"SHIB/USD": "17827256000",
"SNX/USD": "1487957700",
"SOL/USD": "17553204150",
"STRK/USD": "399420210",
"STX/USD": "1796181792",
"SUI/USD": "19546308000",
"TIA/USD": "604901463",
"TRX/USD": "16463467500",
"UNI/USD": "7960423800",
"USDT/USD": "999300489",
"WLD/USD": "2189366370",
"WOO/USD": "1958988083",
"XLM/USD": "956890000",
"XRP/USD": "5314277400"
},
"timestamp": "2024-10-24T17:49:59.331746639Z",
"version": "v1.0.8-5-gd8867073"
}