Archive Node
This guide covers setting up an archive node for the Oasis Network.
An archive node serves historical consensus and runtime state that cannot normally be accessed through other nodes in the network because the state has been pruned or removed during dump-and-restore network upgrades. The node does not actively participate in the consensus protocol and has most of the node features disabled. Archive node does not need to be registered neither added to an existing entity.
Snapshots and Version Compatibility
Running an archive node requires historical consensus and runtime state.
You can download a snapshot of a specific network state from the Official Oasis Network Snapshots page. The files should be extracted into the right directories within the node datadir.
For example, if your datadir is defined as /node/data
in your node's configuration, the consensus state should be extracted
into the consensus directory of the datadir, and the
Sapphire Mainnet runtime state should be extracted into the
runtimes/000000000000000000000000000000000000000000000000f80306c9858e7279
directory of the datadir.
The following tables outline the version compatibility matrix for running archive nodes for different network generations. Select which historical state you want to serve with archive node and download the correct snapshot and binaries for that state.
Testnet
Mainnet
Prerequisites
Before continuing, make sure you've followed the Prerequisites and Run a Non-validator Node sections and have:
- Oasis Node binary installed and configured on your system.
- The chosen top-level
/nodeworking directory prepared. In addition toetcanddatadirectories, also prepare the following directories:bin: This will store binaries needed by Oasis Node for running the ParaTimes.runtimes: This will store the ParaTime bundles.
- Genesis file copied to
/node/etc/genesis.json. - Historical state from the snapshot downloaded and extracted into the right directories within the
/node/datadirectory:consensusfor the consensus state.runtimes/<runtime_id>for the runtime state of a specific ParaTime.
Configuration
Archive nodes can be configured with different historical state depending on the version of Oasis Core being used.
Oasis Core 23 and later
Starting from the Oasis Core version 23, the configuration for enabling archive mode has changed.
Use the mode setting:
mode: archive
common:
data_dir: /node/data
log:
format: JSON
level:
cometbft: info
cometbft/context: error
default: info
genesis:
file: /node/etc/genesis.json
runtime:
# Paths to ParaTime bundles for all of the supported ParaTimes.
paths:
- {{ runtime_orc_path }}
Keep all other settings the same as those for a full client node. For example, to serve archived runtime state, the node needs to have the runtime configured and the state present.
Oasis Core 22 and earlier
For all pre-Eden networks, such as Damask, the configuration remains the same but requires the
appropriate version of oasis-node and the node state.
Damask
To run an archive node for Damask, use Oasis Core v22.2.13 and the following configuration:
datadir: /node/data
log:
level:
default: info
tendermint: info
tendermint/context: error
format: JSON
genesis:
file: /node/etc/genesis.json
consensus:
tendermint:
mode: archive
runtime:
mode: client
paths:
# Paths to ParaTime bundles for all of the supported ParaTimes.
- "{{ runtime_orc_path }}"
Cobalt
To run an archive node for Cobalt, use Oasis Core v21.3.14 and the following configuration:
datadir: /node/data
log:
level:
default: info
tendermint: info
tendermint/context: error
format: JSON
genesis:
file: /node/etc/genesis.json
consensus:
tendermint:
mode: archive
runtime:
supported:
- "{{ runtime_id }}"
paths:
"{{ runtime_id }}": {{ paratime_binary_path }}
worker:
storage:
enabled: true
Starting the Oasis Node
You can start the node by running the following command:
oasis-node --config /node/etc/config.yml
To ensure the node is running in archive mode, run the following command:
oasis-node control status -a unix:/node/data/internal.sock
Output should report archive consensus mode status:
{
// other fields omitted ...
"mode": "archive",
// ...
}