-
Notifications
You must be signed in to change notification settings - Fork 271
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
CDK PP Docs Review Env: DO NOT MERGE!!! #2459
base: main
Are you sure you want to change the base?
Conversation
Adding new doc: `pp-intro.components.md`
Adding "Pessimistic proofs" to nav
Hi @sshrihar I have created a Dev Env here https://docs-dev.polygon.technology/2459 Can you tell me why clicking on the /cdk/Pessismistic proofs/ throws a 404 ? |
Fixing filename ref in nav pp-intro-components.md --> pp-intro.components.md
Remove DAC component
fixing indentation
Update resources.md in the cdk-erigon docs
Add CDK PP high level architecture doc
Update CLI Tool doc
Quality Gate passedIssues Measures |
I tried accessing the url and it redirected me to https://docs-dev.polygon.technology/2459/cdk/releases/pp-intro.components/ |
1. A user connects to the chain via a CDK Erigon RPC node and submits a transaction. | ||
2. CDK Erigon RPC node sends the transaction data to the transaction-pool manager. | ||
3. The transaction-pool manager proxies all transaction data to the CDK Erigon sequencer. | ||
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches. | |
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks |
batches are irrelevant for PP chains... I'm not even sure if the cdk-erigon version we're using for PP deals with batches at all
2. CDK Erigon RPC node sends the transaction data to the transaction-pool manager. | ||
3. The transaction-pool manager proxies all transaction data to the CDK Erigon sequencer. | ||
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches. | ||
5. CDK Erigon sequencer syncs all transaction data with any CDK Erigon RPC node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the opposite, any node syncs from sequencer. Otherwise I'd change syncs
for shares with or something similar
@@ -0,0 +1,62 @@ | |||
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. | |||
|
|||
![Figure: CDK PP Architecture](../../img/cdk/cdk-pp-architecture-001.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename JSON-RPC API
for AggLayer RPC
json RPC is known to be the api of the execution clients such as erigon...
3. The transaction-pool manager proxies all transaction data to the CDK Erigon sequencer. | ||
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches. | ||
5. CDK Erigon sequencer syncs all transaction data with any CDK Erigon RPC node. | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | |
6. AggSender gets batch data from the CDK Erigon sequencer, uses the data to generate certificates, and submits the certificates to the AggLayer RPC. |
4. CDK Erigon sequencer executes transactions, puts the transactions in blocks, and the blocks fill up batches. | ||
5. CDK Erigon sequencer syncs all transaction data with any CDK Erigon RPC node. | ||
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. | ||
7. The JSON-RPC API checks validity of the certificates against the transaction data in the CDK Erigon RPC node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7. The JSON-RPC API checks validity of the certificates against the transaction data in the CDK Erigon RPC node. | |
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 |
Not sure how to write this, but:
- There is no interaction with erigon, that's for sure (also, remove this interaction from diagram)
- What really happens:
- the certificate include bridges to other networks, and the agglayer checks that the amount being bridged out of the network is not greater than the amount that the network has received
- the certificate include bridges to this network (deposits/claims), the agglayer checks that this claims are valid (verifies that the merkle proofs are correct, and are done towards a valid GER)
| Node = RPC and sequencer | [cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon) | Customizable, commonly:<br/>\- Sequencer = 1 node<br/>\- RPC = multiple nodes | | ||
| Contracts | <a href=https://github.com/0xPolygonHermez/zkevm-contracts>zkevm-contracts</a> | | | ||
| CLI | [cdk](https://github.com/0xPolygon/cdk) | Included in [CDK](https://github.com/0xPolygon/cdk) repo | | ||
| AggSender | <a href=https://github.com/0xPolygon/cdk>cdk</a> | Included in [CDK](https://github.com/0xPolygon/cdk) repo | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AggSender is just a sub-component of the cdk
client. I think that we should be talking about cdk client
or cdk node
more in the doc... Although it's ok to specify that the AggSender
is the specific sub-component that sends the certs to the AL. But note that the AggSender
works in conjunction with other sub-components of the cdk
such as the bridge syncer and others...
- AggSender is the CDK PP component that accumulates all necessary info in order to generate certificates, which are sent to the SP1 prover via the JSON-RPC API for the generation of pessimistic proofs. | ||
- Transaction pool manager: For storing transactions submitted by users. | ||
|
||
### AggLayer-side components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit odd to have a sub section for AL, and not for CDK
- `PolygonZkEVMDeployer` | ||
- `PolygonZkEVMTimelock` | ||
- CLI tool: A single command line interface tool for abstracting away the complexity of deploying or configuring CDK components. | ||
- AggSender is the CDK PP component that accumulates all necessary info in order to generate certificates, which are sent to the SP1 prover via the JSON-RPC API for the generation of pessimistic proofs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of CDK PP
. No, there is the cdk. And the cdk happens to be used to give PP functionality, but there is no CDK PP... Again, once we've FEP+PP the same cdk will be used, and in this case we will have the aggsender as well as other components
|
||
We henceforth refer to CDK sovereign chains as CDK PP chains. | ||
|
||
## CDK PP stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, there is a weird level of detail... We list the CLI, but not the syncers? Most importantly, the aggSender looks like a standalone piece of software, when it's clearly just a functionality of the cdk client. I've been talking with some non Polygon folks and they're super confused with what's the CDK / AggLayer. We need to be very careful on how we articulate this things...
|
||
Unlike in the CDK FEP chain, the prover in a CDK PP chain is not directly connected to the chain. It in fact resides in the AggLayer. | ||
|
||
- JSON-RPC API: A component provided by the AggLayer to interface between the CDK PP chain and the SP1 prover. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldnt it be better to talk about AggLayer node
similar to the aggsender, the RPC is just a part of the AL node... but for sure avoid JSON-RPC
it's extremely confusing, people will think about the API of the Ethereum execution clients when they see this, and it has nothing to do with it
Hosted url: docs-dev.polygon.technology/2459
CDK PP docs review env: DO NOT MERGE!!!
docs/cdk/releases/pp-intro-components.md
docs/cdk/getting-started/cdk-erigon/resources.md
docs/cdk/architecture/cdk-pp-highlevel-arch.md
docs/cdk/getting-started/cli-tool.md