Cronos EVM Docs
  • Getting Started
    • Getting Started
    • Background
    • Architecture
    • Cronos roadmap
  • FOR USERS
    • 💳Crypto.com Card Top Up
    • 🔥Crypto Wallets
    • 🦊MetaMask Configuration
    • 🦁Brave Wallet
    • 🌉Bridges
      • From the Crypto.com App and Exchange
        • From the Crypto.com App
        • From the Crypto.com Exchange
      • IBC (Cronos POS Chain, other Cosmos chains)
        • Cronos Bridge Web App
      • Independent bridges
      • FAQs for Bridge transfers
      • FAQs for transactions from/to centralized exchanges
    • 🚰Testnet Faucet
    • 💡Tips & FAQs
    • 👮Key Principles for Wallet Security
    • GasTracker
  • FOR DAPP DEVELOPERS
    • 💡Founder FAQs
    • 🏅Hacker's Getting Started Resources
    • 📃Smart Contracts
      • Contract Development on Testnet
      • Contract Deployment and Verification
      • Contract Verification Export: Cronoscan To Cronos Explorer
      • Best Practices
      • Token Contract Addresses
    • 💻dApp Creation
      • Free and commercial RPC endpoints
      • Wallet integrations
      • Web3-wallet
      • JSON-RPC methods
      • Address Conversion
      • Swagger Playground
    • ⚙️Dev Tools & Integrations
      • All dev tools & integrations
      • Account Abstraction
      • Band Protocol
      • Banxa
      • GoldRush
      • Cronos Safe
      • Flair
      • Google Bigquery
      • Moralis
      • Pyth
      • Secret Network
      • SubQuery
      • Witnet
    • Crypto.com AI Agent SDK
  • FOR NODE HOSTS
    • Running nodes
      • Cronos Mainnet
        • Quicksync
        • State-sync
        • Public Node Sync
        • KSYNC
        • The "Huygen" upgrade guide (v0.6.* to v0.7.*)
        • The "v0.7.0-hotfix" upgrade guide (v0.7.* to v0.8.*)
        • The "Galileo" upgrade guide (v0.8.* to v1.0.*)
        • The "Titan" upgrade guide (v1.0.* to v1.1.0)
        • The "v1.2" upgrade guide (v1.1.* to v1.2.0)
        • The "v1.3" upgrade guide (v1.2.* to v1.3.0)
        • The "v1.4" Pallene upgrade guide (v1.3.* to v1.4.1)
        • Patching Unlucky & Duplicate Tx
      • Cronos Testnet
      • Devnet
      • Best Practices
      • Cronosd build with Nix
      • VersionDB
      • MemIAVL
      • Local State Sync
    • Cronosd
  • CRONOS PLAY
    • Introduction
    • Unity Engine
      • Current Version
      • Legacy Version
        • EVM
        • Login Example
        • Custom RPC
        • ERC20
        • ERC721
        • ERC1155
      • Useful Links
    • Unreal Engine
      • Installation and Enabling
      • Working with Blueprint
        • Actors and Blueprint Classes
        • Cronos Configuration
        • Connect Defi Desktop/Onchain Wallet with URI
        • Connect Wallets with QR Code
        • Connect WalletConnect Step by Step
        • WalletConnect 2.0 and Unreal Engine 5: Hello World Example
        • Wallet
        • ERC20
        • ERC721
        • ERC1155
        • Broadcast Transactions
        • Get Tokens or Transactions
      • Working with C++
        • Creating a C++ Project
        • Creating a child DefiWalletCoreActor
        • Querying a contract
        • Customizing Network
      • Demo
    • Cronos Play C++ SDK
    • Crypto.com Pay Integration
    • Cronos Play FAQ
  • Block Explorers
    • Block Explorer and API Keys
    • Cronos Explorer
    • Cronoscan
  • CRONOS CHAIN PROTOCOL
    • Chain ID and Address Format
    • Cronos General FAQ
    • Genesis
    • Modules
      • module_bank
      • module_distribution
      • module_slashing
      • module_feemarket
    • Chain Details
      • List of parameters
      • Technical glossary
      • Protocol Documentation
    • Common IBC Commands
  • Cronos zkEVM
    • Cronos zkEVM
  • Resources
    • Media / brand kit
Powered by GitBook
On this page
  • Pre-requisites
  • Installation
  • Sync Cronos from genesis
  • Step 1. Get the cronosd binary for genesis
  • Step 2. Configure cronosd
  • Step 3. Run everything
  • Cosmovisor
  • Apply historical state-sync snapshots
  • Step 1. Install & configure cronosd for specific upgrade height
  • Step 2. Run everything
  • Sync to any historical height with height-sync
  • Step 1. Install & configure cronosd for specific upgrade height
  • Step 2. Run everything

Was this helpful?

Edit on GitHub
  1. FOR NODE HOSTS
  2. Running nodes
  3. Cronos Mainnet

KSYNC

PreviousPublic Node SyncNextThe "Huygen" upgrade guide (v0.6.* to v0.7.*)

Last updated 1 month ago

Was this helpful?

This sections covers how to perform a genesis-sync up to live height and how to state-sync to historical heights for Cronos Mainnet with KSYNC. In summary KSYNC is a tool developed by which is capable of syncing blocks and state-sync snapshots from the decentralized KYVE data lake directly into Cosmos blockchain nodes. For Cronos, KYVE has validated all historical blocks and state-sync snapshots (in a 10,000 interval) in a decentralized way and permanently archived them to , a decentralized storage solution. KSYNC can then pull down this verified data and apply them against the Cronos app, you can find full documentation on the tool .

Note

Set environmental variables:

PATH="$PATH: <tools folder>"

e.g. PATH="$PATH: /Users/localuser/Cronos/bin"

Pre-requisites

Please check the environment requirements for KSYNC from .

Installation

You can install KSYNC with the following command, ensure that you have installed:

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

To verify the installation simply run ksync version. To build from source visit the repository on .

Sync Cronos from genesis

Step 1. Get the cronosd binary for genesis

To sync Cronos from genesis up to live height install the binary used for genesis from .

  • Install the Cronos Mainnet binaries from GitHub:

https://github.com/crypto-org-chain/cronos/releases/download/v0.6.11/cronos_0.6.11_Darwin_arm64.tar.gz
tar -zxvf cronos_0.6.11_Darwin_arm64.tar.gz
  • Check that cronosd is effectively installed:

./bin/cronosd version
0.6.11

Step 2. Configure cronosd

After the installation, init the config:

./cronosd init <your-moniker> --chain-id cronosmainnet_25-1

Download the genesis:

wget -O ~/.cronos/config/genesis.json https://raw.githubusercontent.com/crypto-org-chain/cronos-mainnet/master/cronosmainnet_25-1/genesis.json

Step 3. Run everything

Now that Cronos is properly set up you can start the genesis sync:

ksync block-sync --binary="/path/to/cronosd" --source="cronos"

Cosmovisor

Note that you can also configure Cosmovisor which contains all the upgrade binaries. With Cosmosvisor, you do not need to manually switch to a different version every time Cronos reaches an upgrade point. It is recommended to pair this with a systemd service file, refer to the template below:

[Unit]
Description=KSYNC deamon supervising the ksync sync process
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME
ExecStart=$HOME/ksync block-sync --binary="/path/to/cosmovisor" --source=cronos -y
Restart=always
RestartSec=10s
LimitNOFILE=infinity
Environment="DAEMON_NAME=cronosd"
Environment="DAEMON_HOME=$HOME/.cronos"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=false"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target

Remember to replace $USER with your actual username.

Apply historical state-sync snapshots

Step 1. Install & configure cronosd for specific upgrade height

Step 2. Run everything

To perform the state-sync execute the following command:

ksync state-sync --binary="/path/to/cronosd" --source="cronos" --target-height=$HEIGHT

If there is no state-sync snapshot available for your requested $HEIGHT, KSYNC will automatically propose the nearest snapshot the chosen height.

Sync to any historical height with height-sync

The features of historical state-sync and block-sync can now be combined to sync to any historical block height by using the combination of the two. KSYNC will state-sync to the nearest snapshot before your specified target height and sync the remaining blocks using block-sync. With this process, checking the state at a certain height is greatly improved because now you don't need to sync all the way from genesis to inspect the state of an historical block height.

Step 1. Install & configure cronosd for specific upgrade height

Step 2. Run everything

To perform the height-sync execute the following command:

ksync height-sync --binary="/path/to/cronosd" --source="cronos" --target-height=$HEIGHT

This will run until live height has been reached, you can check the latest height which KYVE has validated and archived .

The "normal" state-sync only supports syncing to live height, however KYVE has validated and archived all state-sync snapshots from genesis with a 10,000 block interval therefore historical state-sync is possible with KSYNC. Note that the archival process is still ongoing and live height has not been reached yet, check the progress .

To install and configure Cronos, follow the same process as in the genesis sync part before. However, you will need to use a different binary version. You can find all upgrades with the relevant upgrade heights .

To install and configure Cronos, follow the same process as in the historical state-sync before. You can find all upgrades with the relevant upgrade heights .

KYVE
Arweave
here
here
go1.21
GitHub
here
here
here
here
here