|
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. |
16 | 2 |
|
17 | 3 | !!!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. |
19 | 5 | - 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. |
20 | 6 |
|
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: |
114 | 8 |
|
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. |
116 | 10 |
|
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. |
119 | 12 |
|
120 | | - - 4-core CPU |
121 | | - - 8GB RAM (16GB recommended) |
| 13 | +2. [Installation](install-dependencies.md): Installing dependencies and downloading mainnet files. |
122 | 14 |
|
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. |
124 | 16 |
|
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. |
127 | 18 |
|
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. |
129 | 20 |
|
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. |
0 commit comments