Skip to content

Commit 5cb5403

Browse files
authored
Merge pull request 0xPolygon#42 from 0xPolygon/km/cdk_finalizing
CDK updates after Gabriel review
2 parents 412e9e7 + 7758e42 commit 5cb5403

File tree

9 files changed

+32
-21
lines changed

9 files changed

+32
-21
lines changed

docs/cdk/concepts/dac.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@ If data is available on-chain, then each node has to store every piece of data r
55
!!! info "Recommended resource"
66
See Ethereum.org's discussion on [data availability](https://ethereum.org/en/developers/docs/data-availability/).
77

8-
## What is a validium?
9-
10-
Validiums are blockchain solutions that do not store transaction data.
11-
12-
!!! info "Recommended resource"
13-
See Ethereum.org's glossary [definition of validiums](https://ethereum.org/en/developers/docs/scaling/validium/).
14-
15-
## What is a DAC?
8+
## Data availability committees
169

1710
Polygon's CDK validium has an optional data availability committee (DAC).
1811

docs/cdk/concepts/rollup.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Rollups are blockchain layer 2 scaling solutions that speed up the network by *rolling up* multiple transactions into batches which are eventually committed to the layer 1.
2+
3+
CDK provides zkEVM rollup solutions.
4+
5+
!!! info "Recommended resource"
6+
See Ethereum.org's detailed [description of zero-knowledge rollups](https://ethereum.org/en/developers/docs/scaling/zk-rollups/).

docs/cdk/concepts/validium.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Validiums are blockchain scaling solutions that do not store transaction data.
2+
3+
!!! info "Recommended resource"
4+
See Ethereum.org's detailed [description of validiums](https://ethereum.org/en/developers/docs/scaling/validium/).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Follow the instructions in the [CDK validium node repository's README](https://g
2020

2121
Finally, once the CDK validium node is operational, set up and run the data availability node.
2222

23-
Check for instructions here: [<ins>CDK DA Node GitHub repository's README</ins>](https://github.com/0xPolygon/cdk-data-availability).
23+
Check for instructions here: [<ins>CDK DA Node GitHub running instructions</ins>](https://github.com/0xPolygon/cdk-data-availability/blob/main/docs/running.md).

docs/cdk/get-started/overview.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
Polygon's Chain Development Kit (CDK) is a modular, open source software tool for blockchain developers which supports installation and configuration of a variety of chain architectures.
1+
Polygons Chain Development Kit (CDK) is a modular, open source software toolkit for blockchain developers which supports installation and configuration of a variety of chain architectures.
22

3-
!!! important
4-
At the time of writing, CDK offers rollup and validium configurations.
3+
This section documents the two most popular deployments currently supported by CDK:
4+
5+
- Validium
6+
- Rollup
7+
8+
Users select a chain architecture specific to their needs from a set of supported, open source options. Alternatively, users can select custom components for specific requirements.
59

6-
CDK users choose a chain architecture specific to their needs and use cases.
10+
The diagram below shows the two supported configuration options for data availability (DA), rollup or validium. Rollups post transaction data from the CDK directly onto Ethereum whereas validiums only post the transaction hash.
711

8-
<center>
9-
![CDK flavors](../../img/cdk/cdk-modes.png)
10-
</center>
12+
![CDK architecture choices](../../img/cdk/cdk-architecture.png)
13+
14+
Check out the [data availability docs](../concepts/dac.md) for more information.
15+
16+
!!! important
17+
The documentation describes standard deployments. You can edit the configuration files to implement your own custom set ups.
1118

1219
!!! info
1320
For the latest updates, follow our official GitHub repositories.

docs/cdk/specification/validium-vs-rollup.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ Polygon CDK running in validium mode inherits the core functionalities of a zkEV
77
| | Rollup | Validium |
88
| ------------------------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
99
| **Node type** | [zkEVM node](https://github.com/0xPolygonHermez/zkevm-node) | [Validium node](https://github.com/0xPolygon/cdk-validium-node): zkEVM node with validium extensions |
10-
| **Data availability** | On-chain | Off-chain via DACs + [DA node](https://github.com/0xPolygon/cdk-data-availability) |
10+
| **Data availability** | On-chain via L1 | Off-chain via a local option, or a [DAC](../concepts/dac.md) + [DA node](https://github.com/0xPolygon/cdk-data-availability) |
1111
| **Components** | zkEVM components\* | zkEVM components\* + PostgreSQL database + on-chain committees |
1212
| **Contracts** | [zkEVM smart contracts](https://github.com/0xPolygonHermez/zkevm-contracts) <ul><li>`PolygonZkEVM` (main rollup contract)</li> <li> `PolygonZkEVMBridge`</li> <li>`PolygonZkEVMGlobalExitRoot`</li></ul> | [Validium-specific DAC contract](https://github.com/0xPolygon/cdk-validium-contracts) <ul><li>`CDKDataCommittee.sol`</li><li> `CDKValidium.sol` </li></ul> |
1313
| **Infrastructure** | Standard infrastructure | Dedicated infrastructure for data availability layer and DACs |
14-
| **Tx flow** | All transaction data is published on L1 | Validium only publishes the hash of the transaction data. This `Accumulated Input Hash` must be approved by a majority of DAC members. <br/><br/>The sequencer sends both the hash and the transaction data to the DAC for verification. Once approved, the hash plus signatures, is sent to the Consensus L1 contract of the validium protocol. <br/><br/> After verification, the hash and the zk-proof are added to the L1 state.
15-
| **Security** | High security due to on-chain data availability and zero-knowledge proofs. |Off-chain data availability can affect security if DAC members collude to withhold state data. However, security still good due to zero-knowledge proofs. |
14+
| **Tx flow** | All transaction data is published on L1 | Validium only publishes the hash of the transaction data to L1. The sequencer sends both the hash and the transaction data to the DAC for verification. Once approved, the hash+signatures are sent to the Consensus L1 contract of the validium protocol.
15+
| **Security** | High security due to on-chain data availability and zero-knowledge proofs. |Off-chain data availability can affect security if the sequencer goes offline or if DAC members collude to withhold state data. |
1616
| **Gas fees** | High, because all transaction data is stored on Ethereum. | Low, because only the hash of the transaction data is stored on Ethereum. |
1717
| **Proof generation** | Uses Prover to generate proofs of batched transactions for validation. | Uses Prover to generate proofs of batched transactions for validation. |
18-
| **Transaction validation** | Done with smart contracts on Ethereum. | Involves an additional layer where DAC members sign the hash of the transaction data. |
1918
| **Final settlement** | Transaction batches and their corresponding proofs are added to the Ethereum state. | The hash of transaction data and its proof are added to the Ethereum state, referred to as the consolidated state. |
2019

2120
<sub><sup>*</sup>JSON RPC, Pool DB, Sequencer, Etherman, Synchronizer, State DB, Aggregator, Prover</sub>

docs/img/cdk/cdk-architecture.png

272 KB
Loading

docs/img/cdk/cdk-modes.png

-16.6 KB
Binary file not shown.

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
site_name: Polygon knowledge layer
22
site_author: Polygon Labs
33
copyright: Copyright &copy; 2023 Polygon Labs
4-
repo_name: Polygon Knowledge Layer
4+
repo_name: Polygon knowledge layer
55
repo_url: https://github.com/0xPolygon/polygon-docs
66
edit_uri: edit/main/docs/
77
#remote_branch: gh-pages
@@ -67,6 +67,8 @@ nav:
6767
- Specification:
6868
- Validium vs rollup: cdk/specification/validium-vs-rollup.md
6969
- Concepts:
70+
- Rollup: cdk/concepts/rollup.md
71+
- Validium: cdk/concepts/validium.md
7072
- Data availability: cdk/concepts/dac.md
7173
# - API:
7274
- Troubleshooting:

0 commit comments

Comments
 (0)