Skip to content

Commit c333ca7

Browse files
Merge pull request 0xPolygon#1563 from 0xPolygon/cdk/high-level
DRAFT: CDK: High level architecture
2 parents 574aaf2 + 5009e78 commit c333ca7

File tree

4 files changed

+139
-0
lines changed

4 files changed

+139
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## CDK full execution proof (FEP)
2+
3+
The diagram below depicts a simplified architectural layout of the CDK FEP stack and indicates at a high level how components communicate.
4+
5+
![High level view of CDK stack](../../img/cdk/cdk-stack.svg)
6+
7+
### Component interactions
8+
9+
- The CLI tool is the starting point. Developers, or chain administrators in particular, can use the CLI tool to build and configure chains in various modes of operation, such as validiums and rollups.
10+
- Once a chain is configured with the CLI, users can submit transactions through the CDK Erigon RPC node. These transactions are relayed to the `tx-pool manager` before the sequencer selects and executes them.
11+
- The sequencer sequences transactions batches and synchronizes data with the RPC node.
12+
- The sequencer sender reads batch data from the RPC node.
13+
- The aggregator reads batch data from the sequencer data stream.
14+
- The sequencer sender persists data into the L1 smart contract domain for rollup mode and into DAC nodes for validium mode operations.
15+
- The aggregator sends batches to the prover and receives proofs in return. Together with the prover, it aggregates the proofs into batches before submitting the final proofs to the AggLayer or L1, depending on the chosen settlement layer.
16+
- Users interact with the bridge service via the bridge UI or API.
17+
- The AggLayer verifies proofs and interacts with the L1 smart contracts.
18+
19+
### User data flow
20+
21+
The following diagram is a sequential depiction of the user data flow for the CDK FEP stack in validium mode using a mock prover and having an AggLayer connection.
22+
23+
![High level view of CDK user data flow](../../img/cdk/cdk-user-data-flow.svg)
24+
25+
#### Sequential interactions
26+
27+
1. User sends a transaction to the CDK Erigon RPC node.
28+
2. The CDK Erigon RPC node proxies the data to the CDK Erigon sequencer node and syncs the batch data between the sequencer and the RPC nodes.
29+
3. The sequencer sequences the transaction batches.
30+
4. The sequencer sender reads batches from the RPC node.
31+
5. In validium mode only, the sequencer sender persists transaction data into the DAC nodes.
32+
6. The sequencer sender sequences the batches into the L1 smart contracts.
33+
7. The aggregator reads batches from the sequencer data stream.
34+
8. The aggregator sends batches to the provers.
35+
9. The aggregator submits the final proof to the AggLayer.
36+
10. The AggLayer submits the final proof to the L1 smart contract domain.
37+
38+
```mermaid
39+
sequenceDiagram
40+
participant User
41+
participant ErigonRPC as CDK Erigon RPC Node
42+
participant Sequencer as CDK Erigon Sequencer Node
43+
participant SeqSender as Sequence Sender
44+
participant Aggregator
45+
participant AggLayer
46+
participant DACNodes as DAC Nodes
47+
participant Prover
48+
participant L1 as L1 Smart Contracts
49+
50+
User->>ErigonRPC: Send transaction
51+
ErigonRPC->>Sequencer: Proxy and sync transaction data
52+
Sequencer->>Sequencer: Sequence transaction batches
53+
SeqSender->>ErigonRPC: Reads batches
54+
SeqSender->>DACNodes: Persist transaction data (validium mode only)
55+
SeqSender->>L1: Sequence batches into L1 Smart Contracts
56+
Aggregator->>Prover: Send batches to Prover
57+
Prover->>Aggregator: Return proofs
58+
Aggregator->>Aggregator: Aggregate the proofs
59+
Aggregator->>AggLayer: Submit final proof
60+
AggLayer->>L1: Submit final proof to L1 Smart Contract Domain
61+
```
62+
63+
!!! tip
64+
Detailed AggLayer flows will be published soon.

0 commit comments

Comments
 (0)