What is an archive node?
Simply speaking, an archive node is a full node running with an additional special option, --gcmode archive. It stores all the historical data of the blockchain starting from the genesis block. As compared to a typical full node that just holds all the state change data for some latest blocks, an archive node always stores them for each block.
Why is an archive node important?
Developers are limited to querying the limited recent blocks to check the balance of an address and the state of a smart contract with a full node. It is hard to get all what they want as the blockchain is moving forward at the same time, while they can query any block at a specific point in time with an archive node. Archive nodes are used by various applications on the blockchain for challenging use cases, including but not limited to the followings:
Automatic trading system needs historical data to optimize trading model
Verification modules need state data to verify transactions in time
Analytical tools need full historical data to do data analysis
Exchange in some wallets depends on archive node for fast and efficient transfers
Suggested Requirements
Running an archive node will take a high cost as it includes all the block and state change data. First of all it needs the disk with sufficient capacity; besides this, the CPU and disk performance should be good enough to catch up with the latest block height.
Archive Node
An Archive Node in NOW Chain is a specialized node that stores the full history of the blockchain, including all states, blocks, and transactions. Unlike a full node, which only retains the current state and a limited set of historical data, an archive node preserves every single state of the NOW blockchain, making it invaluable for certain advanced use cases.
Features of an Archive Node
- Complete Historical Data: Archive nodes store every state change that has occurred since the blockchain's inception. This includes all smart contract states, transactions, and block data.
- Detailed Queries: Allows for querying detailed historical data, such as the state of a smart contract or an account balance at any specific block height.
- State Restoration: Enables the ability to restore and inspect the state of the blockchain at any previous point in time.
Use Cases
- Blockchain Analytics: Archive nodes are essential for in-depth blockchain analytics, where historical data is needed for analysis or auditing.
- Smart Contract Debugging: Developers can use archive nodes to debug smart contracts by examining past states and transactions.
- Forensics and Compliance: In scenarios where regulatory compliance is necessary, archive nodes provide the ability to retrieve historical data for audits and forensic investigations.
System Configuration Requirements
Component | Requirement | Description |
---|---|---|
System | Ubuntu 20.04 or later | Recommended operating system for deploying the RPC Archive Node. Ubuntu 20.04 or later is a stable and popular Linux distribution that provides a suitable environment for blockchain applications. |
CPU | 16 cores or more | Minimum requirement of an 16-core CPU to efficiently handle synchronization tasks and data queries on the blockchain, ensuring smooth node operation. |
Memory | RAM: 64GB or more (higher RAM correlates with better performance) | Minimum RAM required for the node to process and temporarily store data when performing historical queries and maintaining the blockchain state. |
Hard Disk | Minimum 6TB (SSD or NVMe) | Required disk space to store the entire blockchain data. An SSD, particularly NVMe, provides faster read/write speeds, which accelerates synchronization and querying processes. |
Archive data
MegaNode provides archive data accessibility to all tiers of customers with no additional fee required! If your application requires historical data, you can request using the below JSON-RPC methods.
- eth_getBalance
- eth_getCode
- eth_getStorageAt
- eth_call
- eth_estimateGas
- eth_getTransactionCount
Debug API
Debug API helps you to reply to the transactions that may have been executed prior in the same manner. It requires higher cost and response time due to its maintenance and infrastructure cost.
- debug_traceTransaction
- debug_traceCall
- debug_traceBlockByNumber
- debug_traceBlockByHash
URL NOW Scan API Documentation
Also, you can use nowscan's api to research more
https://nowscan.io/docs-api (opens in a new tab)
To set up an Archive Node using Geth (Go Ethereum) (opens in a new tab), follow the steps below:
Running Geth as an Archive Node
You can run Geth as an archive node by using the --gcmode=archive
flag when starting the node:
geth --datadir /path/to/your/data --gcmode=archive *