Start Operating
Syncing a Node

Syncing a Node

This guide assumes you've completed the Setting Up Your Node step.

Syncing with a snapshot downloads the data directory from an existing node.

Choose the network and the snapshot type, fetch the URL and follow instructions returned in response.

Untar the file inside ~/.zetacored and start the node.

The following doc covers a step by step guide on how to sync a ZetaChain Mainnet node with KSYNC.

KSYNC is a tool capable of syncing blocks and state-sync snapshots from the decentralized KYVE data lake directly into Cosmos blockchain nodes. With KSYNC Cosmos validators don't need to wait for peers in order to block-sync and they don't need to search for trusted app hashes if they want to state-sync. Furthermore, state-syncing to historical heights up to genesis are possible.

More information about KSYNC can be found here: https://docs.kyve.network/ksync (opens in a new tab)

Install the latest KSYNC:

go install github.com/KYVENetwork/ksync/cmd/ksync@latest

Verify the installation:

ksync version

And change the following config in the config.toml file:

~/.zetacored/config/config.toml
db_backend = "goleveldb"

Changing the db_backend to the default goleveldb is required for now, since KSYNC does not yet support the pebbledb from ZetaChain’s dependency https://github.com/BlockPILabs/cosmos-db (opens in a new tab).

ksync state-sync --binary="/path/to/zetacored" --chain-id=kaon-1 --snapshot-pool-id=11

To confirm that the node is working, you can watch the logs. The node should be printing INF logs like these:

4:10AM INF executed block height=3468229 module=state num_invalid_txs=1 num_valid_txs=24 server=node
4:10AM INF commit synced commit=436F6D6D697449447B5B3139332032323120323438203430203230
4:10AM INF committed state app_hash=C1DDF828CB4126E8239D92FB57006D978664911BF75FDB2606804083C4F65354 height=3468229 
4:10AM INF indexed block exents height=3468229 module=txindex server=node
4:11AM INF Timed out dur=4468.382473 height=3468230 module=consensus round=0 server=node step=1

You can confirm that the node is synced by querying the node status endpoint:

curl localhost:26657/status

Make sure that catching_up is false. Also, check latest_block_height and latest_block_time.

Continue Learning

Continue with the next part or try a related tutorial