👽ZK-Node
Authors: [man4ela | catapulta.eth]
System Requirements
CPU
OS
RAM
DISK
4+ cores CPU
Debian 12/Ubuntu 22.04
=> 16 GB RAM
1TB+ (SSD or NVMe)
Setup XLayer Node
X Layer is an EVM-compatible Layer 2 network built with Polygon CDK, using Zero-Knowledge (ZK) technology to enhance Ethereum’s scalability, security, and efficiency
This guide covers the installation of X Layer Node (referred to as ZKNode), Synchronizer, ZKProver, and configuration of the State and Pool databases
NOTE: You will need Ethereum L1 RPC endpoint in order to sync X Layer
With their Eggfruit upgrade in September 2024, the Polygon team made the official recommendation that all infra providers will need to begin running the cdk-erigon RPC Node. While zkEVm Node is still operational, it is no longer being maintained by the Polygon team. Additionally, we found slight POI divergence in our integration testing. Please use the test below as an initial screening when working with this chain.
Pre-Requisties
Use dpkg to check the Installed version of libpqxx:
Setting up Firewall
Set explicit default UFW rules
Allow SSH
Allow remote RPC connections with Blast Node
Not advised to allow all or unknown IP address to RPC port
Enable Firewall
To check the status of UFW and see the current rules
Install GO
Build ZKnode
Move the xlayer-node binary from the build directory to the designated directory for execution:
Download ZKnode configuration and genesis.json file:
Carefully change the following parameters inside configuration file:
[State.DB]
Host = "xlayer-mainnet-state-db"
#specify Host = "127.0.0.1"
[Pool.DB]
Host = "xlayer-mainnet-pool-db"
#specify Host = "127.0.0.1"
[Etherman]
URL = ""
#input your synced L1 Ethereum RPC endpoint
[Synchronizer]
SyncInterval = "1s"
SyncChunkSize = 100
#add a line L1SynchronizationMode = "sequential"
[MTClient]
URI = "xlayer-mainnet-prover:50061"
#specify URI = "127.0.0.1:50061"
[Executor]
URI = "xlayer-mainnet-prover:50071"
#specify URI = "127.0.0.1:50071"
[Metrics]
Host = "0.0.0.0"
#specify Host = "127.0.0.1"
[HashDB]
Host = "xlayer-mainnet-state-db"
#specify Host = "127.0.0.1"
Compile and build ZKProver
Download necessary files
Download an archive (~75GB). It's a good idea to have it running in the screensession:
The archive will take up an additional 115GB of space once extracted.
Consider to recompile the protobufs:
Run make to compile the main project:
The compilation process may appear to be stuck at some point, but sit back, relax, and wait till it completes the building
Test Vectors
Download configuration files:
Modify prover.config.json:
prover.config.json:Replace
with
Create systemd files for the ZKEVM Node components
Zknode:
Paste the configs and save by entering ctrl+X and Y+ENTER:
Synchronizer:
and ZKProver:
Configure Postgresql for ZKProver
Make sure to be inside /root/zknode/zkevm-prover/ directory:
Depending on your Postgresql version (14 or 15) update postgresql.conf:
postgresql.conf:Set max_connections = 500
Save, Quit and reload postgresql to apply changes by running:
Launch X Layer node:
Monitor logs
During the synchonization, you are expected to get following log messages:
ZKNode:
ZKProver:
Synchronizer:
Run curl command in the terminal to check the status of your node
curl command in the terminal to check the status of your nodeWhen it returns false then your node is fully synchronized with the network
References
Last updated
Was this helpful?