Snapshot & State sync
Snapshot
sudo systemctl stop entangled
cp $HOME/.entangled/data/priv_validator_state.json $HOME/.entangled/priv_validator_state.json.backup
entangled tendermint unsafe-reset-all --home ~/.entangled/ --keep-addr-book
curl https://snapshot1.syanodes.my.id/entangle/snapshot1-entangle.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.entangled
mv $HOME/.entangled/priv_validator_state.json.backup $HOME/.entangled/data/priv_validator_state.json
sudo systemctl restart entangled && sudo journalctl -fu entangled -o cat
State Sync
sudo systemctl stop entangled
cp $HOME/.entangled/data/priv_validator_state.json $HOME/.entangled/priv_validator_state.json.backup
entangled tendermint unsafe-reset-all --home $HOME/.entangled
PEERS="[email protected]:26656,7378259114db42b8b46fad4cc9f31d32a5419b60@[2a03:4000:60:56:1879:e1ff:fe07:89f5]:12656,d9e855c34efd86dcb024b8de363374f070955d20@[2a01:4f9:2a:79e::2]:32656,[email protected]:15656,[email protected]:27156,3e5001558765a6092d1284f3b5b24f6bd76a9433@[2a01:4f8:171:1d8::2]:26656,[email protected]:26656,[email protected]:22656,135b64976feabeefd5776818c3fafe29c2bbc886@[2607:5300:203:b704::]:26656,[email protected]:26656,[email protected]:26656,c31e8d2f3427c05e83b6f06262d59374547eee90@[2a01:4f9:6a:4732::2]:22656,[email protected]:26656,[email protected]:33656,[email protected]:26656,[email protected]:36656,6de7cd16d8816a4c2a8a3344210e9634f17b97d8@[2a01:4f9:1a:b181::2]:10656,2899b5bbba96c4a99674ca780ad8bbc6179d5c94@[2a01:4f9:4a:2864::2]:11956,[email protected]:26656,10d0f0e10b12c37bf64f6eca08076ffaf9cb18ab@[2a01:4f9:3081:2ee2::2]:15656,17619aea4a13201bccf803a2bb7f44e387134f47@[2a01:4f8:262:1b2f::2]:21856,00495ccd54c09560ab2d2fe6638523418901786f@[2a01:4f9:3081:3aa3::2]:21856,8e682c52253e8d892e47b5e6cc0672e435301038@[2a01:4f8:261:2c1a::2]:4156,7030ba7898fe4b557e916ab7e13b006071d6f5c0@[2a01:4f9:5a:2248::2]:15656,858489814116c3011216bddfc35c60385040bb61@[2a01:4f8:10a:c0c::2]:26656,[email protected]:26656,0d57afd37f4f4f566c8359b1d4c5a439e2c7f009@[2a01:4f9:1a:ac89::2]:22656,cc8bf40df39533f1867141c8d99d62dc7f2a1867@[2a01:4f8:221:374c::2]:29656,122399866c25b888679904e99450b6ab86fbcc32@[2001:41d0:304:300::4f69]:26656,207a5a0ede03ec13d18392fa2f6775b9c0223727@[2a01:4f9:5a:15c4::2]:13356,1ea44942d500f9bd83df93dbdcac4f79f5f79901@[2a01:4f8:10a:d70::2]:10656,[email protected]:15656,[email protected]:26656,7aab5c045aeb072341cdd8e7b692d4d56553e5b7@[2a01:4f9:3a:2699::2]:34656,8a6be04c58c3e633f9d3d201fd03d23b6cfcb3d1@[2a01:4f9:3a:4156::2]:26656,d2c05a9a98f7b47b91f21e6cb757cfcdf37239d0@[2a01:4f8:210:338f::2]:26656,6662a6b320b8f7520ebbc04e2891ee43227631a8@[2a01:4f9:3081:5155::2]:1550,a0eeae37a0e8c25dd98ffd84ff21504221a8d14f@[2a01:4f9:3080:1188::2]:38656,9b01145fc6fe490a59cbdceeee96678245ebeecf@[2a02:c206:2128:4299::1]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,990d17a2686b47fe4bcf885bfae3f29897a58a32@[2a01:4f9:6b:47e6::2]:26656,[email protected]:26656,b0f28d454343a605c10f8f7bc4149d4764ee1e89@[2a01:4f9:3081:2f30::2]:15656,addb29cd41f917faca1276f294751840757ff865@[2a01:4f8:241:528f::2]:22656"
SNAP_RPC="https://entangle-m-rpc.syanodes.my.id:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.entangled/config/config.toml
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 && sleep 2
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/.entangled/config/config.toml
mv $HOME/.entangled/priv_validator_state.json.backup $HOME/.entangled/data/priv_validator_state.json
sudo systemctl restart entangled && sudo journalctl -u entangled -f --no-hostname -o cat
Last updated