Setting Up a Cosmos Archive Node: A Guide for C4E and Understanding Binary Versions.

Validatus
2 min readFeb 6, 2024

--

Introduction

An archive node plays a crucial role in maintaining the integrity and accessibility of a blockchain’s complete transaction history. Unlike other types of nodes that store only the current state of the blockchain, an archive node retains the entire history of each block from its inception (block 1) to the most recent block. This archival functionality proves invaluable for retrospective analysis, allowing users to trace past transactions and scrutinize wallet balance history at specific block heights. In this article, we will delve into the step-by-step process of running an archive node for Chain4Energy network.

Steps in Setting Up an Archive Node for C4E

  1. Download and install the binary:
git clone https://github.com/chain4energy/c4e-chain.git
cd c4e-chain
git checkout v1.0.0
make install

2. In app.toml configure pruning to nothing so that none of the block history gets deleted.

	sed -i.bak -E 's#^(pruning[[:space:]]+=[[:space:]]+).*$#\\1"nothing\\"#' $HOME/.c4e-chain/config/app.toml

3. Set indexer to kv in config.toml so that the each transaction is indexed.

sed -i.bak -E 's#^(indexer[[:space:]]+=[[:space:]]+).*$#\\1"kv\\"#' $HOME/.c4e-chain/config/

4. Start the node, with the binary version, that was used to start the chain from genesis block.

5. Get binary information from cosmos chain registry, which contains binary upgrade information at the specified block-height. So, let the chain get synced, when the upgrade height is reached, update the binary and restart the node, it will start syncing again.

These are the required binary versions at different block heights:

v1.0.0 at block 1

v1.1.0 at block 1952250

v1.2.0 at block 2826500

v1.3.0 at block 6283905

Understanding Binary Versions

Binary versions refer to specific versions of the Cosmos SDK. Different versions may introduce new features or compatibility changes.

1. Finding the Correct Version:**

  • Check Official Repositories: The [Cosmos SDK GitHub repository](https://github.com/cosmos/cosmos-sdk) is a reliable source for the latest release information.
  • Network Documentation: Ensure compatibility by referring to documentation specific to the Cosmos network or testnet you’re working with.

2. Utilizing Cosmovisor:

  • Cosmovisor is a process manager for the gaiad binary, facilitating automatic binary upgrades upon governance proposals.
  • It’s crucial to set up Cosmovisor correctly, including environment variables and binary placement.

Tips for Finding and Managing Binary Versions

  • Regularly monitor official Cosmos channels for updates on binary versions.
  • Stay engaged with the Cosmos community for advice on selecting and managing versions.
  • Use Cosmovisor for hassle-free binary upgrades and management.

Conclusion

Operating a Cosmos Archive Node is a complex yet vital role in the blockchain ecosystem, ensuring data integrity and availability for historical analysis. Staying updated with the latest developments and actively participating in the Cosmos community are key to successfully managing an Archive Node.

For more detailed instructions and updates, always refer to the official Cosmos documentation and GitHub repository. Join forums and discussion groups to stay connected with the Cosmos network’s pulse.

--

--

Validatus
Validatus

Written by Validatus

Validatus.com provides independent infrastructure, to ensure the integrity and reliability of transactions across various blockchain ecosystems. Visit us!

No responses yet