Skip to content

Commit 34f6f2d

Browse files
committing page
1 parent 5c44d98 commit 34f6f2d

File tree

4 files changed

+122
-119
lines changed

4 files changed

+122
-119
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Overview of the full environment
2+
3+
Implementing the full stack Polygon CDK zkRollup EVM-compatible network involves more than just running a node and the prover to validate batches and deploy smart contracts. In its entirety, it encompasses all these processes and more.
4+
5+
The common rollup actors are the sequencer, the aggregator, the synchroniser and the JSON RPC node. All these affect the L2 state.
6+
7+
Also, the aggregator uses the prover to avail verifiable proofs of sequenced batches. And the sequenced batches are composed of transactions taken from the pool database.
8+
9+
This highlights just a few main components. The rest of the components and those working in the background, are listed in the next subsection.
10+
11+
### Why you need Docker
12+
13+
The modular design of the CDK zkRollup EVM-compatible network allows for most components to be separately instantiated, and we therefore run each of these instances in a separate Docker container.
14+
15+
The below table enlists all the CDK zkRollup EVM-compatible components/services and their corresponding container-names.
16+
17+
Our CDK zkRollup deployment-guide provides CLI commands to automatically create these Docker containers.
18+
19+
| Component | Container | Brief\ Description |
20+
| :---------------- | :------------------- | ------------------------------------------------------------ |
21+
| Sequencer | zkevm-sequencer | Fetches txs from the pool DB, checks if valid, then puts valid ones into a batch. |
22+
| Aggregator | zkevm-aggregator | Validates sequenced batches by generating verifiable zero-knowledge proofs. |
23+
| Synchronizer | zkevm-sync | Updates the state by fetching data from Ethereum through the Etherman. |
24+
| JSON RPC | zkevm-rpc | An interface for interacting with the network. e.g., Metamask, Etherscan or Bridge. |
25+
| State DB | zkevm-state-db | A database for permanently storing state data (apart from the Merkle tree). |
26+
| Prover | zkevm-prover-server | Used by the aggregator to create zk-proofs. Runs on an external cloud server. |
27+
| Pool DB | zkevm-pool-db | Stores txs from the RPC nodes, waiting to be put in a batch by the sequencer. |
28+
| Executor | zkevm-executor | Executes all processes. Collects results’ metadata (state root, receipts, logs) |
29+
| Etherman | zkevm-eth-tx-manager | Implements methods for all interactions with the L1 network and smart contracts. |
30+
| Bridge UI | zkevm-bridge-ui | User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
31+
| Bridge DB | zkevm-bridge-db | A database for storing bridge-related transactions data. |
32+
| Bridge service | zkevm-bridge-service | A backend service enabling clients like the web UI to interact with bridge smart contracts. |
33+
| zkEVM explorer | zkevm-explorer-l2 | L2 network's block explorer. i.e., The zkRollup Etherscan [rxplorer](https://zkevm.polygonscan.com). |
34+
| zkEVM explorer DB | zkevm-explorer-l2-db | Database for the L2 network's Block explorer. i.e., Where all the zkRollup Etherscan explorer queries are made. |
35+
| Gas pricer | zkevm-l2gaspricer | Responsible for suggesting the gas price for the L2 network fees. |
36+
| Goërli execution | goerli-execution | L1 node's execution layer. |
37+
| Goërli consensus | goerli-consensus | L1 node's consensus layer.
Lines changed: 10 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,21 @@
1-
This quick start takes you through the process of deploying a full CDK zkRollup EVM-compatible network on the Goërli testnet as the L1 network.
2-
3-
The quickstart is split into separate sections.
4-
5-
1. Prerequisites(prerequisites.md): Preliminary setup, checking system requirements, and prerequisite variables.
6-
7-
- [**Second step**](install-dependencies.md): Installing dependencies and downloading mainnet files.
8-
9-
- [**Third step**](create-wallets.md): Creating wallets and deploying contracts.
10-
11-
- [**Fourth step**](deploy-node.md): Deployment of the zkRollup EVM-compatible node.
12-
13-
- [**Fifth step**](configure-prover.md): Configuring the prover and services.
14-
15-
- [**Sixth step**](setup-goerli-node.md): Activating forced txs and bridging/claiming assets.
1+
This quick start takes you through the process of deploying a full CDK zkRollup, EVM-compatible network on Goerli.
162

173
!!!caution
18-
- Instructions in this document are subject to frequent updates as the software is still in early development stages.
4+
- Instructions in this document are subject to frequent updates as the software is still at an early development stage.
195
- Please [open a ticket](https://support.polygon.technology/support/tickets/new) or reach out to our [support team on Discord](https://discord.com/invite/0xPolygon) if you encounter any issues.
206

21-
## Overview and setting up
22-
23-
Implementing the full stack Polygon CDK zkRollup EVM-compatible network involves more than just running a node and the prover to validate batches and deploy smart contracts. In its entirety, it encompasses all these processes and more.
24-
25-
The common rollup actors are the sequencer, the aggregator, the synchroniser and the JSON RPC node. All these affect the L2 state.
26-
27-
Also, the aggregator uses the prover to avail verifiable proofs of sequenced batches. And the sequenced batches are composed of transactions taken from the pool database.
28-
29-
This highlights just a few main components. The rest of the components and those working in the background, are listed in the next subsection.
30-
31-
### Why you need Docker
32-
33-
The modular design of the CDK zkRollup EVM-compatible network allows for most components to be separately instantiated, and we therefore run each of these instances in a separate Docker container.
34-
35-
The below table enlists all the CDK zkRollup EVM-compatible components/services and their corresponding container-names.
36-
37-
Our CDK zkRollup deployment-guide provides CLI commands to automatically create these Docker containers.
38-
39-
| Component | Container | Brief\ Description |
40-
| :---------------- | :------------------- | ------------------------------------------------------------ |
41-
| Sequencer | zkevm-sequencer | Fetches txs from the pool DB, checks if valid, then puts valid ones into a batch. |
42-
| Aggregator | zkevm-aggregator | Validates sequenced batches by generating verifiable zero-knowledge proofs. |
43-
| Synchronizer | zkevm-sync | Updates the state by fetching data from Ethereum through the Etherman. |
44-
| JSON RPC | zkevm-rpc | An interface for interacting with the network. e.g., Metamask, Etherscan or Bridge. |
45-
| State DB | zkevm-state-db | A database for permanently storing state data (apart from the Merkle tree). |
46-
| Prover | zkevm-prover-server | Used by the aggregator to create zk-proofs. Runs on an external cloud server. |
47-
| Pool DB | zkevm-pool-db | Stores txs from the RPC nodes, waiting to be put in a batch by the sequencer. |
48-
| Executor | zkevm-executor | Executes all processes. Collects results’ metadata (state root, receipts, logs) |
49-
| Etherman | zkevm-eth-tx-manager | Implements methods for all interactions with the L1 network and smart contracts. |
50-
| Bridge UI | zkevm-bridge-ui | User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
51-
| Bridge DB | zkevm-bridge-db | A database for storing bridge-related transactions data. |
52-
| Bridge service | zkevm-bridge-service | A backend service enabling clients like the web UI to interact with bridge smart contracts. |
53-
| zkEVM explorer | zkevm-explorer-l2 | L2 network's block explorer. i.e., The zkRollup Etherscan [rxplorer](https://zkevm.polygonscan.com). |
54-
| zkEVM explorer DB | zkevm-explorer-l2-db | Database for the L2 network's Block explorer. i.e., Where all the zkRollup Etherscan explorer queries are made. |
55-
| Gas pricer | zkevm-l2gaspricer | Responsible for suggesting the gas price for the L2 network fees. |
56-
| Goërli execution | goerli-execution | L1 node's execution layer. |
57-
| Goërli consensus | goerli-consensus | L1 node's consensus layer. |
58-
59-
## Preliminary setup
60-
61-
Implementing the Polygon CDK zkRollup EVM-compatible network requires either a Linux machine or a virtual machine running Linux as a Guest OS.
62-
63-
Since the CDK zkRollup implementation involves running Docker containers, ensure that a Docker daemon is installed on your machine.
64-
65-
Here's how to get setup;
66-
67-
For Linux machines, install the Docker engine directly on the machine.
68-
69-
For other operating systems (MacOS, Windows), this is achieved in 4 steps, executed in the given sequential order;
70-
71-
- Install a hypervisor, e.g., VirtualBox, VMware Fusion (MacOS), VMware Workstation (Windows), VMware ESXi (Bare Metal Hypervisor).
72-
- Setup a virtual machine, e.g., if you are using VirtualBox, which is open-source, Vagrant is the quickest way to automatically setup a virtual machine and also set up ssh private/public keys.
73-
- Install Linux as Guest OS, preferably the latest version of Ubuntu Linux.
74-
- Install [Docker](https://docs.docker.com/desktop/install/linux-install/).
75-
76-
Search the internet for quick guides on creating virtual machines. Here's an example of a video on [how to create a Linux VM on a Mac](https://www.youtube.com/watch?v=KAd7FafXfJQ).
77-
78-
In order to run multiple Docker containers, an extra tool called `docker compose` needs to be [downloaded and installed](https://docs.docker.com/compose/install/linux/). As you will see, a YAML file is used for configuring all CDK zkRollup services.
79-
80-
!!!info
81-
One more thing, since the prover is resource-heavy, you will need to run its container externally. Access to cloud computing services such as AWS EC2 or DigitalOcean will be required.
82-
83-
### Prerequisites
84-
85-
Next, ensure that you have checked your system specs, and have at hand all the variables listed below.
86-
87-
#### Environment variables
88-
89-
You'll need the following items to begin:
90-
91-
- `INFURA_PROJECT_ID` // Same as API Key in your Infura account
92-
- `ETHERSCAN_API_KEY`
93-
- Public IP address
94-
- L1 Goërli node RPC
95-
- Goërli address with **0.5 GöETH**
96-
97-
See this guide here for [**setting up your own Goërli node**](setup-goerli-node.md).
98-
99-
#### Computing requirements
100-
101-
Keep in mind that the mainnet files you will be downloading are 70GB in size.
102-
103-
If the prover is the only container you will be running externally in a cloud, then it is preferable to have a minimum 300GB of storage in the primary machine.
104-
105-
Depending on the user's resources, the zkEVM network can be implemented with either the actual full prover or the mock prover.
106-
107-
The full prover is resource-intensive as it utilizes the exact same proving stack employed in the real and live CDK zkRollup network.
108-
109-
!!!info
110-
The full prover's system requirements are:
111-
112-
- 96-core CPU
113-
- Minimum 768GB RAM
7+
The process is split into separate sections:
1148

115-
The mock prover is a dummy prover which simply adds a "Valid ✅" checkmark to every batch.
9+
1. [Overview of the full environment](environment-overview.md): Overview of the full CDK zkRollup environment we're building.
11610

117-
!!!info
118-
The mock prover, on the other hand, only requires:
11+
2. [Prerequisites](prerequisites.md): Preliminary setup, checking system requirements, and prerequisite variables.
11912

120-
- 4-core CPU
121-
- 8GB RAM (16GB recommended)
13+
2. [Installation](install-dependencies.md): Installing dependencies and downloading mainnet files.
12214

123-
As an example, the equivalent [AWS EC2s](https://aws.amazon.com/ec2/instance-types/r6a/) for each of these two provers are as follows:
15+
3. [Create wallets](create-wallets.md): Creating wallets and deploying contracts.
12416

125-
- `r6a.xlarge` for mock prover.
126-
- `r6a.24xlarge` for full prover.
17+
4. [Deploy node](deploy-node.md): Deployment of the zkRollup EVM-compatible node.
12718

128-
The initial free disk space requirement is minimal (<2TB), but you should monitor available space as the network is always adding more data.
19+
5. [Configure prover](configure-prover.md): Configuring the prover and services.
12920

130-
Once all the layers are setup and all prerequisites are in place, you can proceed to the next step of this guide.
21+
6. [Set up Goerli node](setup-goerli-node.md): Activating forced transactions and bridging/claiming assets.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
|
2+
## Preliminary setup
3+
4+
Implementing the Polygon CDK zkRollup EVM-compatible network requires either a Linux machine or a virtual machine running Linux as a Guest OS.
5+
6+
Since the CDK zkRollup implementation involves running Docker containers, ensure that a Docker daemon is installed on your machine.
7+
8+
Here's how to get setup;
9+
10+
For Linux machines, install the Docker engine directly on the machine.
11+
12+
For other operating systems (MacOS, Windows), this is achieved in 4 steps, executed in the given sequential order;
13+
14+
- Install a hypervisor, e.g., VirtualBox, VMware Fusion (MacOS), VMware Workstation (Windows), VMware ESXi (Bare Metal Hypervisor).
15+
- Setup a virtual machine, e.g., if you are using VirtualBox, which is open-source, Vagrant is the quickest way to automatically setup a virtual machine and also set up ssh private/public keys.
16+
- Install Linux as Guest OS, preferably the latest version of Ubuntu Linux.
17+
- Install [Docker](https://docs.docker.com/desktop/install/linux-install/).
18+
19+
Search the internet for quick guides on creating virtual machines. Here's an example of a video on [how to create a Linux VM on a Mac](https://www.youtube.com/watch?v=KAd7FafXfJQ).
20+
21+
In order to run multiple Docker containers, an extra tool called `docker compose` needs to be [downloaded and installed](https://docs.docker.com/compose/install/linux/). As you will see, a YAML file is used for configuring all CDK zkRollup services.
22+
23+
!!!info
24+
One more thing, since the prover is resource-heavy, you will need to run its container externally. Access to cloud computing services such as AWS EC2 or DigitalOcean will be required.
25+
26+
### Prerequisites
27+
28+
Next, ensure that you have checked your system specs, and have at hand all the variables listed below.
29+
30+
#### Environment variables
31+
32+
You'll need the following items to begin:
33+
34+
- `INFURA_PROJECT_ID` // Same as API Key in your Infura account
35+
- `ETHERSCAN_API_KEY`
36+
- Public IP address
37+
- L1 Goërli node RPC
38+
- Goërli address with **0.5 GöETH**
39+
40+
See this guide here for [**setting up your own Goërli node**](setup-goerli-node.md).
41+
42+
#### Computing requirements
43+
44+
Keep in mind that the mainnet files you will be downloading are 70GB in size.
45+
46+
If the prover is the only container you will be running externally in a cloud, then it is preferable to have a minimum 300GB of storage in the primary machine.
47+
48+
Depending on the user's resources, the zkEVM network can be implemented with either the actual full prover or the mock prover.
49+
50+
The full prover is resource-intensive as it utilizes the exact same proving stack employed in the real and live CDK zkRollup network.
51+
52+
!!!info
53+
The full prover's system requirements are:
54+
55+
- 96-core CPU
56+
- Minimum 768GB RAM
57+
58+
The mock prover is a dummy prover which simply adds a "Valid ✅" checkmark to every batch.
59+
60+
!!!info
61+
The mock prover, on the other hand, only requires:
62+
63+
- 4-core CPU
64+
- 8GB RAM (16GB recommended)
65+
66+
As an example, the equivalent [AWS EC2s](https://aws.amazon.com/ec2/instance-types/r6a/) for each of these two provers are as follows:
67+
68+
- `r6a.xlarge` for mock prover.
69+
- `r6a.24xlarge` for full prover.
70+
71+
The initial free disk space requirement is minimal (<2TB), but you should monitor available space as the network is always adding more data.
72+
73+
Once all the layers are setup and all prerequisites are in place, you can proceed to the next step of this guide.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ nav:
5151
- Validium: cdk/get-started/deploy-validium.md
5252
- Rollup:
5353
- Introduction: cdk/get-started/deploy-rollup/intro.md
54+
- Environment overview: cdk/get-started/deploy-rollup/intro.md
55+
- Prerequisites: cdk/get-started/deploy-rollup/prerequisites.md
5456
- Install dependencies: cdk/get-started/deploy-rollup/install-dependencies.md
5557
- Create wallets: cdk/get-started/deploy-rollup/create-wallets.md
5658
- Deploy node: cdk/get-started/deploy-rollup/deploy-node.md

0 commit comments

Comments
 (0)