Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: CDK: High level architecture #1563

Merged
merged 32 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1dda997
add docs for high level views
kmurphypolygon Oct 1, 2024
25985de
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 2, 2024
f148353
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 4, 2024
a87a31b
update the doc afta review
kmurphypolygon Oct 4, 2024
1d8817a
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 8, 2024
e0e0add
first updates after review
kmurphypolygon Oct 9, 2024
1a6a364
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 9, 2024
583480a
updates after review
kmurphypolygon Oct 9, 2024
9dfe7ee
update img and sequence diagram
kmurphypolygon Oct 10, 2024
97cd0d2
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 11, 2024
5596b61
update main pic formating
kmurphypolygon Oct 11, 2024
3feacb3
make pic smaller
kmurphypolygon Oct 11, 2024
2090e76
update pic
kmurphypolygon Oct 11, 2024
df1f855
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 11, 2024
c5b08c5
Merge branch 'cdk/high-level' of https://github.com/0xPolygon/polygon…
kmurphypolygon Oct 11, 2024
6a36ec3
adjust diagram
kmurphypolygon Oct 11, 2024
be978f7
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 11, 2024
9bed447
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 11, 2024
b3b191e
updates to pic after huddle
kmurphypolygon Oct 11, 2024
c82253c
fix conflict
kmurphypolygon Oct 11, 2024
5b06774
update pic and words
kmurphypolygon Oct 11, 2024
025466f
updates to pics and flows
kmurphypolygon Oct 11, 2024
15119c7
correction
kmurphypolygon Oct 11, 2024
6c8ef1a
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into…
kmurphypolygon Oct 11, 2024
75518e7
update pic
kmurphypolygon Oct 11, 2024
e970275
update pic
kmurphypolygon Oct 11, 2024
92c7ec2
update pic
kmurphypolygon Oct 11, 2024
2f39a0a
update pics to svg
kmurphypolygon Oct 14, 2024
202b0e7
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 17, 2024
aa58519
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 17, 2024
739e417
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 17, 2024
5009e78
Update docs/cdk/architecture/high-level-views.md
kmurphypolygon Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/cdk/architecture/high-level-views.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## CDK stack layout

The following diagram depicts the full CDK stack layout and details some of the high level communication between components.

![High level view of CDK stack](../../img/cdk/cdk-stack.png)

### Communication steps

- External applications interact with the CDK Erigon RPC node via the transaction pool manager.
- Engineers use a CLI tool to manage the backend components, installing and initializing various modes of operation, such as validium versus rollup for example.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
- The CDK Erigon RPC sends transactions to the CDK Erigon sequencer which sequences transactions batches.
- The CDK Erigon sequencer puts the transaction batches into the data streamer.
- The data streamer streams data to the sequencer sender (validium mode) and the aggregator.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
- The sequencer sender sequences batches into the L1 smart contract domain and persists data into DAC nodes for validium mode operations.
- The aggregator sends batches to the prover and receives proofs in return. It then aggregates the proofs into batches before submitting them to the L1 domain.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
- Users interact with the bridge service via the bridge UI.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
- The AggLayer also utilizes the bridge service and interacts with the L1 smart contracts.
Copy link
Collaborator

@vcastellm vcastellm Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AggLayer doesn't interact with the bridge, it only receives proofs from the cdk-node and forwards them to L1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYM? the bridge is not related to the agglayer directly


## User data flow

The following diagram is a sequential depiction of the user data flow in validium mode using a mock prover and having an AggLayer connection.

![High level view of CDK user data flow](../../img/cdk/user-data-flow.png)

### Sequential steps

1. User sends a transaction to the CDK Erigon RPC node.
2. The Erigon RPC node proxies the data to the CDK Erigon sequencer node.
3. The sequencer sequences the transaction batches.
4. The sequencer puts the batches into the data streamer component.
5. The data streamer component streams the data into the sequence sender for validium mode stacks. It streams data into the aggregator and AggLayer for rollup and validium mode stacks.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
6. In validium mode, the sequencer sender persists transaction data into the DAC nodes.
7. In validium mode, the sequencer sender sequences the batches into the L1 smart contracts.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
8. In both modes, the aggregator sends the batches to the prover and the prover returns the proofs.
9. The aggregator batches the proofs.
vcastellm marked this conversation as resolved.
Show resolved Hide resolved
10. The aggregator submits the final proof to the AggLayer.
11. The AggLayer submits the final proof to the L1 smart contract domain.
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved

!!! tip
Detailed AggLayer flows will be published soon.
Binary file added docs/img/cdk/cdk-stack.png
kmurphypolygon marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/cdk/user-data-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ nav:
- Quickly test a running stack: cdk/how-to/quick-test-stack.md
- Connect to CDK testnets: cdk/how-to/connect-testnet.md
- Architecture:
- High level views: cdk/architecture/high-level-views.md
- CDK rollup: cdk/architecture/cdk-zkevm.md
- CDK validium: cdk/architecture/cdk-validium.md
- Unified bridge - STB: cdk/architecture/staking-the-bridge.md
Expand Down