-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create statesync.bash Co-authored-by: billy rennekamp <[email protected]>
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# microtick and bitcanna contributed significantly here. | ||
set -uxe | ||
|
||
# set environment variables | ||
export GOPATH=~/go | ||
export PATH=$PATH:~/go/bin | ||
|
||
|
||
# Install Gaia | ||
make install | ||
|
||
# MAKE HOME FOLDER AND GET GENESIS | ||
gaiad init test | ||
wget -O ~/.gaia/config/genesis.json https://cloudflare-ipfs.com/ipfs/Qmc54DreioPpPDUdJW6bBTYUKepmcPsscfqsfFcFmTaVig | ||
|
||
INTERVAL=1000 | ||
|
||
# GET TRUST HASH AND TRUST HEIGHT | ||
|
||
LATEST_HEIGHT=$(curl -s https://cosmoshub-4.technofractal.com/block | jq -r .result.block.header.height); | ||
BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL)) | ||
TRUST_HASH=$(curl -s "https://cosmoshub-4.technofractal.com/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) | ||
|
||
|
||
# TELL USER WHAT WE ARE DOING | ||
echo "TRUST HEIGHT: $BLOCK_HEIGHT" | ||
echo "TRUST HASH: $TRUST_HASH" | ||
|
||
|
||
# export state sync vars | ||
export GAIAD_STATESYNC_ENABLE=true | ||
export GAIAD_P2P_MAX_NUM_OUTBOUND_PEERS=200 | ||
export GAIAD_STATESYNC_RPC_SERVERS="https://cosmoshub-4.technofractal.com:443,https://cosmoshub-4.technofractal.com:443" | ||
export GAIAD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT | ||
export GAIAD_STATESYNC_TRUST_HASH=$TRUST_HASH | ||
export GAIAD_P2P_PERSISTENT_PEERS="[email protected]:2010" | ||
export GAIAD_P2P_SEEDS="bf8328b66dceb4987e5cd94430af66045e59899f@public-seed.cosmos.vitwit.com:26656,[email protected]:26656,[email protected]:26656,ba3bacc714817218562f743178228f23678b2873@public-seed-node.cosmoshub.certus.one:26656,[email protected]:26656,[email protected]:26656" | ||
|
||
gaiad start --x-crisis-skip-assert-invariants |