From 204d73dde8251c5d1f2b41988591ee4d520c97b0 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 12 Apr 2022 22:28:34 +0700 Subject: [PATCH] Update state sync scripts (#1234) NB: Previously, osmosis would apply all snapshots, then crash. Currently, osmosis applies all snapshots, and stays live. Because it stays live, these scripts don't work correctly. I have a machine doing a rocksdb sync now, and hope to prune that but nothing makes tiny like statesyc. --- scripts/statesync-rocks.bash | 7 ++++--- scripts/statesync.sh | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/statesync-rocks.bash b/scripts/statesync-rocks.bash index 27f630c271b..d3dd064e718 100644 --- a/scripts/statesync-rocks.bash +++ b/scripts/statesync-rocks.bash @@ -33,9 +33,9 @@ INTERVAL=1500 # GET TRUST HASH AND TRUST HEIGHT -LATEST_HEIGHT=$(curl -s 162.55.132.230:2001/block | jq -r .result.block.header.height); +LATEST_HEIGHT=$(curl -s https://osmosis.validator.network/block | jq -r .result.block.header.height); BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL)) -TRUST_HASH=$(curl -s "162.55.132.230:2001/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) +TRUST_HASH=$(curl -s "https://osmosis.validator.network/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) # TELL USER WHAT WE ARE DOING @@ -44,8 +44,9 @@ echo "TRUST HASH: $TRUST_HASH" # export state sync vars +export OSMOSISD_P2P_MAX_NUM_OUTBOUND_PEERS=200 export OSMOSISD_STATESYNC_ENABLE=true -export OSMOSISD_STATESYNC_RPC_SERVERS="162.55.132.230:2001,162.55.132.230:2001" +export OSMOSISD_STATESYNC_RPC_SERVERS="https://osmosis.validator.network:443,https://rpc.osmosis.notional.ventures:443,https://rpc-osmosis.ecostake.com:443" export OSMOSISD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT export OSMOSISD_STATESYNC_TRUST_HASH=$TRUST_HASH diff --git a/scripts/statesync.sh b/scripts/statesync.sh index 5015baac32f..1d08f192bd6 100644 --- a/scripts/statesync.sh +++ b/scripts/statesync.sh @@ -21,9 +21,9 @@ INTERVAL=1500 # GET TRUST HASH AND TRUST HEIGHT -LATEST_HEIGHT=$(curl -s 162.55.132.230:2001/block | jq -r .result.block.header.height); +LATEST_HEIGHT=$(curl -s https://osmosis.validator.network/block | jq -r .result.block.header.height); BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL)) -TRUST_HASH=$(curl -s "162.55.132.230:2001/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) +TRUST_HASH=$(curl -s "https://osmosis.validator.network/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) # TELL USER WHAT WE ARE DOING @@ -32,8 +32,9 @@ echo "TRUST HASH: $TRUST_HASH" # export state sync vars +export OSMOSISD_P2P_MAX_NUM_OUTBOUND_PEERS=200 export OSMOSISD_STATESYNC_ENABLE=true -export OSMOSISD_STATESYNC_RPC_SERVERS="162.55.132.230:2001,162.55.132.230:2001" +export OSMOSISD_STATESYNC_RPC_SERVERS="https://osmosis.validator.network:443,https://rpc.osmosis.notional.ventures:443,https://rpc-osmosis.ecostake.com:443" export OSMOSISD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT export OSMOSISD_STATESYNC_TRUST_HASH=$TRUST_HASH