Umee "canon-2" / Guides / Snapshot services

RPC    |    API     |   EXPLORER
 

NODE SETUP GUIDE

 

Install GO & Dependencies HERE

Install binaries & Run node

cd $HOME
git clone https://github.com/umee-network/umee.git
cd umee
ver='v5.0.0'
git checkout ${ver}
make install

umeed init <NODE_NAME> --chain-id canon-2

wget -qO $HOME/.umee/config/genesis.json "https://raw.githubusercontent.com/umee-network/umee/canon-2/networks/canon-2/genesis.json"

sha256sum $HOME/.umee/config/genesis.json
#right output:  ecc7dc53b752ef70bc75567c614b402cc281603d66b2d5b89eb9eeeaf1b545c5

#create service file
sudo tee /etc/systemd/system/umeed.service << EOF
[Unit]
Description=Umee-Testnet
After=network-online.target
#
[Service]
User=$USER
ExecStart=$(which umeed) start
RestartSec=10
Restart=on-failure
LimitNOFILE=65535
#
[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable umeed.service


STATE SYNC SERVICE
 

Please make sure You have latest, officially launched version of Umee binaries.



sudo systemctl stop umeed.service
umeed tendermint unsafe-reset-all --home $HOME/.umee

SNAP_RPC="http://173.212.215.104:26657"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash); \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.umee/config/config.toml; \
wget -qO $HOME/.umee/config/addrbook.json https://snapshots.theamsolutions.info/umee-test-adrb.json

sudo systemctl restart umeed.service && sudo journalctl -u umeed.service -f -o cat

Use command below to switch off your State Sync mode, after node fully synced to avoid problems in future node restarts!

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" $HOME/.umee/config/config.toml

A fully synced node supposed to be ready in 10-15 min. depending on computer/bandwidth power.
Enjoy. 

 

 DATA SNAPSHOT SERVICE

#check snapshot height  : curl -s https://snapshots.theamsolutions.info | egrep -o ">umee-test*.*tar" | tr -d ">"

snap=$(curl -s https://snapshots.theamsolutions.info | egrep -o ">umee-test*.*tar" | tr -d ">")
sudo systemctl stop umeed
cp $HOME/.umee/data/priv_validator_state.json $HOME
rm -rf  $HOME/.umee/data
wget -P $HOME https://snapshots.theamsolutions.info/${snap}
tar xf $HOME/${snap} -C $HOME/.umee
rm $HOME/${snap}
mv $HOME/priv_validator_state.json $HOME/.umee/data
wget -q -O $HOME/.umee/config/addrbook.json https://snapshots.theamsolutions.info/umee-test-adrb.json
sudo systemctl restart umeed
journalctl -u umeed -f -o cat

 

PEGGO SETUP

 

cd $HOME; git clone https://github.com/umee-network/peggo.git
cd peggo; git checkout v1.4.0
make install

#create ETH key and fund it with some Goerli ETH. Save private key.
#create Umee key for orchestrator and fund it with some Umee tokens.

#create variables 

CONTRACT="0x4d6D7b1dF43C9dE926BeC5F733980Ad7da6D9486"
UMEE_RPC="http://localhost:26657" # this flag can be removed If U use default port 26657
ETH_RPC="GOERLI_RPC_HERE" # for example https://rpc.ankr.com/eth_goerli
ETH_PK="237efb35d6c9b..." # your Private ETH goerli key
UMEE_CHAIN="canon-2"
KEYRING_PASS="keyring_pass"
KEYRING_PATH="$HOME/.umee"
ORCH_KEY="umee1..." # your umee orchestrator key
ALCHEMY_WSS="wss://..." # register at www.alchemy.com

#create service file

sudo tee /etc/systemd/system/peggod.service << EOF
[Unit]
Description=Peggo Service
After=network.target
[Service]
User=$USER
Type=simple
ExecStart=$(which peggo) orchestrator $CONTRACT\
 --log-level debug \
 --log-format text \
 --tendermint-rpc="$UMEE_RPC" \
 --eth-rpc="$ETH_RPC" \
 --eth-alchemy-ws="$ALCHEMY_WSS" \
 --relay-batches=true \
 --valset-relay-mode=minimum \
 --eth-merge-pause=false \
 --cosmos-gas-prices="0.0025uumee" \
 --cosmos-chain-id=$UMEE_CHAIN \
 --cosmos-keyring=os \
 --cosmos-keyring-dir="$KEYRING_PATH" \
 --cosmos-from=$ORCH_KEY \
 --cosmos-from-passphrase="$KEYRING_PASS" \
 --oracle-providers="osmosis,huobi,okx,coinbase"
Environment=PEGGO_ETH_PK=$ETH_PK
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
EOF

sudo systemctl daemon-reload
sudo systemctl enable peggod.service
sudo systemctl start peggod.service

#register orchestrator to Umee chain

UMEE_KEY="umee1..." # validator main wallet key
ORCH_KEY="umee1..." # your umee orchestrator key
GOERLI_KEY="0x..." # your goerli ETH key created for Peggo
VALOPER_KEY="umeevaloper1..." # validator valoper key
UMEE_CHAIN="canon-2"

#send tx

umeed tx gravity set-orchestrator-address $VALOPER_KEY $ORCH_KEY $GOERLI_KEY \
--from $UMEE_KEY --chain-id $UMEE_CHAIN  --fees 5000uumee

#restart Peggod service and check logs

sudo systemctl restart peggod.service
journalctl -u peggod.service -f -o cat


PRICE FEEDER SETUP
 

#create Umee key for Price Feeder and fund it with some tokens (100 for example)

cd $HOME
git clone https://github.com/ojo-network/price-feeder
cd price-feeder
git checkout umee/v2.1.4
make install

mkdir $HOME/pfd-config

#download recommended version of config (wont be redundant to double check config actuality at Discord)

curl -s "https://raw.githubusercontent.com/umee-network/umee/b1544c48eafd86cfcb3dbfe42fdf57107a89ac32/price-feeder/price-feeder.example.toml" \
> $HOME/pfd-config/price-feeder.toml

#open file $HOME/test/price-feeder.toml and set right values as commented below only for mentioned fields

[account]
address = "umee1..."  # your newly created key for PFD
chain_id = "canon-2"
validator = "umeevaloper..." #your Validator valoper address

[keyring]
backend = "os"
dir = "home_dir" # path to $HOME/.umee 
pass = "key_ring_pass" # your keyring password

[telemetry]
global_labels = [["chain-id", "canon-2"]] # set Umee chain id fo telemetry

#create pfd.service file

PFD_PASS="your-keyring-pass"

sudo tee /etc/systemd/system/price-feeder.service << EOF
Description=Price-Feeder
After=network.target
[Service]
User=$USER
Environment=PRICE_FEEDER_PASS="$PFD_PASS"
ExecStart=$(which price-feeder) $HOME/pfd-config/price-feeder.toml --log-level debug
RestartSec=10
Restart=on-failure
Type=simple
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

#launch pfd

sudo systemctl daemon-reload
sudo systemctl enable price-feeder.service
sudo systemctl start price-feeder.service

#register PFD acc to the chain and restart

UMEE_KEY="umee1..." # validator main wallet key
PFD_KEY="umee1..." # PFD key

umeed tx oracle delegate-feed-consent $UMEE_KEY $PFD_KEY --chain-id=canon-2 --fees 5000uumee

sudo systemctl restart pfd.service
journalctl -u pfd.service -f -o cat

 

GOOD LUCK!!!

 

AM Solutions © Copyright. All rights reserved.