Run a Node

Introduction

zkLink Nova self-hosted RPC node is based on zkSync external node. You can find detailed information about zkSync external node here. 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

    • NVMe recommended

  • Network: 100 Mbps network connection.

Software Prerequisites

You can follow Docker's official manuals to install docker compose and Docker.

We offer a docker-compose file to facilitate running a zkLink Nova self-hosted rpc node locally.

To start a mainnet instance, run:

sudo mkdir -p /data/mainnet-postgres
sudo mkdir -p /data/mainnet-rocksdb
sudo mkdir -p /data/mainnet-prometheus-data
sudo mkdir -p /data/mainnet-grafana-data
docker compose -f docker-compose.yml up

To reset its state, run:

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.

Note

The node will recover from a snapshot on it's first run, this may take up to 10 hours. Before the recovery is finished, the API server won't serve any requests.

Advanced setup

If you need monitoring, backups, to recover from DB dump or a more customized postgres settings, etc., please refer to the ansible-en-role repo of matter labs.

Last updated