zkLink Nova self-hosted RPC node is based on zkSync external node. You can find detailed information about zkSync external node . This section focus on how to build a zkLink Nova self-hosted RPC node.
Quick Start
Preferred hardware configuration
This configuration is approximate, expect updates to these specs.
Architecture: AMD64
CPU: 32 core
RAM: 64 GB
Storage:
Testnet - ~1 TB (at the time of writing) and will grow over time, so should be constantly monitored
Mainnet - ~2 TB (at the time of writing) and will grow over time, so should be constantly monitored
docker compose -f docker-compose.yml down --volumes
You can see the status of the node (after recovery) in the local Grafana dashboard. Those commands start external node locally inside docker. The HTTP JSON-RPC API can be accessed on port 3060 and WebSocket API can be accessed on port 3061.
Tips
After importing the data, the blocks will be scanned to restore the Merkle tree with 2000 batches per hour speed. Block synchronization will continue only after the recovery is complete. The speed of importing snapshot data into Postgres is 100G/h, the speed of rebuilding the Merkle tree is 2000 batches/h, with the specific time depending on the database snapshot.
Get local latest block
curl http://localhost:3060 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
When first start service, it will take 5 hours to struct Merkle tree.
Building External Node from Source Code
This document outlines how to build the External Node from the zkLink Nova source code, supporting three ways:
Building the binary file for the External Node directly from the source code.
Building the Docker image for the External Node directly from the source code.
Customizing the Docker image for the External Node built from the source code.
Install Dependencies
Run the following commands to install the necessary dependencies.
Note: If you only wish to build the Docker image for the zkLink Nova External Node from the source code, you only need to install the Docker-related dependencies.
Use the command below to pull the zkLink Nova source code and fetch the submodules. If you wish to build code related to the zkLink Nova Sepolia testnet, please use the zklink_testnet branch.