Skip to main content

d. archive node tutorial

Archive nodes save the raw historical state of the blockchain for full nodes to reference. These require a large amount of storage.

Solution

To setup an archive node, you will need to customize your nodes pruning settings. To do this, we can run the following command to update the setting located in ~/.terp/config/app.toml:

sed -i -e "s/^pruning *=.*/pruning = \"nothing\"/" $HOME/.terp/config/app.toml

now your node will keep the entire state saved, without pruning.

Sync From Genesis Block Archive

To sync from block height 1, you will need to ensure the node uses the proper versioning of terp-core dependent on the block height:

Blocks FromBlocks ToTerp-Core Version
02,847,602barberry
2,847,6033,039,061v2
3,039,0623,341,663v3
3,341,664currentv4

Archive Peers

PEERS="[email protected]:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.terp/config/config.toml