Skip to content

Commit cb73642

Browse files
authored
Merge pull request 0xPolygon#2462 from 0xPolygon/cdk-pp-highlevel-architecture
DRAFT: CDK PP - High Level Architecture doc
2 parents ec3b0aa + b6e45b3 commit cb73642

File tree

4 files changed

+64
-3
lines changed

4 files changed

+64
-3
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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.
2+
3+
![Figure: CDK PP Architecture](../../img/cdk/cdk-pp-architecture-001.png)
4+
5+
## Transaction flow
6+
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.
8+
9+
1. A user connects to the chain via a CDK Erigon RPC node and submits a transaction.
10+
2. CDK Erigon RPC node sends the transaction data to the transaction-pool manager.
11+
3. The transaction-pool manager proxies all transaction data to the CDK Erigon sequencer.
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.
18+
19+
20+
21+
## Sequential diagram
22+
23+
The flow of data is depicted in the squential diagram below.
24+
25+
1. User submits a tx to the CDK Erigon RPC node.
26+
2. The CDK Erigon RPC node sends tx data to the tx-pool man.
27+
3. The tx-pool man proxies tx data to the CDK Erigon sequencer.
28+
4. CDK Erigon sequencer executes transactions.
29+
5. CDK Erigon sequencer syncs tx data with another CDK Erigon RPC node.
30+
6. AggSender gets batch data from the CDK Erigon sequencer.
31+
7. AggSender submits certificates to the JSON-RPC API.
32+
8. JSON-RPC API checks validity of the certificates.
33+
9. JSON-RPC API requests a proof from SP1 prover.
34+
10. SP1 prover sends back a proof.
35+
11. JSON-RPC API sends proof to L1.
36+
37+
38+
39+
```mermaid
40+
sequenceDiagram
41+
participant User
42+
participant ErigonRPC1 as RPC node 1
43+
participant tx-pool-man as tx-pool manager
44+
participant Sequencer as Sequencer node
45+
participant ErigonRPC2 as RPC node 2
46+
participant AggSender as AggSender
47+
participant API as JSON-RPC API
48+
participant SP1-prover as SP1 prover
49+
participant L1 as L1
50+
51+
User->>ErigonRPC1: submits tx
52+
ErigonRPC1->>tx-pool-man: sends tx data
53+
tx-pool-man->>Sequencer: proxies tx data
54+
Sequencer->>Sequencer: sequences transactions
55+
Sequencer->>ErigonRPC2: syncs data
56+
AggSender->>Sequencer: reads batch data
57+
AggSender->>API: sends certificates
58+
API->>ErigonRPC2: checks validity
59+
API->>SP1-prover: requests proof
60+
SP1-prover->>API: returns proof
61+
API->>L1: submits proof
62+
```

docs/cdk/architecture/high-level-views.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
## CDK full execution proof (FEP)
2-
31
The diagram below depicts a simplified architectural layout of the CDK FEP stack and indicates at a high level how components communicate.
42

53
![High level view of CDK stack](../../img/cdk/cdk-stack.svg)
2.2 MB
Loading

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ nav:
8888
- Quickly test a running stack: cdk/how-to/quick-test-stack.md
8989
- Connect to CDK testnets: cdk/how-to/connect-testnet.md
9090
- Architecture:
91-
- High level views: cdk/architecture/high-level-views.md
91+
- CDK FEP high level view: cdk/architecture/high-level-views.md
92+
- CDK PP high level view: cdk/architecture/cdk-pp-highlevel-arch.md
9293
- CDK rollup: cdk/architecture/cdk-zkevm.md
9394
- CDK validium: cdk/architecture/cdk-validium.md
9495
- Staking the Bridge (STB): cdk/architecture/staking-the-bridge.md

0 commit comments

Comments
 (0)