What are the Differences Between Deploying the CDK Validium & Polygon zkEVM
Introduction
Polygon CDK Validium is a unique scaling solution that builds upon the foundation of the zkEVM. While it inherits the core functionalities of the zkEVM, it introduces a distinct approach to data availability by incorporating the DAC. This guide will delve into the nuances of deploying both systems, highlighting the key differences.
Deployment Differences
zkEVM (Rollup) Deployment
- zkEVM Node: This node manages the Polygon zkEVM Network, processing transactions, maintaining state, and interacting with Ethereum.
- Components: JSON RPC, Pool DB, Sequencer, Etherman, Synchronizer, State DB, Aggregator, Prover.
- Repository Link
- zkEVM Contracts: These smart contracts facilitate zkEVM operations on Ethereum.
- Components:
PolygonZkEVM
(main rollup contract),PolygonZkEVMBridge
,PolygonZkEVMGlobalExitRoot
, and others. A full breakdown is available here. - Repository Link
- Components:
Validium Deployment
- Data Availability Layer: The primary distinction of the validium. It ensures off-chain data availability while only storing the hash of transaction data on L1.
- Components: zkEVM components + PostgreSQL database (with plans to transition to a key-value store in the near future.)
- Repository Link
- zkEVM Node with Validium Extensions: The node is extended to support the data availability layer.
- Validium-specific DAC Contract: One additional contract handles interactions with the DAC and data availability layer.
- Component(s):
CDKDataCommittee.sol
,CDKValidium.sol
- Repository Link
- Component(s):
Components
For quick reference, these components are outlined below.
Component | Description |
---|---|
CDK Validium Node | Node implementation for the CDK networks in Validium mode |
CDK Validium Contracts | Smart contracts implementation for the CDK networks in Validium mode |
CDK Data Availability | Data availability nodes implementation for the CDK networks |
Prover / Executor | zkEVM engine and prover implementation |
Bridge Service | Bridge service implementation for CDK networks |
Bridge UI | UI for the CDK networks bridge |
Summary of Key Differences
Feature / Aspect | zkEVM | Validium |
---|---|---|
Node Type | zkEVM Node | Validium Node |
Data Availability | On-chain | Off-chain via DACs + DA Node |
Components | zkEVM components** | zkEVM components** + PostgreSQL database + on-chain committees |
Additional Contracts | None | Validium-specific DAC contract |
Infrastructure Needs | Standard infrastructure | Dedicated infrastructure for data availability layer and DACs |
**JSON RPC, Pool DB, Sequencer, Etherman, Synchronizer, State DB, Aggregator, Prover
Transaction Flow in CDK Validium
Unlike zkEVM, where all transaction data is published on L1, Validium only publishes the hash of the transaction data. This hash, termed the Accumulated Input Hash, must be approved by a majority of the DAC members. The Sequencer sends both the hash and the transaction data to the DAC for verification. Once approved, the hash, along with the signatures from the DAC members, is sent to the Consensus L1 contract of the Validium protocol. After verification, the hash and the ZK-proof are added to the L1 State, forming the Consolidated State.
Deployment Steps
Deploying the CDK Validium involves a few key steps that are similar to setting up zkEVM, but with different configurations and additional components. The Validium deployment lives as its own source code with the added Data Availability (DA) layer and associated configurations.
By following the steps below, you'll successfully deploy a CDK Validium instance.
The CDK Validium is actively being developed, with ongoing feature enhancements and issue resolutions. For the latest updates, follow our official GitHub repositories.
We recommend starting with the Quickstart guide to gain a quick hands-on introduction to CDK Validium.
1. Deploy Validium-specific Contracts
First, deploy the Validium-specific smart contracts. The necessary steps can be found in the CDK Validium Contracts GitHub repository's README.
2. Run the CDK Validium Node
After, you'll need to set up and run the CDK Validium Node. Follow the instructions in the CDK Validium Node GitHub repository's README.
3. Run the Data Availability (DA) Node
Finally, the CDK Validium Node is operational, you'll need to set up and run the Data Availability Node. Instructions for this can be found in the CDK DA Node GitHub repository's README.