Chain ID: union-1 | Node Version: v1.2.2
- Snapshot
- StateSync
- Genesis
- Addrbook
- LivePeers
Snapshot
Install Dependencies
sudo apt install lz4 && sudo apt install aria2
Stop Service
sudo systemctl stop uniond
Backup priv_validator_state.json
cp $HOME/.union/data/priv_validator_state.json $HOME/.union/priv_validator_state.json.backup
Reset Chain Data
uniond tendermint unsafe-reset-all --home $HOME/.union --keep-addr-book
Download Snapshot
aria2c -x 8 -s 8 https://snapshot.shazoes.xyz/mainnets/snapshot-union.tar.lz4 && lz4 -c -d snapshot-union.tar.lz4 | tar -x -C $HOME/.union && rm snapshot-union.tar.lz4
Restore Backup
mv $HOME/.union/priv_validator_state.json.backup $HOME/.union/data/priv_validator_state.json
Restart Service
sudo systemctl restart uniond && sudo journalctl -fu uniond -o cat
State Sync
Stop Service
sudo systemctl stop uniond
Backup priv_validator_state.json
cp $HOME/.union/data/priv_validator_state.json $HOME/.union/priv_validator_state.json.backup
Reset the data
uniond tendermint unsafe-reset-all --home $HOME/.union
Add Peers
PEERS="92252b61bf5b99193a2de4ddd326c3d260d28286@union-mainnet-rpc.shazoes.xyz:30956,2d318979f882046acea037038212ec1995db6390@65.109.58.158:24656,3dc8c8cfc996a9e80a77e0acb85f6ce858e6f8ff@152.53.210.25:30656,3ebf31d59814eb8edbbf3f9afffe7854b89725cf@148.251.245.34:14456,e18a68cddd88701eb38600969fc3ae180a3f7daf@65.108.232.168:18656,62e66380b3632533ef60f6befda96c696f6b046e@135.181.238.225:11256,b38b25a00938d3ed41bbb9a941ae18d5b25f2cd8@65.109.106.211:29656,f49f04e329313e01b8b32f9bdbd3aeff8a10774c@190.2.142.45:26656,04f27ef917d0ca4f8e007ea36fce2e31c98a8c29@184.107.244.74:18700,45e9650c107d712a749579df27a0fdebc54003bb@65.108.205.121:24656,05d21fc08002cc77df24c5718198b5eb872851d5@95.217.204.48:24656,b5082cb8c99b702492c4737dde68e6bbf55c01b7@188.40.85.190:14456,051fc5b615cb37e86ea4dce8d15e39fa14ae4739@66.45.237.130:26656,0889ba91b29b68924cf9ccfaab6614d66ec020ba@64.130.49.141:22256,0e6469210b919827056c36b520c9d8819beae50b@160.250.106.199:22656,ef7f5362f2344016f3c4d64240000f32891ba2df@65.108.2.61:24656,0e89105a11dcdca92a4d5a13221d4604d6e80b62@167.235.184.49:36656,0e92934b0d7ee2735673983534883b2b48367d77@40.160.53.197:26656,fefcba1133813ce05db6f766d3609abc9b9c77b3@46.232.248.39:30656,e611c382712170f9875d7e5d0f5121ced8950dc4@213.136.85.167:27656,56f2b99440b7e7f540c07ca88bc8a87f6386b1d6@65.21.132.31:25656,2a3dc9e7abd028aac54a69b07ed746d45f9a443e@46.37.123.81:26656,f7b4754004b33c67e2d59b443cd030c92e108c96@23.88.6.237:24656,5b5313396dea3a96dcd7e48af1d7666e1c0053c3@57.129.52.107:26656,6c691f8132eedba2f3f4b72e83ff5fa29859f3f2@185.119.118.116:5000,639191009cf9112f2b0ec8bc8f48ebf22b923bdf@116.202.220.238:10056,0968495362c138b46b47bb653da8cff01ffc2a84@213.170.133.18:26656,411be35332eb307887e5ad85696846b869d7269d@65.108.204.209:22656,25558ce3247e3e216f8cb41fb8de819b5fa8d8e1@88.216.198.174:18700,6942fbc227ef76412e09ca434a0974b173d60f6a@216.105.169.42:14456,829c34fc0fc57e67c6d9951181aaf2743eab9f0c@136.243.104.103:13756,f6246db338a132298419121414917940a60a4dbf@65.108.224.166:22656,5929dd8592ef5ad21c5773326e5bf9f6d0d2e7d6@149.248.38.121:26656,d1bbe6960983a637b0b2cc615c341b22e596b609@95.216.243.91:23656,374c74639cf16588ce6bba89cc9649beea5a8925@213.239.221.157:26656"
SNAP_RPC="https://union-mainnet-rpc.shazoes.xyz:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.union/config/config.toml
Get Info
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2
Configure the State Sync
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\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.union/config/config.toml
Restore Backup
mv $HOME/.union/priv_validator_state.json.backup $HOME/.union/data/priv_validator_state.json
Restart Service
sudo systemctl restart uniond && sudo journalctl -fu uniond -o cat
wget -O $HOME/.union/config/genesis.json https://files.shazoes.xyz/mainnets/union/genesis.json
wget -O $HOME/.union/config/addrbook.json https://files.shazoes.xyz/mainnets/union/addrbook.json
Number of active Peers 0
Memuat data...
Memuat skrip konfigurasi...