Skip to content

Archive Node Configurations

Archive nodes store the entire history of a blockchain, enabling users to query application state further back than a standard node. This requires much more storage than a traditional node, and is often most useful for data analysis.

What are we archiving?

Cosmos contains a feature called "pruning". What this does is prune the blockchain state stored to only include the latest information. Specifically, pruning deletes historical application state data, while still retaining block data. This means that pruned nodes will still store all details about blocks and transactions.

In Cosmos, and more generally in blockchains, the concepts of block data and application data refer to two different types of information stored and processed by the system.

Block data: This primarily refers to the structure that wraps transactions and includes metadata about them. Block data include things like the block header (containing the block's hash, the hash of the previous block, timestamp, etc.), the list of transactions included in the block, and other related metadata.

Application data: This is more about the state transitions caused by the transactions. For instance, if we are dealing with a Cosmos blockchain where the transactions represent token transfers, the application data would be the account balances. The application state is modified by transactions that are included in the blocks.

In other words, the block data represent the historical list of transactions (the "ledger"), while the application data represent the current state of the system based on those transactions (like "balance sheet").

Running an Archive Node

In order to run an archive node, all you need to do is set pruning to nothing inside of config.toml

toml
pruning = "nothing"
pruning = "nothing"
Details

All other pruning settings will be ignored when pruning is set to nothing.

toml
pruning-keep-recent = "10"
pruning-keep-every = "1000"
pruning-interval = "10"
pruning-keep-recent = "10"
pruning-keep-every = "1000"
pruning-interval = "10"

Accessing Historical Data

In order to make use of the data you'll want to ensure your RPC endpoints are configured correctly in the RPC Node Configurations