Skip to content

Commit

Permalink
Merge pull request #105 from CoreumFoundation/fix_state_sync_script_i…
Browse files Browse the repository at this point in the history
…nstructions

Fix state sync trusted blocks instructions script
  • Loading branch information
alinetskyi authored Feb 4, 2025
2 parents 8eb44a0 + 845b0da commit 37dcf6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/docs/become-validator/run-full-node/run-full-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ COREUM_NODE_CONFIG=$COREUM_HOME/config/config.toml

```bash
# Get block details from one of the state sync servers
CURRENT_BLOCK_DETAILS=$(curl ${COREUM_STATE_SYNC_SERVERS#*,}/block | jq -r '.result.block.header.height + "\n" + .result.block_id.hash')
CURRENT_BLOCK_HEIGHT=$(echo $CURRENT_BLOCK_DETAILS | head -1 )
CURRENT_BLOCK_DETAILS=$(curl ${COREUM_STATE_SYNC_SERVERS#*,}/block | jq -r '.result.block.header.height + " " + .result.block_id.hash')
CURRENT_BLOCK_HEIGHT=$(echo $CURRENT_BLOCK_DETAILS | awk '{print $1}' )
TRUSTED_BLOCK_HEIGHT=$(expr $CURRENT_BLOCK_HEIGHT - 1000)
TRUSTED_BLOCK_DETAILS=$(curl "${COREUM_STATE_SYNC_SERVERS#*,}/block?height=${TRUSTED_BLOCK_HEIGHT}" | jq -r '.result.block.header.height + "\n" + .result.block_id.hash')
TRUSTED_BLOCK_HASH=$(echo $TRUSTED_BLOCK_DETAILS | tail -n 1 )
TRUSTED_BLOCK_HASH=$(echo $TRUSTED_BLOCK_DETAILS | awk '{print $2}' )
```
If you see `Failure writing output to destination` error, check if `jq` is installed.
** Check if you have needed data:
Expand Down

0 comments on commit 37dcf6b

Please sign in to comment.