💡State Sync
State Sync allows to sync a new node by fetching a snapshot of the network state at a recent height, instead of fetching and replaying all historical blocks.
Some networks which use wasm
may not yet support wasm
folder transfers with State Sync. In this case you may need to download wasm
folder separately.
Depending on network, State Sync may need different amount of RAM to successfully fish sync process. It is recommended to have at least 8GB RAM.
Stop existing service and reset database.
sudo systemctl stop gitopiad
gitopiad tendermint unsafe-reset-all --home $HOME/.gitopia --keep-addr-book
Add peers.
PEER="5b12e0a1c70df1cb0b37de14da1b0cb4e44bd0e5@gitopia.nodejumper.io:32656,1c9e5ca0d44932fb3d691bb23dedf799c120948d@85.10.203.15:5656,b2f764694d52e09793d68259d584ece0c194b6fe@65.108.229.93:26656,d724628333e34992ae0b46b7ae060cb31b06c1be@162.19.237.134:26656,f442947166f03e5cd0f9f1b6045917907b3307ff@145.239.10.46:14156,c274f612fe7cf259aef7d9f01dc4ecfebca43656@148.251.137.146:26656,abca18ed112719b4f0a23932797dba2733f0fd44@23.88.5.169:25656,a0b6c89b4fe0f455a027080103bffd001f3b6248@65.21.134.202:26356,f9b892ea2e8ed8aa83f7b98e7e47371c23b01924@213.239.207.175:36656,0389c1066a79e9745803227e1b870627eda780d7@65.109.23.237:29656,e06b2be5c4ecee659e744da39d07b42f6f9e300c@192.99.44.79:11356,93a02e173308729cf9d94709dd670828034920a6@148.251.91.185:26656,5e8a5481a314430e24de0919e18ffae394c269f6@51.159.221.31:26656,b89682dfddec974d867ea13817e90a444c21460c@138.201.127.91:26691,0724a81eaee075bf4e1af702930dbc72977d71af@143.110.240.245:26656,e5f3faef143c82f49bc506aea518e93ed4bb901f@65.109.116.151:43656,70e0603c1557681ee5d749b82c27468aecc862f1@185.246.85.5:26656,8e42db619abe34afe8cb39d4a2d04ae5db5bdaaf@141.94.139.233:26656,e8e6b032f408bcadc2e65f57c4376d91382104e8@135.181.209.55:26656,b35d46fcfc1e4cfa943a299fcb39853e15e94d8b@81.30.157.35:14656,5b2df98ad73a0a81a5bd31da4489a9236a7d7a99@65.21.91.160:26867,33e2390bfd693a8f2b27d5d646e0f081d717a81f@135.181.73.57:26656,93a3d1e0c09908f268e63240271af0d5e6102f16@[2a03:cfc0:8000:13::c303:de05]:26656,4adfa5889675e1e91ea4459e15ff4a0ba53e7828@65.108.224.156:19656,737ea68d852ad4580397e3b4d0b1f0a151a7ee60@65.21.170.3:30656,082e95b5d5351e68dcfb24dff802f9064cfd5a4c@65.109.92.241:51056,c903e98ce3923865f521151d97f36510157c8bc1@65.108.230.113:51056,f6bb45c38d0a9abc926b5baa8f27473f2cd37d30@141.95.157.139:11356,abd217aa49d5ee86c271d04feef2cf4c97ff8d55@94.130.54.253:16601,de34c6491557c59bc5d73631fb73bf05cd726e3e@142.132.202.50:37656,7de2631f6bc7cc0caf30c3745d4795c1dbc91cf3@65.109.104.72:11356,e659a8a92deec3f155e3cab5378f92318980bfc3@86.32.71.164:26656,959b7f6b86683b10e14a04d529e00984d3d70480@162.55.45.242:14156,a2c24354d7d06e61266882a98b54e85800ac4b34@104.244.208.243:11356,11879f38e16e1723ef70950f5222ec78dde7e62f@65.109.17.23:56240,d25a718d491f52efdfd31e8dfdeaa69d1d1946dd@65.108.10.49:26556,fdf51e3445ef8b3b28c313d98c65516b8faf3317@65.21.225.10:26656,2a6ae41d3b8529a62a50ba4615593305e1c9806e@135.181.217.182:10656,4cf66531681c92f15c95c25bd1bff524f9dca35e@65.109.154.181:26656,382a5558ebb8493ca2a8057c51bc1b598520cf60@65.108.126.21:26656,4ffa0ea96f12080e74c53ca9f8aaf4390bab4bb1@138.201.204.5:48656,aa6d4e9e9d9c82595497b67a440e054faae9d4fe@185.144.99.87:26656,63381c5528ed8ca93f9ba31008a9630d21b29a97@142.132.152.46:46656,bc959f28290e4e8ed76acdc4e0fc6b0911f1c512@135.181.208.166:26656,761fb6483e4620c037d030f45d5fc885cd6c0ee3@144.76.45.59:26756,d6086f01a3f9c41352fd7fb126df96a5af92640e@94.41.17.212:26656,3c4d752a9f0d6d4d1c8ec477d0977cff3caa1b77@65.109.156.208:13656,aecabb598db405f5d9cfd55d31884e005244701a@34.142.232.42:26656,c35eb6124591bad21673e8d802898faa18e0352a@65.109.29.150:36656,4979b96c4453efb66c677876fe0e9109b15a8440@65.21.235.144:26656,70b4aab41328695e0299cbee37083cdca01949cd@34.87.123.13:26656,9ef4a2965f3c7c27b56179a5758de60966871c34@95.214.53.105:14656,a0ebd1e5845148c47451452047c7c99621da195e@65.109.96.93:26656,8871b4d32f9f5d411deb1c72a97c1d6377e1793e@142.132.253.112:43656,f4cbfc07a519fab104383ca688b2c5e1e1804d16@65.108.206.74:26656,5144fa12685df73836aad3829c3878248142b6b7@69.197.6.24:27156,5d481c65f014b1b52e3e747f623d04acd0e3ada1@138.201.220.51:10256,cc7d9f8d2fa2225063d8d5ac3fe70cbb64d7a0f7@142.132.202.86:20000,0e9f303834a5d1f3be0babd5466725b3609ebc82@65.21.141.246:28656,12f6b84a23b054a6591c647c2a4456c40af65cce@5.9.147.22:24656,ebc272824924ea1a27ea3183dd0b9ba713494f83@195.3.220.140:27036,2caae9b96ecd2ac07468ae1b85bb3f3bdde0530c@51.79.77.103:43656,146ddc7c8c7164bda4193335c3f7b11cd4c7f0d9@103.107.183.89:14156,f93ac5cc7f69e825e87bf32556b4633ce543bb6e@65.109.116.119:14156,35c318d7b505008c10d12db8098931eed65d6be6@213.133.103.188:14156,cf721cc0ae7b6cf9c58784ccfc87f6f621a09ffb@65.109.99.68:26656,933df918a2f2e331a033e923989d5b8c5275322d@207.244.253.244:37656,ca44ce96710b8f5cb34d89182af783d3b9a8c1ad@176.9.158.219:41356,fff5f6980591805db4c7aea96931d5815fa75563@65.108.6.45:46656,400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@65.109.88.38:14159""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEER\"/" $HOME/.gitopia/config/config.toml
Fill variables with data for State Sync.
RPC="https://gitopia-rpc.stakeangle.com:443"
RECENT_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height)
TRUST_HEIGHT=$((RECENT_HEIGHT - 2000))
TRUST_HASH=$(curl -s "$RPC/block?height=$TRUST_HEIGHT" | jq -r .result.block_id.hash)
echo $RECENT_HEIGHT $TRUST_HEIGHT $TRUST_HASH
Add variable values to config.toml.
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$TRUST_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.gitopia/config/config.toml
Start service and check journal.
sudo systemctl restart gitopiad
sudo journalctl -u gitopiad -f -o cat
State Sync typically takes up to 10 minutes.
Last updated