Archive Node
Archive nodes store the entire history of the Sonic chain, including all historical states, transactions, and blocks since the genesis block.
These nodes handle historical data requests, useful for chain explorers or apps that require historical chain information. However, they do not validate transactions or create new blocks, which is the role of validator nodes.
To run an archive node on the Sonic mainnet or Blaze testnet, follow the steps below.
1. Build Sonic Client and Tooling
The minimal configuration for a Sonic archive node is a Linux server with 4 vCPU, 32 GB of RAM, and local SSD storage. We recommend at least 8 vCPU and 64 GB of RAM, but 128GB of RAM is generally preferable for high-demand nodes.
You will need ≈1TB of free local SSD space to achieve good performance and speed. The configuration details depend on your specific use case.
The IOPS throughput and random access latency of the state DB persistent storage determine the performance of Sonic. For a smooth installation and fast response time, we recommend a local NVMe or a local SSD drive.
A remote block device, e.g. AWS Elastic Block Store (EBS), does not provide the required latency and IOPS performance.
The system firewall must allow TCP and UDP connections from/to port 5050.
Building the Sonic binary requires the essential software compilation tools and the Go language version 1.22 or newer to be available. Please refer to your Linux distribution manuals to obtain the development tools installed on your system.
Build Sonic Client
Download the Sonic source code from the following GitHub repository.
Switch to the most recent Sonic release.
Build the Sonic binary using the provided configuration.
Transfer the new binaries to the bin folder for system-wide access (optional).
2. Prime Sonic State DB
Download the most recent network archive genesis file for the Sonic mainnet or Blaze testnet.
The genesis file will be used to prime your local state database and will allow you to join the network and synchronize with it. Please check the downloaded genesis file using the provided checksum.
The expected output is sonic.g: OK
.
Prime Sonic Database
Use the sonictool app (created during the building process as build/sonictool) to prime a validated archive state database for the Sonic client. Start the genesis expansion.
The last step of the genesis processing is the state validation. Please double-check that the output log contains the following messages with details about the verified state:
3. Synchronize Sonic Node With Network
With the Sonic app created and the database primed in the previous step, you are ready to start the node and synchronize its state with the network.
Use the node database path (
<datadir>
) from the previous step.Use ≈90% of the RAM as the GOMEMLIMIT value.
Use ≈12 GiB of the RAM as the --cache value.
Additional starting flags may need to be added to start Web3 RPC and WebSocket interfaces on the node. Add the following flags to enable the Web3 HTTP interface. Adjust your listening IP address, port, CORS, and list of enabled APIs for your specific needs.
Add the following flags to enable the WebSockets interface. Adjust your listening IP address, port, origin, and list of enabled APIs for your specific needs.
Please obtain and explicitly specify the external IP address of your node as a starting flag to help with the inter-node peer-to-peer connectivity.
Now, start your node with the sonicd application.
Last updated