Skip to content

Commit a43098a

Browse files
authored
Merge branch 'main' into hosted/cdk-pp-docs-review-env
2 parents c9ffa8d + 9606598 commit a43098a

File tree

16 files changed

+505
-96
lines changed

16 files changed

+505
-96
lines changed

docs/agglayer/overview.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,22 @@ The AggLayer currently connects chains built with Polygon CDK, a developer toolk
1212
Here's a list of chains connected to the alpha version of the AggLayer:
1313

1414

15-
| Polygon IP Partner | Chain Partner | L2 Chain ID | Network Name |
15+
| Implementation Provider | Chain Name | L2 Chain ID |Network Name |
1616
| ------------------ | ------------- | ----------- | ----------------------- |
1717
| Startale Labs | Astar | 6038361 | zKyoto |
1818
| Startale Labs | Astar | 3776 | Astar zkEVM |
1919
| Gateway FM | GPT Protocol | 1511670449 | gpt-mainnet |
2020
| Gateway FM | Haust | 1570754601 | haust-testnet |
21-
| Gateway FM | Haust | 999 | haust-network |
21+
| Gateway FM | Haust | 938 | haust-network |
2222
| Gateway FM | Lumia | 1952959480 | Lumia Testnet |
2323
| Gateway FM | Lumia | 994873017 | prism |
2424
| Gateway FM | Moonveil | 1297206718 | moonveil-testnet |
25-
| OKX | OKX | 195 | X Layer Devnet |
2625
| OKX | OKX | 196 | X Layer |
2726
| Gateway FM | Silicon | 1722641160 | silicon-sepolia-testnet |
2827
| Gateway FM | Silicon | 2355 | silicon-zk |
29-
| Gateway FM | WilderWorld | 1668201165 | zchain-testnet |
30-
| Gateway FM | Wirex | 407985408 | wirex-pay-devnet |
28+
| Gateway FM | WilderWorld | 1668201165 | zchain-testnet |
3129
| Gateway FM | Wirex | 31415 | pay-chain |
30+
| Gateway FM | Witness | 1702448187 | witnesschain |
3231

3332
## AggLayer components
3433

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# CDK Chain (PP) High-Level Architecture
1+
The figure below depicts a simplified, high level view of the CDK PP chain architecture, as well as the flow of transactions through the system.
22

3-
The figure below depicts a simplified, high-level view of the CDK chain architecture using pessimistic proofs and the flow of transactions through the system.
3+
![Figure: CDK PP Architecture](../../img/cdk/CDK-pessimistic-proof-chain.jpg)
44

5-
![Figure: CDK Architecture](../../img/cdk/CDK-pessimistic-proof-chain.jpg)
5+
## Transaction flow
66

7-
## Transaction Flow
8-
9-
Here is a step-by-step flow of transactions starting from when users submit transactions up to when the transactions are settled in L1:
7+
Here is a step by step flow of transactions starting from when users submit transactions up to when the transactions are settled in L1.
108

119
1. A user connects to the chain via a CDK Erigon RPC node and submits a transaction.
1210
2. CDK Erigon RPC node sends the transaction data to the transaction-pool manager.
1311
3. The transaction-pool manager proxies all transaction data to the CDK Erigon sequencer.
14-
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches.
15-
5. Any CDK Erigon RPC node syncs transaction data from the CDK Erigon sequencer.
16-
6. AggSender gets batch data from the CDK Erigon sequencer, uses the data to generate certificates, and submits the certificates to the AggLayer RPC.
17-
7. The AggLayer RPC checks the validity of the certificates against the transaction data in the CDK Erigon RPC node.
18-
8. After validating the certificates, the AggLayer RPC sends a request to generate a proof, together with the necessary data (including the certificates), to the SP1 prover.
19-
9. Once the proof is received from the SP1 prover, the AggLayer RPC sends it to L1.
12+
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches.
13+
5. CDK Erigon sequencer syncs all transaction data with any CDK Erigon RPC node.
14+
6. AggSender gets batch data from the CDK Erigon sequencer, uses the data to generate certificates, and submits the certificates to the JSON-RPC API.
15+
7. The JSON-RPC API checks validity of the certificates against the transaction data in the CDK Erigon RPC node.
16+
8. After validating the certificates, the JSON-RPC API sends a request to generate a proof, together with the necessary data (including the certificates), to the SP1 prover.
17+
9. Once the proof is received from the SP1 prover, the JSON-RPC API sends it to L1.

docs/cdk/concepts/bridging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Chains that integrate with the unified bridge can benefit from the network effec
2626

2727
This option is suited to chains that want a standard bridging experience and do not require customization of the bridge's operation. The shared bridge is also not directly managed by the chain operator, instead, it shares the governance outlined in the [admin upgradeability](./admin-upgradeability.md) section.
2828

29-
![Unified bridge](../../img/cdk/unified-bridge.png)
29+
![unified bridge](https://github.com/0xPolygon/polygon-docs/blob/254d7d70a0596a1244122e006e62c4c34c9fbec4/docs/img/cdk/high-level-architecture/unified-bridge-rev.png)
3030

3131
## Further reading
3232

docs/cdk/getting-started/cli-tool.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Here, you need to provide the CDK node configuration file and the genesis file f
2323
Usage: `cdk <COMMAND>`
2424

2525
Commands:
26-
* `node` - Run the cdk-node with the provided configuration
27-
* `erigon` - Run cdk-erigon node with the provided default configuration
28-
* `versions` - Output the corresponding versions of the components
29-
* `help` Print this message or the help of the given subcommand(s)
26+
- `node` - Run the cdk-node with the provided configuration
27+
- `erigon` - Run cdk-erigon node with the provided default configuration
28+
- `versions` - Output the corresponding versions of the components
29+
- `help` Print this message or the help of the given subcommand(s)
3030

3131
Options:
32-
* `-h, --help` - Print help
32+
- `-h, --help` - Print help
3333

3434
### `cdk node`
3535

@@ -38,16 +38,23 @@ To run cdk-node use the `node` subcommand with one of the options mentioned belo
3838
Usage: `cdk node [OPTIONS]`
3939

4040
Options:
41-
* `-C, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
42-
* `-c, --components <COMPONENTS>` - Components to run [env: `CDK_COMPONENTS=`]
43-
* `-h, --help` - Print help
41+
- `-C, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
42+
- `-c, --components <COMPONENTS>` - Components to run [env: `CDK_COMPONENTS=`]
43+
- `-h, --help` - Print help
4444

45-
Example:
45+
Example to run in FEP mode:
4646

4747
```
4848
cdk node --config /etc/cdk/cdk-node-config.toml --components sequence-sender,aggregator
4949
```
5050

51+
Example to run in PP mode:
52+
53+
```
54+
cdk node --config /etc/cdk/cdk-node-config.toml --components rpc,aggsender
55+
```
56+
57+
5158
### `cdk erigon`
5259

5360
You can run a cdk-erigon RPC node that syncs to an existing chain using the default parameters.
@@ -57,9 +64,13 @@ This subcommand is intended for quickly spinning up an RPC node or testing exist
5764
Usage: `cdk erigon [OPTIONS]`
5865

5966
Options:
60-
* `-C, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
61-
* `-g, --chain <CHAIN>` - The path to a chain specification file [env: `CDK_GENESIS_PATH=`]
62-
* `-h, --help` - Print help
67+
- `-C, --config <CONFIG>` - The path to the cdk-node configuration file [env: `CDK_CONFIG_PATH=`]
68+
- `-g, --chain <CHAIN>` - The path to the genesis.json file [env: `CDK_GENESIS_PATH=`]
69+
- `-h, --help` - Print help
70+
71+
```
72+
cdk erigon --config /etc/cdk/cdk-node-config.toml --chain genesis.json
73+
```
6374

6475
```
6576
cdk erigon --config /etc/cdk/cdk-node-config.toml --chain genesis.json
@@ -74,7 +85,7 @@ To print the corresponding versions of the components, run the following command
7485
Usage: `cdk versions`
7586

7687
Options:
77-
* `-h, --help` - Print help
88+
- `-h, --help` - Print help
7889

7990
Example:
8091

docs/cdk/getting-started/local-deployment.md

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,23 @@ And, optionally, for submitting transactions and interacting with the environmen
3131
- [jq](https://stedolan.github.io/jq/)
3232
- [polyon-cli](https://github.com/0xPolygon/polygon-cli)
3333

34-
## Set up the Kurtosis environment
34+
## Quick setup
35+
36+
After installing the requirements you can launch a CDK chains with a oneliner:
37+
38+
### Pesimistic Proof
39+
40+
```
41+
kurtosis run --enclave cdk --args-file "https://raw.githubusercontent.com/0xPolygon/kurtosis-cdk/refs/heads/main/.github/tests/fork12-pessimistic.yml" github.com/0xPolygon/kurtosis-cdk
42+
```
43+
44+
### FEP
45+
46+
```
47+
kurtosis run --enclave cdk github.com/0xPolygon/kurtosis-cdk
48+
```
49+
50+
## Extended Kurtosis environment setup
3551

3652
### Understanding the deployment steps
3753

@@ -64,13 +80,13 @@ It defines the following steps for the deployment process:
6480

6581
You can customize (or skip) any of the numbered steps by modifying the logic in the respective files.
6682

67-
#### 2. [`params.yml`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/params.yml)
83+
#### 2. [`input_parser.star`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/input_parser.star)
6884

69-
The `params.yml` file defines the parameters of the chain and the deployment process.
85+
The `input_parser.star` file defines the default parameters of the chain and the deployment process.
7086

7187
It includes configurations for simple parameters such as the chain ID and more complex configurations such as the gas token smart contract address.
7288

73-
You can modify each of these parameters to customize the chain to your specific needs.
89+
To customize the chain to your specific needs you need to create a new configuration file in your desired path, for example: `./params.yml`
7490

7591
## Run the chain locally
7692

@@ -102,20 +118,35 @@ You can modify each of these parameters to customize the chain to your specific
102118
103119
```
104120

105-
The default deployment includes `cdk-erigon` as the sequencer, and `cdk-node` functioning as the sequence sender and aggregator.
121+
The default deployment it's a **Full Execution Proofs** setup that includes `cdk-erigon` as the sequencer, and `cdk-node` functioning as the sequence sender and aggregator.
106122
107123
You can verify the default versions of these components and the default fork ID by reviewing `input_parser.star`. You can check the default versions of the deployed components and the default fork ID by looking at `input_parser.star`.
108124
109125
3. Customize the chain
110126
111-
To make customizations to the CDK environment, clone this repo, make any desired configuration changes, and then run:
127+
To make customizations to the CDK environment create a kurtosis configuration file with your desired environment, for example:
128+
129+
### Configure a CDK Sovereign chain
130+
131+
```yaml
132+
args:
133+
consensus_contract_type: pessimistic
134+
sequencer_type: erigon
135+
erigon_strict_mode: false
136+
agglayer_prover_sp1_key: REDACTED
137+
enable_normalcy: true
138+
```
139+
140+
Save this config to `params.yml` file, and then run:
112141
113142
```sh
114143
# Delete all stop and clean all currently running enclaves
115144
kurtosis clean --all
116145
146+
147+
117148
# Run this command from the root of the repository to start the network
118-
kurtosis run --enclave cdk .
149+
kurtosis run --enclave cdk --args-file ./params.yml github.com/0xPolygon/kurtosis-cdk
119150
```
120151
121152
4. Inspect the chain

0 commit comments

Comments
 (0)