Skip to content

Commit 1b834f3

Browse files
committed
zkEVM - revision per team review
1 parent 29f4e1c commit 1b834f3

File tree

24 files changed

+184
-179
lines changed

24 files changed

+184
-179
lines changed

docs/cdk/concepts/bridging.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ CDK-built chains come with a built-in bridge service and customizable UI out of
88

99
The LxLy bridge contracts carry out deposit and withdrawal of assets between L2 and L1.
1010

11-
Chains looking to run their own bridge infrastructure can choose to deploy a new instance of the [LxLy bridge](../../zkEVM/architecture/high-level/unified-LxLy/lxly-bridge.md) that allows users to move assets (both native and [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens) from L1 to the L2 and vice versa.
11+
Chains looking to run their own bridge infrastructure can choose to deploy a new instance of the [LxLy bridge](../../zkEVM/architecture/unified-LxLy/index.md) that allows users to move assets (both native and [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens) from L1 to the L2 and vice versa.
1212

13-
Deploying an individual instance of the LxLy means interoperability with other L2 chains via the [AggLayer](../agglayer/overview.md) is not possible. To enable cross-chain interoperability (i.e. L2-to-L2 cross-chain transactions), chains can opt-in to the AggLayer and use the [unified bridge](../agglayer/unified-bridge.md).
13+
Deploying an individual instance of the LxLy means interoperability with other L2 chains via the [AggLayer](../../innovation-design/agglayer/overview.md) is not possible. To enable cross-chain interoperability (i.e. L2-to-L2 cross-chain transactions), chains can opt-in to the AggLayer and use the [unified bridge](../../innovation-design/agglayer/unified-bridge.md).
1414

1515
This option is suited to chains that may want to customize how the bridge is managed and operated, or maintain control of the bridge's funds; as the [upgradeability](./admin-upgradeability.md) of the bridge contracts are managed by the chain operator.
1616

1717
![LxLy bridge](../../img/cdk/lxly.png)
1818

1919
## Unified bridge
2020

21-
A single, shared instance of the LxLy bridge, called the [unified bridge](../agglayer/unified-bridge.md) is available to use for all CDK chains that opt-in to the AggLayer.
21+
A single, shared instance of the LxLy bridge, called the [unified bridge](../../innovation-design/agglayer/unified-bridge.md) is available to use for all CDK chains that opt-in to the AggLayer.
2222

2323
It is a shared smart contract deployed on Ethereum, responsible for enabling interoperability between chains in the form of cross-chain transactions and L2-to-L2 transfers.
2424

@@ -31,5 +31,5 @@ This option is suited to chains that want a standard bridging experience and do
3131
## Further reading
3232

3333
- [Aggregated blockchains: A new thesis](https://polygon.technology/blog/aggregated-blockchains-a-new-thesis).
34-
- [LxLy bridge](../../zkEVM/architecture/high-level/unified-LxLy/lxly-bridge.md).
35-
- [Unified bridge Ooverview](../agglayer/unified-bridge.md).
34+
- [LxLy bridge](../../zkEVM/architecture/unified-LxLy/index.md).
35+
- [Unified bridge Ooverview](../../innovation-design/agglayer/unified-bridge.md).

docs/cdk/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Polygon CDK provides the components necessary to build a layer 2 blockchain that
1616

1717
- Modularity: CDK modular components allow developers to easily customize their L2 environment and build a chain that meets their specific needs.
1818

19-
- Interoperability: Opt-in to the [AggLayer](../cdk/agglayer/overview.md) to bootstrap your chain's ecosystem, enable cross-chain transactions, and gain access to the users and liquidity of other chains.
19+
- Interoperability: Opt-in to the [AggLayer](../innovation-design/agglayer/overview.md) to bootstrap your chain's ecosystem, enable cross-chain transactions, and gain access to the users and liquidity of other chains.
2020

2121
- Sovereignty: Maintain full control over your chain's revenue, governance, security, economic policies, and more.
2222

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/cdk/agglayer/unified-bridge.md renamed to docs/innovation-design/agglayer/unified-bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The unified bridge is a single bridge contract on Ethereum, providing a safe, co
88

99
## Bridging mechanism
1010

11-
The bridging mechanism enables token transfers and message-passing between Ethereum (L1) and CDK chains via smart contracts. Detailed in the [zkEVM bridging documentation](../../zkEVM/architecture/high-level/unified-LxLy/bridging.md), core components include the bridge and exit root Solidity smart contracts.
11+
The bridging mechanism enables token transfers and message-passing between Ethereum (L1) and CDK chains via smart contracts. Detailed in the [zkEVM bridging documentation](../../zkEVM/architecture/unified-LxLy/bridging.md), core components include the bridge and exit root Solidity smart contracts.
1212

1313
## Data structures
1414

docs/innovation-design/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ hide:
3232
</div>
3333
<div class="grid-container">
3434
<div class="grid-item">
35-
<a href="../cdk/agglayer/overview">
35+
<a href="../innovation-design/agglayer/overview">
3636
<div class="product-list-item-header">
3737
<div class="feature-card-heading">AggLayer documentation</div>
3838
</div>

docs/zkEVM/architecture/high-level/smart-contracts/exit-roots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ uint8 private constant _LEAF_TYPE_ASSET = 0;
7171
uint8 private constant _LEAF_TYPE_MESSAGE = 1;
7272
```
7373

74-
Data in a leaf contains a Keccak256 hash of the metadata (ABI encoded metadata if any) and the following parameters (matched by publicly available transaction data as seen in the [bridge L1 to L2](../unified-LxLy/bridging.md#l1-to-l2) documentation):
74+
Data in a leaf contains a Keccak256 hash of the metadata (ABI encoded metadata if any) and the following parameters (matched by publicly available transaction data as seen in the [bridge L1 to L2](../../unified-LxLy/bridging.md#l1-to-l2) documentation):
7575

7676
```solidity
7777
_addLeaf(
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
comments: true
3+
---
4+
5+
Polygon zkEVM deploys smart contracts to manage transaction processing and related data transfers between itself and other networks, such as the Ethereum L1 or other L2s connected to the AggLayer.
6+
7+
There are four key contract types built into the system design:
8+
9+
- [Consensus contracts](#consensus-contracts).
10+
- [Rollup manager](#rollup-manager).
11+
- [Bridge contract](#bridge).
12+
- [Exit root management](#global-exit-roots).
13+
14+
### Consensus
15+
16+
Consensus contracts live in the L1 and expose specific functions for controlling the sequencing and verification mechanisms triggered by the sequencer and aggregator.
17+
18+
Polygon zkEVM can be implemented as,
19+
20+
- Either a zk-rollup, deploying the [`PolygonZkEVMEtrog.sol`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/a5eacc6e51d7456c12efcabdfc1c37457f2219b2/contracts/v2/consensus/zkEVM/PolygonZkEVMEtrog.sol) consensus contract, where all transaction data is posted to Ethereum.
21+
22+
- Or, a validium using a data-availability committee (DAC) for managing availability of transaction data, and deploying the [`PolygonValidiumEtrog.sol`](https://github.com/0xPolygonHermez/zkevm-contracts/blob/a5eacc6e51d7456c12efcabdfc1c37457f2219b2/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol) consensus contract.
23+
24+
These contracts therefore define the type of a CDK chain, either a validium or zk-rollup.
25+
26+
### Rollup manager
27+
28+
The [PolygonRollupManager.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/contracts/v2/PolygonRollupManager.sol) contract is useful for managing CDK chains.
29+
It is responsible for creating, updating, and verifying CDK rollup and validium chains.
30+
31+
### Bridge
32+
33+
The unified bridge contract [PolygonZkEVMBridgeV2.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/contracts/v2/PolygonZkEVMBridgeV2.sol) is responsible for bridging and claiming assets or messages across L1 and L2 chains.
34+
35+
### Global exit roots
36+
37+
Each bridging of an asset or a message from the zkEVM is recorded on a leaf of the zkEVM's _local exit tree_.
38+
39+
Every update of the local exit tree at the leaf-level triggers an update of the local exit root, which in turn is appended to a leaf of the global exit tree.
40+
41+
Similarly, each bridging of an asset or a message from the L1 to the zkEVM is recorded on a leaf of the _L1 Info tree_.
42+
43+
The [PolygonZkEVMGlobalExitRootV2.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/contracts/v2/PolygonZkEVMGlobalExitRootV2.sol) contract manages the exit roots across multiple networks at the Ethereum L1 level.
44+
45+
The [PolygonZkEVMGlobalExitRootL2.sol](https://github.com/0xPolygon/cdk-validium-contracts/blob/main/contracts/PolygonZkEVMGlobalExitRootL2.sol) contract manages the zkEVM state by keeping track of the current local exit root.
46+
47+
### Validium stacks
48+
49+
CDK validium stacks use the [cdk-validium-contracts](https://github.com/0xPolygon/cdk-validium-contracts/tree/main) which has slightly adjusted behavior to take account of data-availability components and custom CDK requirements.
50+
51+
The CDK repo is a fork of the zkEVM main contracts repo and all contracts, therefore, extend from common interfaces.
52+
53+
!!! important
54+
- A CDK validium stack starts life as a rollup stack.
55+
- It may interchangeably be referred to as such when discussing aspects shared by the two options.

0 commit comments

Comments
 (0)