Skip to content

Commit 14fdd20

Browse files
Merge pull request 0xPolygon#475 from 0xPolygon/zkevm/prod-node-update
Updating the production node install Cardona requirements
2 parents 1f718ac + 23ce509 commit 14fdd20

File tree

1 file changed

+43
-50
lines changed

1 file changed

+43
-50
lines changed

docs/zkEVM/get-started/setup-nodes/production-node.md

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,49 @@
22
comments: true
33
---
44

5-
Polygon zkEVM's Mainnet Beta is available for developers to launch smart contracts, execute transactions, and experiment with the network. This tutorial extends the exploration by allowing developers to launch their own production zkNode.
5+
The Polygon zkEVM beta mainnet is available for developers to launch smart contracts, execute transactions, and experiment. This document shows you how to launch your own production zkNode.
66

7-
Developers can setup a production node with either the Polygon zkEVM's mainnet or the Cardona testnet.
7+
Developers can setup a production node with either the Polygon zkEVM mainnet or the Cardona testnet.
88

9-
After spinning up an instance of the production zkNode, you will be able to run the Synchronizer and utilize the JSON-RPC interface.
9+
After spinning up an instance of the production node, you can run the synchronizer and utilize the JSON-RPC interface.
1010

1111
!!!info
12-
Sequencer and Prover functionalities are not covered in this document as they are still undergoing development and rigorous testing.
13-
14-
Syncing zkNode currently takes anywhere between 1-2 days depending on various factors. The team is working on snapshots to improve the syncing time.
12+
- Sequencer and prover functionalities are not covered in this document as they are still undergoing development and rigorous testing.
13+
- Syncing the zkNode currently takes anywhere between 1-2 days depending on various factors. The team is working on snapshots to improve the syncing time.
1514

1615
## Prerequisites
1716

18-
This tutorial requires `docker-compose` to have been installed.
17+
This tutorial requires a [`docker-compose`](https://docs.docker.com/compose/install/) installation.
1918

20-
Please check the [official docker-compose installation guide](https://docs.docker.com/compose/install/) for this purpose.
19+
Run the following to create a directory:
2120

22-
It is highly recommended that you create a separate folder for installing and working around the zkNode. We won't be cloning any repository (unlike [local zkNode setup](local-node.md)) so it's better to create a folder before starting the zkNode setup: ```mkdir -p /$HOME/zkevm-node```.
21+
```sh
22+
mkdir -p ~/zkevm-node
23+
```
2324

24-
### Minimum system requirements
25+
### Minimum hardware requirements
2526

2627
!!!caution
27-
The zkProver does not work on ARM-based Macs yet. For Windows users, the use of WSL/WSL2 is not recommended.
28-
29-
Currently, zkProver optimizations require CPUs that support the AVX2 instruction, which means some non-M1 computers, such as AMD, won't work with the software regardless of the OS.
28+
- The zkProver does not work on ARM-based Macs yet.
29+
- For Windows users, the use of WSL/WSL2 is not recommended.
30+
- Currently, zkProver optimizations require CPUs that support the AVX2 instruction, which means some non-M1 computers, such as AMD, won't work with the software regardless of the OS.
3031

3132
- 16GB RAM
3233
- 4-core CPU
33-
- 70GB Storage (This will increase over time)
34-
35-
!!!info About batch rate
36-
Batches are closed every 10s, or whenever they are full (which can happen when there are high network loads).
37-
Also, how frequent batches are closed is subject to change as it depends on the prevailing configurations.
38-
The batch rate will always need to be updated accordingly.
34+
- ~250/350GB storage (increasing over time)
3935

40-
### Network components
36+
### Software requirements
4137

42-
Here is a list of crucial network components that are required before you can run the production zkNode:
43-
44-
- An Ethereum Node, which could be Geth or any service providing a JSON RPC interface for accessing the L1 network can be used.
45-
- zkEVM node (or zkNode), as the L2 network.
46-
- Synchronizer, which is responsible for synchronizing data between L1 and L2.
47-
- A JSON RPC Server, which acts as an interface to the L2 network.
38+
- An Ethereum node; Geth or any service providing a JSON RPC interface for accessing the L1 network.
39+
- zkEVM node (or zkNode) for the L2 network.
40+
- Synchronizer which is responsible for synchronizing data between L1 and L2.
41+
- A JSON RPC server which acts as an interface to the L2 network.
4842

4943
## Ethereum node setup
5044

51-
The Ethereum node is the first component to be set up. And it is because the Ethereum network takes a long time to synchronise. So, we start synchronising the Ethereum Node, and then begin to setup other components while waiting for the synchronisation to complete.
45+
We set up the Ethereum node first as it takes a long time to synchronize.
5246

53-
There are numerous ways to set up an Ethereum L1 environment; we will use Geth for this. We recommend Geth, but a Sepolia node will suffice.
47+
We recommend using Geth but a Sepolia node is OK too.
5448

5549
Follow the instructions provided in this [guide to setup and install Geth](https://geth.ethereum.org/docs/getting-started/installing-geth).
5650

@@ -77,18 +71,8 @@ Let's start setting up our zkNode:
7771
ZKEVM_CONFIG_DIR=./path_to_config
7872
```
7973

80-
2. Download and extract the artifacts. Note that you may need to [install unzip](https://formulae.brew.sh/formula/unzip) before running this command. Also, the mainnet uses the latest version, and Cardona testnet uses a specific version.
74+
2. Download and extract the artifacts. Note that you may need to [install unzip](https://formulae.brew.sh/formula/unzip) before running this command.
8175

82-
So use the next `curl` command specifically for Cardona, which uses version v0.6.3.
83-
84-
The recommended version of Cardona can be changed, so please check the `Testnet/Mainnet versions` section of [0xPolygonHermez Github](https://github.com/0xPolygonHermez):
85-
86-
```bash
87-
curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/download/v0.6.3/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip
88-
```
89-
90-
And use this second command for the mainnet:
91-
9276
```bash
9377
curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip
9478
```
@@ -101,20 +85,24 @@ Let's start setting up our zkNode:
10185

10286
4. The `example.env` file must be modified according to your configurations.
10387

104-
Edit the .env file with your favourite editor (we'll use nano in this guide): ```nano $ZKEVM_CONFIG_DIR/.env```
88+
Edit the .env file with your favorite editor (we use nano):
89+
90+
```sh
91+
nano $ZKEVM_CONFIG_DIR/.env
92+
```
10593

106-
```bash
107-
# ZKEVM_NETWORK = "mainnet" or ZKEVM_NETWORK = "cardona"
108-
109-
# URL of a JSON RPC for Sepolia
110-
ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url"
94+
```bash
95+
# ZKEVM_NETWORK = "mainnet" or ZKEVM_NETWORK = "cardona"
96+
97+
# URL of a JSON RPC for Sepolia
98+
ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url"
11199
112-
# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA
113-
ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/stetedb"
100+
# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA
101+
ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/stetedb"
114102
115-
# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA
116-
ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb"
117-
```
103+
# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA
104+
ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb"
105+
```
118106

119107
5. To run the zkNode instance, run the following command:
120108

@@ -168,3 +156,8 @@ In other words, instead of running ```cp $ZKEVM_DIR/testnet/example.env $ZKEVM_C
168156
```bash
169157
docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml logs <cointainer_name>
170158
```
159+
160+
!!!info "Batch rate"
161+
- Batches are closed every 10s, or whenever they are full.
162+
- The frequency of closing batches is subject to change as it depends on the prevailing configurations.
163+
- The batch rate always needs to be updated accordingly.

0 commit comments

Comments
 (0)