Skip to content

Commit 9aa3bd0

Browse files
deploy rollup docs for cdk
1 parent e5447ee commit 9aa3bd0

File tree

6 files changed

+128
-136
lines changed

6 files changed

+128
-136
lines changed

docs/cdk/get-started/deploy-rollup/activate-forced-transactions.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
2-
Continue with the **sixth step** of this deployment-guide where you activate forced transactions, as well as bridging and claiming assets.
3-
4-
## Activate forced transactions
1+
Set up Hardhat and run the JavaScript code below to activate forced transactions.
52

63
```bash
74
cd ~/zkevm-contracts
@@ -97,5 +94,5 @@ go run main.go
9794
```
9895

9996
!!!congratulations
100-
Congratulations on reaching this far in setting up your own zkEVM network.
101-
**Your network is live on the Testnet** and you can send transactions to verify the same. Also, we have provided a Goerli full node setup guide below in case you are looking for one.
97+
- Congratulations on reaching this far in setting up your own CDK zkRollup EVM-compatible network network.
98+
- Your network is live on the testnet and you can send transactions to verify the same. Also, we have provided a Goerli full node setup guide next in case you are looking for one.

docs/cdk/get-started/deploy-rollup/configure-prover.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
Continue with this deployment guide's **fifth step** where you configure the Prover and Services.
3-
41
## Edit DBs
52

63
Edit `~/zkevm/mainnet/db/scripts/init_prover_db.sql` to match this:
@@ -28,7 +25,7 @@ GRANT ALL PRIVILEGES ON TABLE state.program TO prover_user;
2825

2926
Save and exit the file once the changes have been made. The above SQL script will set up your databases for the zkEVM Node.
3027

31-
## Configure the Prover
28+
## Configure the prover
3229

3330
Create the `~/zkevm/config.json` and paste the configs below. Replace the `aggregatorClientHost` parameter with your **PUBLIC IP**:
3431

@@ -131,7 +128,7 @@ vim ~/zkevm/config.json
131128
}
132129
```
133130

134-
### Configure services
131+
## Configure services
135132

136133
Edit the `~/zkevm/mainnet/docker-compose.yml` file with the following content:
137134

@@ -650,7 +647,7 @@ docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker
650647
docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml logs -f zkevm-state-db
651648
```
652649

653-
### Start the Prover (contains executor)
650+
### Start the prover (contains executor)
654651

655652
```bash
656653
export ZKEVM_NET="mainnet"

docs/cdk/get-started/deploy-rollup/deploy-node.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ZKEVM_NODE_STATEDB_DATA_DIR = "~/zkevm/data/statedb"
2929
ZKEVM_NODE_POOLDB_DATA_DIR = "~/zkevm/data/pooldb"
3030
```
3131

32-
### Approve MATIC token for sequencer
32+
## Approve MATIC token for sequencer
3333

3434
Run the below command to launch a Hardhat console connected to the Goerli network.
3535

@@ -54,7 +54,7 @@ maticTokenContractWallet = maticTokenContract.connect(wallet);
5454
await maticTokenContractWallet.approve("", ethers.utils.parseEther("100.0")); // From ~/zkevm-contracts/deployments/goerli_*/deploy_output.json polygonZkEVMAddress
5555
```
5656

57-
### Configure genesis
57+
## Configure genesis
5858

5959
Run the below commands to copy `genesis.json` file into appropriate location and open for editing:
6060

@@ -63,7 +63,10 @@ cp ~/zkevm-contracts/deployments/goerli_*/genesis.json ~/zkevm/mainnet/config/en
6363
vim ~/zkevm/mainnet/config/environments/testnet/public.genesis.config.json
6464
```
6565

66-
Edit the file changing the following parameters from `~/zkevm/zkevm-contracts/deployments/goerli_***/deploy_output.json`. **Keep in mind that `genesisBlockNumber` is called `deploymentBlockNumber` in `deploy_output.json`**.
66+
Edit the file changing the following parameters from `~/zkevm/zkevm-contracts/deployments/goerli_***/deploy_output.json`.
67+
68+
!!! important
69+
The `genesisBlockNumber` is called `deploymentBlockNumber` in `deploy_output.json`.
6770

6871
```json
6972
"l1Config" : {
@@ -76,17 +79,13 @@ Edit the file changing the following parameters from `~/zkevm/zkevm-contracts/de
7679
# add above to head of file, leave all remaining fields intact
7780
```
7881

79-
### Update node config file
82+
## Update node config file
8083

8184
Edit `~/zkevm/mainnet/config/environments/testnet/public.node.config.toml` with the following values. The config file is large and we'll update the documentation in the future to list only the updated parameters.
8285

8386
??? "Click to expand the <code>node.config.toml</code> file"
8487
```bash
8588
vim ~/zkevm/mainnet/config/environments/testnet/public.node.config.toml
86-
87-
```
88-
89-
```bash
9089
IsTrustedSequencer = true
9190
[Log]
9291
Environment = "development"
@@ -263,7 +262,7 @@ Edit `~/zkevm/mainnet/config/environments/testnet/public.node.config.toml` with
263262
Enabled = true
264263
```
265264

266-
### Add wallets
265+
## Add wallets
267266

268267
Copy/paste keystore value from wallets.txt for sequencer/aggregator respectively:
269268

docs/cdk/get-started/deploy-rollup/intro.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome to your step-by-step guide to implementing a full CDK zkRollup EVM-compa
1818

1919
## Overview and setting up
2020

21-
Implementing the full stack Polygon CDK zkRollup EVM-compatible network involves more than just running an RPC zkNode or the Prover to validate batches and deploy smart contracts. In its entirety, it encompasses all these processes and more.
21+
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.
2222

2323
The common rollup actors are the sequencer, the aggregator, the synchroniser and the JSON RPC node. All these affect the L2 state.
2424

@@ -32,32 +32,29 @@ The modular design of the CDK zkRollup EVM-compatible network allows for most co
3232

3333
The below table enlists all the CDK zkRollup EVM-compatible components/services and their corresponding container-names.
3434

35-
Our CDK zkRollup EVM-compatible network deployment-guide provides CLI commands to automatically create these Docker containers.
35+
Our CDK zkRollup deployment-guide provides CLI commands to automatically create these Docker containers.
3636

3737
| Component | Container | Brief\ Description |
3838
| :---------------- | :------------------- | ------------------------------------------------------------ |
39-
| Sequencer | zkevm-sequencer | Fetches txs from Pool DB, checks if valid, then puts valid ones into a batch. |
40-
| Aggregator | zkevm-aggregator | Validates sequenced batches by generating verifiable Zero Knowledge proofs. |
39+
| Sequencer | zkevm-sequencer | Fetches txs from the pool DB, checks if valid, then puts valid ones into a batch. |
40+
| Aggregator | zkevm-aggregator | Validates sequenced batches by generating verifiable zero-knowledge proofs. |
4141
| Synchronizer | zkevm-sync | Updates the state by fetching data from Ethereum through the Etherman. |
42-
| JSON RPC | zkevm-rpc | An interface for interacting with the zkEVM. e.g., Metamask, Etherscan or Bridge. |
42+
| JSON RPC | zkevm-rpc | An interface for interacting with the network. e.g., Metamask, Etherscan or Bridge. |
4343
| State DB | zkevm-state-db | A database for permanently storing state data (apart from the Merkle tree). |
44-
| Prover | zkevm-prover-server | Used by the Aggregator to create ZK proofs. Runs on an external cloud server. |
45-
| Pool DB | zkevm-pool-db | Stores txs from the RPC nodes, waiting to be put in a batch by the Sequencer. |
44+
| Prover | zkevm-prover-server | Used by the aggregator to create zk-proofs. Runs on an external cloud server. |
45+
| Pool DB | zkevm-pool-db | Stores txs from the RPC nodes, waiting to be put in a batch by the sequencer. |
4646
| Executor | zkevm-executor | Executes all processes. Collects results’ metadata (state root, receipts, logs) |
4747
| Etherman | zkevm-eth-tx-manager | Implements methods for all interactions with the L1 network and smart contracts. |
48-
| Bridge UI | zkevm-bridge-ui | User-Interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
49-
| Bridge DB | zkevm-bridge-db | A database for storing Bridge-related transactions data. |
50-
| Bridge service | zkevm-bridge-service | A backend service enabling clients like the web UI to interact with Bridge smart contracts. |
51-
| zkEVM explorer | zkevm-explorer-l2 | L2 network's Block explorer. i.e., The zkEVM Etherscan [Explorer](https://zkevm.polygonscan.com). |
52-
| zkEVM explorer DB | zkevm-explorer-l2-db | Database for the L2 network's Block explorer. i.e., Where all the zkEVM Etherscan Explorer queries are made. |
48+
| Bridge UI | zkevm-bridge-ui | User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
49+
| Bridge DB | zkevm-bridge-db | A database for storing bridge-related transactions data. |
50+
| Bridge service | zkevm-bridge-service | A backend service enabling clients like the web UI to interact with bridge smart contracts. |
51+
| zkEVM explorer | zkevm-explorer-l2 | L2 network's block explorer. i.e., The zkRollup Etherscan [rxplorer](https://zkevm.polygonscan.com). |
52+
| 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. |
5353
| Gas pricer | zkevm-l2gaspricer | Responsible for suggesting the gas price for the L2 network fees. |
5454
| Goërli execution | goerli-execution | L1 node's execution layer. |
5555
| Goërli consensus | goerli-consensus | L1 node's consensus layer. |
5656

57-
!!!info
58-
The **first step** of this deployment-guide begins here!
59-
60-
### Preliminary setup
57+
## Preliminary setup
6158

6259
Implementing the Polygon CDK zkRollup EVM-compatible network requires either a Linux machine or a virtual machine running Linux as a Guest OS.
6360

@@ -76,7 +73,7 @@ For other operating systems (MacOS, Windows), this is achieved in 4 steps, execu
7673

7774
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).
7875

79-
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.
76+
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.
8077

8178
!!!info
8279
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.
@@ -105,7 +102,7 @@ If the prover is the only container you will be running externally in a cloud, t
105102

106103
Depending on the user's resources, the zkEVM network can be implemented with either the actual full prover or the mock prover.
107104

108-
The full prover is resource-intensive as it utilizes the exact same proving stack employed in the real and live zkEVM network.
105+
The full prover is resource-intensive as it utilizes the exact same proving stack employed in the real and live CDK zkRollup network.
109106

110107
!!!info
111108
The full prover's system requirements are:
@@ -123,8 +120,8 @@ The mock prover is a dummy prover which simply adds a "Valid ✅" checkmark to e
123120

124121
As an example, the equivalent [AWS EC2s](https://aws.amazon.com/ec2/instance-types/r6a/) for each of these two provers are as follows:
125122

126-
- r6a.xlarge for mock prover.
127-
- r6a.24xlarge for full prover.
123+
- `r6a.xlarge` for mock prover.
124+
- `r6a.24xlarge` for full prover.
128125

129126
The initial free disk space requirement is minimal (<2TB), but you should monitor available space as the network is always adding more data.
130127

0 commit comments

Comments
 (0)