-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ci/composite-actions
- Loading branch information
Showing
20 changed files
with
352 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Data Availability Modes in Kurtosis CDK | ||
|
||
Kurtosis CDK supports two modes of data availability for deploying blockchain solutions: `rollup` and `cdk-validium`. The choice between these modes depends on your specific requirements for data availability and security. In the future, we would like to support external DA protocols such as Avail, Celestia and Near. | ||
|
||
The two options are: | ||
|
||
- `rollup`: Transaction data is stored on-chain on Layer 1 (L1). This approach leverages the security of the main L1 chain (e.g. Ethereum) to ensure data integrity and availability. | ||
|
||
> In this mode, the components will run the `zkevm_node_image` and the consensus contract will be `PolygonZkEVMEtrog`. | ||
- `cdk-validium`: Transaction data is stored off-chain using a dedicated CDK Data Availability (DA) layer and a Data Availability Committee (DAC). This approach reduces the load on the main chain and can offer improved scalability and lower costs. | ||
|
||
> In this mode, the components will run the `cdk_node_image`, the consensus contract will be `PolygonValidiumEtrog` and the CDK DAC will be deployed and configured. | ||
For more detailed information and technical specifications, refer to the [Polygon Knowledge Layer](https://docs.polygon.technology/cdk/spec/validium-vs-rollup/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# The types of data availability (DA) modes supported in Kurtosis CDK. | ||
# In the future, we would like to support external DA protocols such as Avail, Celestia and Near. | ||
DATA_AVAILABILITY_MODES = struct( | ||
# In rollup mode, transaction data is stored on-chain on L1. | ||
rollup="rollup", | ||
# In cdk-validium mode, transaction data is stored off-chain using the CDK DA layer and a DAC. | ||
cdk_validium="cdk-validium", | ||
) | ||
|
||
# Map data availability modes to consensus contracts. | ||
CONSENSUS_CONTRACTS = { | ||
DATA_AVAILABILITY_MODES.rollup: "PolygonZkEVMEtrog", | ||
DATA_AVAILABILITY_MODES.cdk_validium: "PolygonValidiumEtrog", | ||
} | ||
|
||
|
||
def get_node_image(args): | ||
# Map data availability modes to node images. | ||
node_images = { | ||
DATA_AVAILABILITY_MODES.rollup: args["zkevm_node_image"], | ||
DATA_AVAILABILITY_MODES.cdk_validium: args["cdk_node_image"], | ||
} | ||
return node_images.get(args["data_availability_mode"]) | ||
|
||
|
||
def get_consensus_contract(args): | ||
return CONSENSUS_CONTRACTS.get(args["data_availability_mode"]) | ||
|
||
|
||
def is_cdk_validium(args): | ||
return args["data_availability_mode"] == DATA_AVAILABILITY_MODES.cdk_validium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.