From 1bed4eb5b4b5e6c4a838008ffa7f4b84ba7d1890 Mon Sep 17 00:00:00 2001 From: EmpieichO Date: Wed, 23 Oct 2024 09:47:55 +0200 Subject: [PATCH 1/6] CDK add pp intro doc --- docs/cdk/releases/pp-intro-components.md | 64 ++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 65 insertions(+) create mode 100644 docs/cdk/releases/pp-intro-components.md diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md new file mode 100644 index 00000000..2a906541 --- /dev/null +++ b/docs/cdk/releases/pp-intro-components.md @@ -0,0 +1,64 @@ + + +Developers can use CDK to configure custom ZK-rollups by choosing which components should run the Polygon zkEVM protocol. We refer to these chains as CDK sovereign chains. + +Developers can, for instance, configure their chains to use provers that are outside the Polygon zkEVM stack. + +Specifically, instead of deploying a Polygon zkEVM prover, developers can configure their CDK sovereign chains to utilize Succinct's SP1 prover. + +Since CDK sovereign chains are designed to easily connect to the AggLayer, they use a type of ZK-proof called a _pessimistic proof_ to reach finality of transactions. + +## What is a pessimistic proof? + +A *pessimistic proof* (PP) is a zero-knowledge proof attesting to the fact that a chain's bridge transitions were correctly executed and that all withdrawals are collateralized. + +Therefore, pessimistic proofs enable CDK-built chains that interoperate via the [unified bridge](../../zkEVM/architecture/unified-LxLy/index.md) to achieve trustless cross-chain security. + +Pessimistic proofs allow CDK sovereign chains connected to the [AggLayer](../../agglayer/overview.md) interoperate securely + +We henceforth refer to CDK sovereign chains as CDK PP chains. + +## CDK PP stack + +Next, we detail the architectural components of the CDK PP chains. + +The table below lists the components of a CDK PP chain and where you can find them. + +| Component | CDK PP stack | Notes | +| ------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| Node = RPC and sequencer | [cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon) | Customizable, commonly:
\- Sequencer = 1 node
\- RPC = multiple nodes | +| Contracts | zkevm-contracts | | +| CLI | [cdk](https://github.com/0xPolygon/cdk) | Included in [CDK](https://github.com/0xPolygon/cdk) repo | +| AggSender | cdk | Included in [CDK](https://github.com/0xPolygon/cdk) repo | +| Tx pool manager | zkevm-pool-manager | | + +## Component descriptions + +Here are brief descriptions for each CDK FEP component. + +- CDK Erigon node, a fork of [erigon](https://github.com/ledgerwatch/erigon), that manages the following: + - Multiple RPC nodes that provide common APIs for sending transactions. + - Sequencer for executing transactions, and creating blocks and batches. +- DAC: The Data Availability Committee, specifically for validium mode, is a set of *trusted actors* who keep custody of all transaction data, including monitoring and validating hash values the sequencer sender proposes to publish on L1. +- Contracts: Various smart contracts deployed on L1 for the full implementation and complete functionality of the Polygon zkEVM protocol: + - `PolygonRollupManager` + - `PolygonZkEVMBridgeV2` + - `PolygonZkEVMGlobalExitRootV2` + - `FflonkVerifier` + - `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. +- Transaction pool manager: For storing transactions submitted by users. + +## AggLayer-side components + +- Succinct's SP1 prover: A simplified cryptographic tool designed to take Rust-written inputs in order to generate ZK-proofs. + + 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. + + In reality, the AggSender sends certificates to the JSON-RPC API, which in turn requests the SP1 prover to generate ZK-proofs. On receipt of the ZK-proofs, it sends the ZK-proofs to L1. + + See the high level view of the CDK PP chain architecture [here](../architecture/high-level-views.md) diff --git a/mkdocs.yml b/mkdocs.yml index 95c2d217..aaad74c5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -55,6 +55,7 @@ nav: - Overview: cdk/overview.md - Releases: - Full execution proofs (FEP): cdk/releases/stack-components.md + - Pessimistic proofs (PP): cdk/releases/pp-intro-components.md - Get started: - Local deployment guide: cdk/getting-started/local-deployment.md - CLI tool: cdk/getting-started/cli-tool.md From 5d69402983618c4bdf4314fb2f1ebc7784bd3c5a Mon Sep 17 00:00:00 2001 From: Anthony Mpho Matlala <74402600+EmpieichO@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:33:47 +0200 Subject: [PATCH 2/6] Update pp-intro-components.md delete DAC --- docs/cdk/releases/pp-intro-components.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md index 2a906541..09fd5006 100644 --- a/docs/cdk/releases/pp-intro-components.md +++ b/docs/cdk/releases/pp-intro-components.md @@ -39,7 +39,6 @@ Here are brief descriptions for each CDK FEP component. - CDK Erigon node, a fork of [erigon](https://github.com/ledgerwatch/erigon), that manages the following: - Multiple RPC nodes that provide common APIs for sending transactions. - Sequencer for executing transactions, and creating blocks and batches. -- DAC: The Data Availability Committee, specifically for validium mode, is a set of *trusted actors* who keep custody of all transaction data, including monitoring and validating hash values the sequencer sender proposes to publish on L1. - Contracts: Various smart contracts deployed on L1 for the full implementation and complete functionality of the Polygon zkEVM protocol: - `PolygonRollupManager` - `PolygonZkEVMBridgeV2` From 79011316a3b92934cbfa7699152adb68aed7d0fc Mon Sep 17 00:00:00 2001 From: Anthony Mpho Matlala <74402600+EmpieichO@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:52:22 +0200 Subject: [PATCH 3/6] Update pp-intro-components.md Fixing indentation --- docs/cdk/releases/pp-intro-components.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md index 09fd5006..4346a7bf 100644 --- a/docs/cdk/releases/pp-intro-components.md +++ b/docs/cdk/releases/pp-intro-components.md @@ -37,15 +37,15 @@ The table below lists the components of a CDK PP chain and where you can find th Here are brief descriptions for each CDK FEP component. - CDK Erigon node, a fork of [erigon](https://github.com/ledgerwatch/erigon), that manages the following: - - Multiple RPC nodes that provide common APIs for sending transactions. - - Sequencer for executing transactions, and creating blocks and batches. + - Multiple RPC nodes that provide common APIs for sending transactions. + - Sequencer for executing transactions, and creating blocks and batches. - Contracts: Various smart contracts deployed on L1 for the full implementation and complete functionality of the Polygon zkEVM protocol: - - `PolygonRollupManager` - - `PolygonZkEVMBridgeV2` - - `PolygonZkEVMGlobalExitRootV2` - - `FflonkVerifier` - - `PolygonZkEVMDeployer` - - `PolygonZkEVMTimelock` + - `PolygonRollupManager` + - `PolygonZkEVMBridgeV2` + - `PolygonZkEVMGlobalExitRootV2` + - `FflonkVerifier` + - `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. - Transaction pool manager: For storing transactions submitted by users. From d6cd5a4a9e5340b11811f0aed23b5520fdb9e8db Mon Sep 17 00:00:00 2001 From: Anthony Mpho Matlala <74402600+EmpieichO@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:18:04 +0200 Subject: [PATCH 4/6] Update pp-intro-components.md --- docs/cdk/releases/pp-intro-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md index 4346a7bf..37d73318 100644 --- a/docs/cdk/releases/pp-intro-components.md +++ b/docs/cdk/releases/pp-intro-components.md @@ -14,7 +14,7 @@ A *pessimistic proof* (PP) is a zero-knowledge proof attesting to the fact that Therefore, pessimistic proofs enable CDK-built chains that interoperate via the [unified bridge](../../zkEVM/architecture/unified-LxLy/index.md) to achieve trustless cross-chain security. -Pessimistic proofs allow CDK sovereign chains connected to the [AggLayer](../../agglayer/overview.md) interoperate securely +Pessimistic proofs allow CDK sovereign chains connected to the [AggLayer](../../agglayer/overview.md) interoperate securely. We henceforth refer to CDK sovereign chains as CDK PP chains. From b250315bb6403782c51f174b3f1e9432266eef33 Mon Sep 17 00:00:00 2001 From: Anthony Mpho Matlala <74402600+EmpieichO@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:30:36 +0200 Subject: [PATCH 5/6] Update docs/cdk/releases/pp-intro-components.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stefan Negovanović <93934272+Stefan-Ethernal@users.noreply.github.com> --- docs/cdk/releases/pp-intro-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md index 37d73318..67b9859e 100644 --- a/docs/cdk/releases/pp-intro-components.md +++ b/docs/cdk/releases/pp-intro-components.md @@ -47,7 +47,7 @@ Here are brief descriptions for each CDK FEP component. - `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. +- 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 From c914e16516889b852df07c1b7de29b0aaa73fbb3 Mon Sep 17 00:00:00 2001 From: Anthony Mpho Matlala <74402600+EmpieichO@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:34:01 +0200 Subject: [PATCH 6/6] Update pp-intro-components.md --- docs/cdk/releases/pp-intro-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cdk/releases/pp-intro-components.md b/docs/cdk/releases/pp-intro-components.md index 67b9859e..5b437642 100644 --- a/docs/cdk/releases/pp-intro-components.md +++ b/docs/cdk/releases/pp-intro-components.md @@ -50,7 +50,7 @@ Here are brief descriptions for each CDK FEP component. - 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 +### AggLayer-side components - Succinct's SP1 prover: A simplified cryptographic tool designed to take Rust-written inputs in order to generate ZK-proofs.