Stop injectived and reset database
Copy sudo systemctl stop injectived
cp $HOME /.injectived/data/priv_validator_state.json $HOME /.injectived/priv_validator_state.json.backup
injectived tendermint unsafe-reset-all --home $HOME /.injectived --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/injective
BACKUP_RPC = https://injective-rpc.lavenderfive.com:443
LATEST_HEIGHT = $( curl -s $STATE_SYNC_RPC /block | jq -r .result.block.header.height )
BLOCK_HEIGHT = $( echo LATEST_HEIGHT | awk '{print $1 - ($1 % 6000)}' ); \
TRUST_HASH = $( curl -s "$STATE_SYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash )
SEEDS="38c18461209694e1f667ff2c8636ba827cc01c86@176.9.143.252:11751,4f9025feca44211eddc26cd983372114947b2e85@176.9.140.49:11751,c98bb1b889ddb58b46e4ad3726c1382d37cd5609@65.109.51.80:11751,23d0eea9bb42316ff5ea2f8b4cd8475ef3f35209@65.109.36.70:11751,f9ae40fb4a37b63bea573cc0509b4a63baa1a37a@15.235.114.80:11751,7f3473ddab10322b63789acb4ac58647929111ba@15.235.13.116:11751,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:14356,ebc272824924ea1a27ea3183dd0b9ba713494f83@injective-mainnet-seed.autostake.com:26726,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:14356,1846e76e14913124a07e231586d487a0636c0296@tenderseed.ccvalidators.com:26007,5a1cd1a7da5aab3e3075fbae0a905c7256e48193@seeds.goldenratiostaking.net:1635,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,c28827cb96c14c905b127b92065a3fb4cd77d7f6@seeds.whispernode.com:14356,858c86e2590f82934b8483ed184afd88416a7b31@seed-injective-01.stakeflow.io:2106"
echo -e "Modifying $HOME/.injectived/config/config.toml based on the following values:"
echo -e "RPC Address: $STATE_SYNC_RPC"
echo -e "Latest Block Height: $LATEST_HEIGHT"
echo -e "Sync Block Height: $BLOCK_HEIGHT"
echo -e "Trust Hash: $TRUST_HASH"
sed -i \
-e "s|^enable *=.*|enable = true|" \
-e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$BACKUP_RPC\"|" \
-e "s|^trust_height *=.*|trust_height = $BLOCK_HEIGHT|" \
-e "s|^trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" \
-e "s|^seeds *=.*|seeds = \"$SEEDS\"|" \
$HOME /.injectived/config/config.toml
mv $HOME /.injectived/priv_validator_state.json.backup $HOME /.injectived/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.injectived/wasmonly.tar.zst | tar -xaf - -C $HOME /.injectived
Restart injectived and check the log
Copy sudo systemctl restart injectived && sudo journalctl -u injectived -f --no-hostname -o cat