Skip to content

Commit 98b4573

Browse files
authored
Update cdk-pp-highlevel-arch.md
1 parent 89dd66f commit 98b4573

File tree

1 file changed

+11
-54
lines changed

1 file changed

+11
-54
lines changed
Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,19 @@
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.
1+
# CDK Chain (PP) High-Level Architecture
22

3-
![Figure: CDK PP Architecture](../../img/cdk/cdk-pp-architecture-001.png)
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.
44

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

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.
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:
810

911
1. A user connects to the chain via a CDK Erigon RPC node and submits a transaction.
1012
2. CDK Erigon RPC node sends the transaction data to the transaction-pool manager.
1113
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
13-
5. CDK Erigon sequencer syncs all transaction data with any CDK Erigon RPC node.
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.
1416
6. AggSender gets batch data from the CDK Erigon sequencer, uses the data to generate certificates, and submits the certificates to the AggLayer RPC.
15-
7. The AggLayer RPC checks validity of the certificate by asserting that the balances of the bridge interactions are consistent with the liquidity of the chain
16-
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.
17-
9. Once the proof is received from the SP1 prover, the AggLayer RPC 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-
```
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.

0 commit comments

Comments
 (0)