Skip to content

Commit cdbdbbe

Browse files
commit new pages
1 parent 6eb7987 commit cdbdbbe

File tree

6 files changed

+126
-101
lines changed

6 files changed

+126
-101
lines changed

docs/cdk/get-started/deploy-validium/deploy-contracts.md

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22

33
1. `cd` to the `deployment/` directory and create a new `deploy_parameters.json` by copying the example
44

5-
```bash
6-
cd /cdk-validium/cdk-validium-contracts-0.0.2/deployment
7-
cp deploy_parameters.json.example deploy_parameters.json
8-
```
9-
10-
!!! info "Parameters that need to be updated in `deploy_parameters.json`"
11-
- `trustedSequencer`
12-
- `trustedAggregator`
13-
- `admin`
14-
- `cdkValidiumOwner`
15-
- `initialCDKValidiumDeployerOwner`
16-
- `trustedSequencerURL`
17-
- `forkID`
5+
```bash
6+
cd /cdk-validium/cdk-validium-contracts-0.0.2/deployment
7+
cp deploy_parameters.json.example deploy_parameters.json
8+
```
9+
10+
!!! info "Parameters updates at step 3 in `deploy_parameters.json`"
11+
- `trustedSequencer`
12+
- `trustedAggregator`
13+
- `admin`
14+
- `cdkValidiumOwner`
15+
- `initialCDKValidiumDeployerOwner`
16+
- `trustedSequencerURL`
17+
- `forkID`
1818

1919
2. Run the following `jq` script to streamline the process of replacing these fields:
2020

21-
```bash
22-
source /tmp/cdk/.env
23-
jq --arg TEST_ADDRESS "$TEST_ADDRESS" '.trustedSequencerURL = "http://127.0.0.1:8123" | .trustedSequencer = $TEST_ADDRESS | .trustedAggregator = $TEST_ADDRESS | .admin = $TEST_ADDRESS | .cdkValidiumOwner = $TEST_ADDRESS | .initialCDKValidiumDeployerOwner = $TEST_ADDRESS | .timelockAddress = $TEST_ADDRESS | .forkID = 6' ./deploy_parameters.json.example > ./deploy_parameters.json
24-
```
21+
```bash
22+
source /tmp/cdk/.env
23+
jq --arg TEST_ADDRESS "$TEST_ADDRESS" '.trustedSequencerURL = "http://127.0.0.1:8123" | .trustedSequencer = $TEST_ADDRESS | .trustedAggregator = $TEST_ADDRESS | .admin = $TEST_ADDRESS | .cdkValidiumOwner = $TEST_ADDRESS | .initialCDKValidiumDeployerOwner = $TEST_ADDRESS | .timelockAddress = $TEST_ADDRESS | .forkID = 6' ./deploy_parameters.json.example > ./deploy_parameters.json
24+
```
2525

2626
3. The complete `deploy_parameters.json` should look something like this:
2727

28-
```bash
29-
cat ~/cdk-validium/cdk-validium-contracts-0.0.2/deployment/deploy_parameters.json
30-
# ~/cdk-validium/cdk-validium-contracts-0.0.2/deployment/deploy_parameters.json
31-
{
32-
"realVerifier": false,
33-
"trustedSequencerURL": "http://127.0.0.1:8123,
34-
"networkName": "cdk-validium",
35-
"version":"0.0.1",
36-
"trustedSequencer":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
37-
"chainID": 1001,
38-
"trustedAggregator":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
39-
"trustedAggregatorTimeout": 604799,
40-
"pendingStateTimeout": 604799,
41-
"forkID": 6,
42-
"admin":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
43-
"cdkValidiumOwner": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
44-
"timelockAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
45-
"minDelayTimelock": 3600,
46-
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
47-
"initialCDKValidiumDeployerOwner" :"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
48-
"maticTokenAddress":"0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
49-
"cdkValidiumDeployerAddress":"",
50-
"deployerPvtKey": "",
51-
"maxFeePerGas":"",
52-
"maxPriorityFeePerGas":"",
53-
"multiplierGas": "",
54-
"setupEmptyCommittee": true,
55-
"committeeTimelock": false
56-
}
57-
```
58-
59-
## Deploy and verify contracts
28+
```bash
29+
cat ~/cdk-validium/cdk-validium-contracts-0.0.2/deployment/deploy_parameters.json
30+
# ~/cdk-validium/cdk-validium-contracts-0.0.2/deployment/deploy_parameters.json
31+
{
32+
"realVerifier": false,
33+
"trustedSequencerURL": "http://127.0.0.1:8123,
34+
"networkName": "cdk-validium",
35+
"version":"0.0.1",
36+
"trustedSequencer":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
37+
"chainID": 1001,
38+
"trustedAggregator":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
39+
"trustedAggregatorTimeout": 604799,
40+
"pendingStateTimeout": 604799,
41+
"forkID": 6,
42+
"admin":"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
43+
"cdkValidiumOwner": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
44+
"timelockAddress": "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
45+
"minDelayTimelock": 3600,
46+
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
47+
"initialCDKValidiumDeployerOwner" :"0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
48+
"maticTokenAddress":"0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
49+
"cdkValidiumDeployerAddress":"",
50+
"deployerPvtKey": "",
51+
"maxFeePerGas":"",
52+
"maxPriorityFeePerGas":"",
53+
"multiplierGas": "",
54+
"setupEmptyCommittee": true,
55+
"committeeTimelock": false
56+
}
57+
```
58+
59+
## Deploy contracts
6060
6161
### `CDKValidiumDeployer`
6262
@@ -66,80 +66,80 @@ The address of the contracts it creates depends on the salt and the `initialCDKV
6666
6767
1. Run the deploy script.
6868
69-
```bash
70-
npm run deploy:deployer:CDKValidium:sepolia
71-
```
69+
```bash
70+
npm run deploy:deployer:CDKValidium:sepolia
71+
```
7272
73-
You should see something similar to this:
73+
You should see something similar to this:
7474
75-
```bash
76-
cdkValidiumDeployer deployed on: 0x87572242776ccb6c98F4Cf1ff20f7e5a4e4142fF
77-
```
75+
```bash
76+
cdkValidiumDeployer deployed on: 0x87572242776ccb6c98F4Cf1ff20f7e5a4e4142fF
77+
```
7878
7979
2. Now we can deploy the rest of the contract suite.
8080
81-
```bash
82-
npm run deploy:testnet:CDKValidium:sepolia
83-
```
81+
```bash
82+
npm run deploy:testnet:CDKValidium:sepolia
83+
```
8484
85-
!!! info
86-
This may take several minutes depending on network conditions.
85+
!!! info
86+
This may take several minutes depending on network conditions.
8787
8888
3. On successful deployment, you should see a new directory named `deployments` containing a directory storing the information about your deployment. For example:
8989
90-
```bash
91-
# ~/cdk-validium/cdk-validium-contracts-0.0.2/deployments/sepolia_1705429054/deploy_output.json
92-
{
93-
"cdkValidiumAddress": "0x37eEBCa90363b0952e03a64979B64AAE3b8C9631",
94-
"polygonZkEVMBridgeAddress": "0x3485bfA6F27e54a8FF9782032fdbC7C555c178E4",
95-
"polygonZkEVMGlobalExitRootAddress": "0x8330E90c82F4BDDfa038041B898DE2d900e6246C",
96-
"cdkDataCommitteeContract": "0xb49d901748c3E278a634c05E0c500b23db992fb0",
97-
"maticTokenAddress": "0x20db28Bb7C779a06E4081e55808cc5DE35cca303",
98-
"verifierAddress": "0xb01Be1534d1eF82Ba98DCd5B33A3A331B6d119D0",
99-
"cdkValidiumDeployerContract": "0x87572242776ccb6c98F4Cf1ff20f7e5a4e4142fF",
100-
"deployerAddress": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
101-
"timelockContractAddress": "0xDa476BD0B6A660cd08239dEb620F701877688c6F",
102-
"deploymentBlockNumber": 5097689,
103-
"genesisRoot": "0xf07cd7c4f7df7092241ccb2072d9ac9e800a87513df628245657950b3af78f94",
104-
"trustedSequencer": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
105-
"trustedSequencerURL": "http://127.0.0.1:8123",
106-
"chainID": 1001,
107-
"networkName": "cdk-validium",
108-
"admin": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
109-
"trustedAggregator": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
110-
"proxyAdminAddress": "0x828E55268524c13dB25FD33f2Be45D2771f1EeA4",
111-
"forkID": 6,
112-
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
113-
"version": "0.0.1"
114-
}
115-
```
90+
```bash
91+
# ~/cdk-validium/cdk-validium-contracts-0.0.2/deployments/sepolia_1705429054/deploy_output.json
92+
{
93+
"cdkValidiumAddress": "0x37eEBCa90363b0952e03a64979B64AAE3b8C9631",
94+
"polygonZkEVMBridgeAddress": "0x3485bfA6F27e54a8FF9782032fdbC7C555c178E4",
95+
"polygonZkEVMGlobalExitRootAddress": "0x8330E90c82F4BDDfa038041B898DE2d900e6246C",
96+
"cdkDataCommitteeContract": "0xb49d901748c3E278a634c05E0c500b23db992fb0",
97+
"maticTokenAddress": "0x20db28Bb7C779a06E4081e55808cc5DE35cca303",
98+
"verifierAddress": "0xb01Be1534d1eF82Ba98DCd5B33A3A331B6d119D0",
99+
"cdkValidiumDeployerContract": "0x87572242776ccb6c98F4Cf1ff20f7e5a4e4142fF",
100+
"deployerAddress": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
101+
"timelockContractAddress": "0xDa476BD0B6A660cd08239dEb620F701877688c6F",
102+
"deploymentBlockNumber": 5097689,
103+
"genesisRoot": "0xf07cd7c4f7df7092241ccb2072d9ac9e800a87513df628245657950b3af78f94",
104+
"trustedSequencer": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
105+
"trustedSequencerURL": "http://127.0.0.1:8123",
106+
"chainID": 1001,
107+
"networkName": "cdk-validium",
108+
"admin": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
109+
"trustedAggregator": "0x8Ea797e7f349dA91078B1d833C534D2c392BB7FE",
110+
"proxyAdminAddress": "0x828E55268524c13dB25FD33f2Be45D2771f1EeA4",
111+
"forkID": 6,
112+
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
113+
"version": "0.0.1"
114+
}
115+
```
116116
117117
4. In the `~/cdk-validium/cdk-validium-contracts-0.0.2/deployment/` folder, you should also see a `genesis.json` file.
118118
119-
!!! info
120-
We use the info in `genesis.json` and `deploy_output.json` to configure the `cdk-validium-node` node.
119+
!!! info
120+
We use the info in `genesis.json` and `deploy_output.json` to configure the `cdk-validium-node` node.
121121
122-
!!! warning "Deployment failure"
123-
- Since there are deterministic addresses, you cannot deploy twice on the same network using the same `salt` and `initialCDKValidiumDeployerOwner` inside `deploy_parameters.json`. Changing one of them is enough to make a new deployment.
124-
- It's mandatory to delete the `~/cdk-validium/cdk-validium-contracts-0.0.2/.openzeppelin` upgradability information in order to make a new deployment.
122+
!!! warning "Deployment failure"
123+
- Since there are deterministic addresses, you cannot deploy twice on the same network using the same `salt` and `initialCDKValidiumDeployerOwner` inside `deploy_parameters.json`. Changing one of them is enough to make a new deployment.
124+
- It's mandatory to delete the `~/cdk-validium/cdk-validium-contracts-0.0.2/.openzeppelin` upgradability information in order to make a new deployment.
125125
126-
## Verifying contracts
126+
## Verify contracts
127127
128128
When deploying to Sepolia, the contracts should automatically verify based on other live deployments on the network with similar bytecode. If the contracts have not been verified on Etherscan, run the following commands from the `/cdk-validium/cdk-validium-contracts-0.0.2/deployment` directory.
129129
130130
1. To verify the contract factory:
131131
132-
```bash
133-
npm run verify:deployer:CDKValidium:sepolia
134-
```
132+
```bash
133+
npm run verify:deployer:CDKValidium:sepolia
134+
```
135135
136136
2. To verify the rest of the contract suite:
137137
138-
```bash
139-
npm run verify:CDKValidium:sepolia
140-
```
138+
```bash
139+
npm run verify:CDKValidium:sepolia
140+
```
141141
142-
## Using a different node provider
142+
## Use a different node provider
143143
144144
Modify the contents of `~/cdk-validium/cdk-validium-contracts-0.0.2/hardhat.config.js` and `cdk-validium-contracts-0.0.2/.env` if you prefer to use a different node provider than Infura.
145145

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

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Deploying the full stack Polygon CDK validium EVM-compatible network requires installing and deploying a number of different components.
2+
3+
| Component | Container | Description |
4+
| :---------------- | :------------------- | ------------------------------------------------------------ |
5+
| Sequencer | `zkevm-sequencer` | Fetches txs from the pool DB, checks if valid, then puts valid ones into a batch. |
6+
| Aggregator | `zkevm-aggregator` | Validates sequenced batches by generating verifiable zero-knowledge proofs. |
7+
| Synchronizer | `zkevm-sync` | Updates the state by fetching data from Ethereum through the Etherman. |
8+
| JSON RPC | `zkevm-rpc` | An interface for interacting with the network. e.g., Metamask, Etherscan or Bridge. |
9+
| State DB | `zkevm-state-db` | A database for permanently storing state data (apart from the Merkle tree). |
10+
| Prover | `zkevm-prover-server` | Used by the aggregator to create zk-proofs. The full prover is extremely resource-heavy and runs on an external cloud server. Use the mock prover for evaluation/test purposes. |
11+
| Pool DB | `zkevm-pool-db` | Stores txs from the RPC nodes, waiting to be put in a batch by the sequencer. |
12+
| Executor | `zkevm-executor` | Executes all processes. Collects results’ metadata (state root, receipts, logs) |
13+
| Etherman | `zkevm-eth-tx-manager` | Implements methods for all interactions with the L1 network and smart contracts. |
14+
| Bridge UI | `zkevm-bridge-ui` | User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
15+
| Bridge DB | `zkevm-bridge-db` | A database for storing bridge-related transactions data. |
16+
| Bridge service | `zkevm-bridge-service` | A backend service enabling clients like the web UI to interact with bridge smart contracts. |
17+
| zkEVM explorer | `zkevm-explorer-l2` | L2 network's block explorer. i.e., The zkRollup Etherscan [explorer](https://zkevm.polygonscan.com). |
18+
| 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. |
19+
| Gas pricer | `zkevm-l2gaspricer` | Responsible for suggesting the gas price for the L2 network fees. |
20+
| Goërli execution | `goerli-execution` | L1 node's execution layer. |
21+
| Goërli consensus | `goerli-consensus` | L1 node's consensus layer.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ The process is split into the following sections:
1212

1313
3. [Deploy wallets](deploy-contracts.md): Create wallets and deploy contracts.
1414

15-
4. [Deploy node](): Deploy the zkRollup EVM-compatible node.
15+
4. [Deploy node](deploy-node.md): Deploy the zkRollup EVM-compatible node.

docs/cdk/get-started/deploy-validium/set-up.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ npm install
4646
ETHERSCAN_API_KEY="<ETHERSCAN_API_KEY>" # Generate an API key on [Etherscan](https://etherscan.io)
4747
```
4848

49+
!!! info
50+
Check our documentation if you want to [use a different node provider](deploy-contracts.md#use-a-different-node-provider).
51+
4952
3. Generate a new mnemonic using `cast`.
5053

5154
```bash

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ nav:
5050
- Validium:
5151
- Introduction: cdk/get-started/deploy-validium/intro.md
5252
- Prerequisites: cdk/get-started/deploy-validium/prerequisites.md
53+
- Environment overview: cdk/get-started/deploy-validium/environment-overview.md
5354
- Set up: cdk/get-started/deploy-validium/set-up.md
5455
- Deploy contracts: cdk/get-started/deploy-validium/deploy-contracts.md
5556
- Rollup:

0 commit comments

Comments
 (0)