Skip to content

Commit 3b80c81

Browse files
authored
Merge pull request 0xPolygon#1781 from 0xPolygon/cdk-integrate-da-2
CDK: update integrate DA
2 parents 36e2bbe + c683c7a commit 3b80c81

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

docs/cdk/how-to/integrate-da.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ comments: true
44
---
55
-->
66

7-
This document shows you how to integrate a third-party data availability (DAC) solution into your CDK stack.
7+
This document shows you how to integrate a third-party data availability (DA) solution into your CDK stack.
88

99
## Prerequisites
1010

@@ -17,22 +17,23 @@ This section shows you how to create a custom CDK validium DAC contract.
1717

1818
1. Clone [zkevm-contracts](https://github.com/0xPolygonHermez/zkevm-contracts).
1919

20-
2. `cd` into `zkevm-contracts` and checkout tag `v6.0.0-rc.1-fork.9`.
20+
2. `cd` into `zkevm-contracts` and checkout tag [`v8.0.0-rc.3-fork.12`](https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v8.0.0-rc.3-fork.12).
2121

2222
3. Run `npm install` from the root.
2323

2424
4. `cd` to the `contracts/v2/consensus/validium` directory.
2525

2626
!!! tip
27-
- Until further notice, these contracts run on the [etrog release](https://polygon.technology/blog/polygon-zkevm-the-etrog-upgrade-is-live-on-mainnet).
27+
- Until further notice, these contracts run on the [banana release](https://github.com/0xPolygonHermez/zkevm-contracts/tree/feature/banana).
28+
29+
5. Create your custom contract in the same directory, and make sure it implements the [IDataAvailabilityProtocol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/interfaces/IDataAvailabilityProtocol.sol) interface.
2830

29-
5. Create your custom contract in the same directory, and make sure it implements the [IDataAvailabilityProtocol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/interfaces/IDataAvailabilityProtocol.sol) interface.
3031

3132
!!! tip
32-
- Use the Polygon DAC implementation contract: [PolygonDataCommittee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonDataCommittee.sol) as a guide.
33+
- Use the Polygon DAC implementation contract: [PolygonDataCommittee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonDataCommittee.sol) as a guide.
3334
- The contract supports custom smart contract implementation and, through this, DACs can add their custom on-chain verification logic.
3435

35-
6. You can leave the `verifyMessage` function empty but make sure the `getProcotolName` function returns a unique name (such as Avail, Celestia, etc). The following example code comes from the [PolygonDataCommitee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonDataCommittee.sol) implementation.
36+
6. You can leave the `verifyMessage` function empty but make sure the `getProcotolName` function returns a unique name (such as Avail, Celestia, etc). The following example code comes from the [PolygonDataCommitee.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonDataCommittee.sol) implementation.
3637

3738
```solidity
3839
// Name of the data availability protocol
@@ -58,7 +59,7 @@ This section shows you how to create a custom CDK validium DAC contract.
5859
5960
!!! info "`PolygonValidiumEtrog.sol` solution"
6061
61-
The [Etrog DAC integration contract](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) is still work-in-progress at the time of writing but there are some interesting things to note.
62+
The [Etrog DAC integration contract](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) is still work-in-progress at the time of writing but there are some interesting things to note.
6263
6364
1. It implements the function [`verifyMessage` function](https://github.com/0xPolygonHermez/zkevm-contracts/blob/54f58c8b64806429bc4d5c52248f29cf80ba401c/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol#L231):
6465
@@ -93,13 +94,13 @@ This section shows you how to create a custom CDK validium DAC contract.
9394
9495
This section shows you how to deploy the Docker image containing your custom DAC contract.
9596
96-
1. Edit the following parameters in the [`docker/scripts/v2/deploy_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/deploy_parameters_docker.json) file:
97+
1. Edit the following parameters in the [`docker/scripts/v2/deploy_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/deploy_parameters_docker.json) file:
9798
9899
```json
99100
"minDelayTimelock": 3600, // BECOMES "minDelayTimelock": 1,
100101
```
101102
102-
2. Edit the following parameters in the [`/docker/scripts/v2/create_rollup_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/create_rollup_parameters_docker.json) file:
103+
2. Edit the following parameters in the [`/docker/scripts/v2/create_rollup_parameters_docker.json`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/create_rollup_parameters_docker.json) file:
103104
104105
```json
105106
"consensusContract": "PolygonValidiumEtrog", // CHANGE THIS TO YOUR CONTRACT NAME
@@ -112,7 +113,7 @@ This section shows you how to deploy the Docker image containing your custom DAC
112113
cp docker/scripts/v2/hardhat.example.paris hardhat.config.ts
113114
```
114115
115-
4. Edit [docker/scripts/v2/deploy-docker.sh](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v6.0.0-rc.1-fork.9/docker/scripts/v2/deploy-docker.sh) to add the following line:
116+
4. Edit [docker/scripts/v2/deploy-docker.sh](https://github.com/0xPolygonHermez/zkevm-contracts/blob/v8.0.0-rc.3-fork.12/docker/scripts/v2/deploy-docker.sh) to add the following line:
116117
117118
```sh
118119
sudo chmod -R go+rxw docker/gethData before docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ nav:
7474
- Fork id 7 to 9: cdk/how-to/migrate/forkid-7-to-9.md
7575
- General guide for partners: cdk/how-to/migrate/fork.md
7676
- Create custom native token: cdk/how-to/use-native-token.md
77-
- Integrate a DAC: cdk/how-to/integrate-da.md
77+
- Integrate DA Layer: cdk/how-to/integrate-da.md
7878
- Manage allowlists with policies: cdk/how-to/manage-policies.md
7979
- Quickly test a running stack: cdk/how-to/quick-test-stack.md
8080
- Connect to CDK testnets: cdk/how-to/connect-testnet.md

0 commit comments

Comments
 (0)