ubuntu-20.04
ubuntu-22.04
CPU:
RAM:
16 cores
64GB
Storage:
500GB
Start a codespace from a template and get to developing with the power of a virtual machine in the cloud.
Official Documentation
ubuntu-20.04
ubuntu-22.04
CPU:
RAM:
16 cores
64GB
Storage:
500GB
Version
v0.8.9+commit.e5eed63a
Binary:
uniond/v1.1.1-rc1.alpha1Peers:
10
Node name
Port
Pruning
Pruning keep recent
Pruning interval
### Install dependenciessudo apt update && sudo apt upgrade -ysudo apt install git gcc make jq curl lz4### Install gocd $HOMEVER=1.23.5wget -qO go.tar.gz "https://golang.org/dl/go$VER.linux-amd64.tar.gz"sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gzrm go.tar.gzecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bashrcsource ~/.bashrcmkdir -p ~/go/bin### Download binary and buildcd $HOMErm -rf uniondgit clone https://github.com/unionlabs/union uniondcd uniondAPP_VERSION=uniond/v1.1.1-rc1.alpha1git checkout tags/$APP_VERSION -b $APP_VERSIONcd uniond && go build -o uniond ./cmd/uniond && mv uniond ../../go/bin/.### Config and init appuniond init --chain-id union-testnet-10wget -O $HOME/.union/config/genesis.json https://st-snap-1.stakeme.pro/union/testnet/pruned/genesis.jsonwget -O $HOME/.union/config/addrbook.json https://st-snap-1.stakeme.pro/union/testnet/pruned/addrbook.json### Set seeds and peersSEED=26a6eaf0494a269ec5b68610e61d8a73bb80198f@union-testnet-seed.stakeme.pro:17156PEERS=[email protected]:15656,[email protected]:24656,[email protected]:32220,[email protected]:25656,[email protected]:24656,[email protected]:26656,[email protected]:26656,[email protected]:24656,[email protected]:26656,[email protected]:26656sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.union/config/config.toml### Set custom ports in app.toml and config.tomlsed -i.bak -e "s%:1317%:317%g;s%:8080%:080%g;s%:9090%:090%g;s%:9091%:091%g;s%:8545%:545%g;s%:8546%:546%g;s%:6065%:065%g" $HOME/.union/config/app.tomlsed -i.bak -e "s%:26658%:658%g;s%:26657%:657%g;s%:6060%:060%g;s%:26656%:656%g;s%:26660%:660%g" $HOME/.union/config/config.toml### Config pruningsed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.union/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"\"/" $HOME/.union/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"\"/" $HOME/.union/config/app.toml### Set minimum gas pricesed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0muno"|g' $HOME/.union/config/app.toml### Disable indexing if neededsed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.union/config/config.toml### Create service filesudo tee /etc/systemd/system/uniond.service > /dev/null <<EOF[Unit]Description=Uniond DaemonAfter=network-online.target[Service]User=$USERWorkingDirectory=$HOME/.unionExecStart=$(which uniond) startRestart=on-failureRestartSec=5LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF### Reset and state syncuniond tendermint unsafe-reset-all --home $HOME/.unionSTATYSYNC_RPC=https://union-testnet-rpc.stakeme.pro:443LATEST_HEIGHT=$(curl -s $STATYSYNC_RPC/block | jq -r .result.block.header.height);BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));TRUST_HASH=$(curl -s "$STATYSYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$STATYSYNC_RPC,$STATYSYNC_RPC\"| ;s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.union/config/config.toml### Enable and start servicesudo systemctl daemon-reloadsudo systemctl enable uniond.servicesudo systemctl restart uniond.service && sudo journalctl -u uniond.service -f -o cat