Skip to main content

How to run an archive node

An Arbitrum archive node is a full node that maintains an archive of historical chain states. This how-to walks you through the process of configuring an archive node on your local machine so that you can query both pre-Nitro and post-Nitro state data.

caution

Most users won't need to configure an archive node. This node type is great for a small number of use cases––for example if you need to process historical data.

Before we begin

Before the Nitro upgrade, Arbitrum One ran on the Classic stack for about one year (before block height 22207817). Although the Nitro chain uses the latest snapshot of the Classic chain's state as its genesis state, the Nitro stack can serve all but six RPC requests for pre-Nitro blocks. Full details are outlined here..

Running an Arbitrum One full node in archive mode lets you access both pre-Nitro and post-Nitro blocks, but it requires you to run both Classic and Nitro nodes together. You may not need to do this, depending on your use case:

Use caseRequired node type(s)Docs
Access the Arbitrum network without running your own nodeFully managed by third-parties, exposed via RPC endpointsRPC endpoints and providers
Run an archive node for Arbitrum Sepolia (testnet) or Arbitrum NovaFull node (Nitro)How to run a full node (Nitro)
Send post-Nitro archive requestsFull node (Nitro)How to run a full node (Nitro)
Send pre-Nitro archive requestsFull node (Classic)How to run a full node (Classic, pre-Nitro)
Send post-Nitro and pre-Nitro archive requestsFull node (Nitro) and full node (Classic)That's what this how-to is for; you're in the right place.
Archive-path node

A Nitro Archive-path node is similar to a hash archive node; with the exception that a Nitro Archive-path Node takes significantly less disk space ~4TB (Arbitrum One). During sync and serving RPC calls it should be equivalent or potentially slightly better than the Archive (hash) node.

The recommendation is to use Nitro >= v.3.9.x to use Archive-path node.

Features:

  • Low disk usage: Under ~4 TB for Arbitrum One
  • Configurable retention: users can choose how many historical states to retain

Limitations:

  • block validation in not yet supported with path state scheme
  • fast NVME storage is required for reasonable sync speed
  • Snapshot auto-download with --init.latest is not yet supported

System requirements

caution

As of May 2024, archive node snapshots for Arbitrum One, Arbitrum Nova, and Arbitrum Sepolia are no longer being updated on https://snapshot-explorer.arbitrum.io/ due to accelerated database and state growth. Teams who use these publicly available archive snapshots will need to wait longer than usual for their nodes to sync up.

The Offchain Labs team is actively exploring and working on solutions to address this and will provide an update as soon as possible. In the meantime, the Offchain Labs team continues to recommend that teams periodically create their own snapshots by stopping one of their archive nodes and backing up their database.

caution

The minimum storage requirements will change as the Nitro chains grow (growing rates are specified below). We recommend exceeding the minimum requirements as much as you can to minimize risk and maintenance overhead.

  1. RAM: 16GB+ for Nitro and 32GB+ for Classic
  2. CPU: 4+ core CPU
  3. Storage (last updated on April 2024):
    • Arbitrum One: 9.7TB SSD, currently growing at a rate of about 850GB per month
    • Arbitrum Nova: 4.3TB SSD, currently growing at a rate of about 1.8TB GB per month
  4. Docker images: We'll specify these in the below commands; you don't need to download them manually.
    • Latest Docker image for Arbitrum One Nitro: offchainlabs/nitro-node:v3.9.7-75e084e
    • Latest Docker image for Arbitrum One Classic: offchainlabs/arb-node:v1.4.6-551a39b3
  5. Database snapshots:

Review and configure ports

  • RPC: 8547
  • Sequencer Feed: 9642
  • WebSocket: 8548

Review and configure parameters

Arbitrum NitroArbitrum ClassicDescription
--parent-chain.connection.url=<Layer 1 Ethereum RPC URL>--l1.url=<Layer 1 Ethereum RPC URL>Provide an standard L1 node RPC endpoint that you run yourself or from a third-party node provider (see RPC endpoints and providers)
--chain.id=<L2 chain ID>--l2.chain-id=<L2 Chain ID>See RPC endpoints and providers for a list of Arbitrum chains and the respective child chain IDs
--execution.caching.archive--node.caching.archiveRequired for running an Arbitrum One Nitro archival node and retains past block state
---node.cache.allow-slow-lookupRequired for running an Arbitrum One Classic archival node. When this option is present, it will load old blocks from disk if not in memory cache.
---core.checkpoint-gas-frequency=156250000Required for running an Arbitrum One Classic archival node.

Run the Docker image(s)

When running a Docker image, an external volume should be mounted to persist the database across restarts. The mount point should be /home/user/.arbitrum/mainnet.

To run both Arbitrum Nitro and/or Arbitrum Classic in archive mode, follow one or more of the below examples:

  • Arbitrum One Nitro archive node:
    docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 offchainlabs/nitro-node:v3.9.7-75e084e --parent-chain.connection.url https://l1-node:8545 --chain.id=42161 --http.api=net,web3,eth --http.corsdomain=* --http.addr=0.0.0.0 --http.vhosts=* --execution.caching.archive
  • Arbitrum One Classic archive node:
    docker run --rm -it -v /some/local/dir/arbitrum-mainnet/:/home/user/.arbitrum/mainnet -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 offchainlabs/arb-node:v1.4.6-551a39b3 --l1.url=https://l1-node:8545/ --node.chain-id=42161 --l2.disable-upstream --node.cache.allow-slow-lookup --core.checkpoint-gas-frequency=156250000 --core.lazy-load-core-machine
  • Arbitrum One Nitro archive node with forwarding classic execution support:
    docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 offchainlabs/nitro-node:v3.9.7-75e084e --parent-chain.connection.url https://l1-node:8545 --chain.id=42161 --execution.rpc.classic-redirect=<classic node RPC> --http.api=net,web3,eth --http.corsdomain=* --http.addr=0.0.0.0 --http.vhosts=* --execution.caching.archive

Note that the above commands both map to port 8547 on their hosts. To run both on the same host, you should edit those mapping to different ports and specify your Classic node RPC URL as <classic node RPC> in your Nitro start command. To verify the connection health of your node(s), see Docker network between containers - Docker Networking Example.

Additional flags for Archive-path nodes

For a Nitro path archive node, use the additional flags to start the node:

execution.caching.state-scheme=path
execution.caching.state-history=0

A note on permissions

The Docker image is configured to run as non-root UID 1000. If you're running in Linux and you're getting permission errors when trying to run the Docker image, run this command to allow all users to update the persistent folders, replacing arbitrum-mainnet as needed:

mkdir /some/local/dir/arbitrum-mainnet
chmod -fR 777 /some/local/dir/arbitrum-mainnet

Optional parameters

Both Nitro and Classic have multiple other parameters that can be used to configure your node. For a full comprehensive list of the available parameters, use the flag --help.

Archive-path node configuration details

  • execution.caching.state-scheme=path - sets state scheme → chooses TrieDB implementation
    • path state scheme is not compatible with hash state scheme - the node can only be started from a snapshot that was created with the same state scheme
    • to use path scheme, you need to either sync from genesis or use a public snapshot
  • execution.caching.state-history - specifies number of blocks from the chain head for which state histories are retained
    • state-history=0 means “entire chain”
    • state history is preserved in form of reverse-diffs and those are stored in cold database (also called state freezer, or ancients)
    • state history allows recovery of the historical state—that should allow reorg to historical block (not tested)
    • important: on its own, state history doesn’t allow retrieving historical state by RPC calls (see: execution.caching.archive )
    • historical state is state older then pathdb-max-diff-layers+1 (by default 129) blocks from current head block of the node
    • before nitro 3.10 state-history defaults to 24 hours of blocks at configured block speed
    • after nitro 3.10, defaults are chosen based on archive flag:
      • if execution.caching.archive is set, state-history defaults to 0, otherwise state-history defaults to 24 hours of blocks at configured block speed
  • execution.caching.archive - if set to true enables archive mode; in case of path state scheme:
    • archive mode enables state history indexing:
      • state history index is an extra data that needs to be persisted in hot database (pebble)
      • the state history index allows accessing historical state → RPC calls can access state from older blocks then pathdb-max-diff-layers+1

Troubleshooting

If you run into any issues, visit the node-running troubleshooting guide.