You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/agglayer/architecture/pessimistic-proof.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ The AggLayer is designed to be flexible enough to support blockchain architectur
14
14
15
15
The pessimistic proof does not extend security to chains integrated with the AggLayer; rather, each chain connected to the AggLayer is as secure as it would be if it were not integrated with the AggLayer.
16
16
17
+
17
18
The AggLayer uses per-chain pessimistic proofs to ensure a complete view of all token and message transfers occurring over the protocol. This allows chains that may not trust one another to safely interoperate.
18
19
19
20
## Building a Pessimistic Proof
@@ -22,6 +23,8 @@ For any cross-chain token transfer to be finalized such that the token may be wi
22
23
> **Note:** For more on how the AggLayer settles bridge claims to the underlying L1, see: [Unified Bridge](#)
23
24
24
25
## Token State
26
+
27
+
=======
25
28
Each chain maintains a data structure called a **Local Exit Tree**, which contains only the messages and token transfers originating from it. In the unified bridge, Ethereum holds a **Global Exit Root**, which represents a tree containing all of the Local Exit Roots of chains integrated with the AggLayer.
26
29
27
30
> **Note:** See the [Unified Bridge: Data Structures and State Management](#) for a detailed breakdown of all data used by the AggLayer.
Copy file name to clipboardExpand all lines: docs/agglayer/architecture/unified-bridge.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,12 @@
5
5
The unified bridge (prev. LxLy bridge) is the common access point for chains connected to the Agglayer. Along with the pessimistic proof, it is one of two core components of the Agglayer.
6
6
7
7
The unified bridge consists of two main components:
8
-
-**On-Chain Smart Contracts**: Maintain the data structures related to chain states, cross-chain transactions, and the Agglayer’s Global Exit Root.
9
-
-**Off-Chain Services & Tooling**: APIs and indexing frameworks for interacting with the bridge.
8
+
**On-Chain Smart Contracts**: Maintain the data structures related to chain states, cross-chain transactions, and the Agglayer’s Global Exit Root.
9
+
**Off-Chain Services & Tooling**: APIs and indexing frameworks for interacting with the bridge.
10
10
11
11
## Bridge Smart Contracts
12
12
13
-
The unified bridge is responsible for maintaining the data structures related to chain states, cross-chain transactions, and the Agglayer’s Global Exit Root, ensuring cross-chain transactions are indeed finalized on the L1 before they can be claimed. The smart contracts are as follows:
13
+
The unified bridge is responsible for maintaining the data structures related to chain states, cross-chain transactions, and the Agglayer’s Global Exit Root, ensuring cross-chain transactions are finalized on the L1 before they can be claimed. The smart contracts are as follows:
14
14
15
15
| Contract | Functions | Deployed on |
16
16
|----------|------------|--------------|
@@ -21,37 +21,35 @@ The unified bridge is responsible for maintaining the data structures related to
21
21
## Unified Bridge: Data Structures
22
22
23
23
### Local Exit Root & Local Index
24
-
- All cross-chain transactions using the unified bridge are recorded in a **Sparse Merkle Tree** called the **Local Exit Tree**.
25
-
- Each Agglayer-connected chain updates its own **Local Exit Tree**, maintained in `PolygonZkEVMBridgeV2.sol` on the L2.
26
-
- The **Local Exit Root** is the root of the Local Exit Tree, a binary tree with a height of 32, updated each time a new cross-chain transaction is initiated.
27
-
- The **Local Root Index** is the index of the leaf node, which is a hash of cross-chain transactions such as `bridgeAsset` / `bridgeMessage`.
24
+
All cross-chain transactions using the unified bridge are recorded in a **Sparse Merkle Tree** called the **Local Exit Tree**. Each Agglayer-connected chain updates its own **Local Exit Tree**, maintained in `PolygonZkEVMBridgeV2.sol` on the L2. The **Local Exit Root** is the root of the Local Exit Tree, a binary tree with a height of 32, updated each time a new cross-chain transaction is initiated.
25
+
**Local Root Index** is the index of the leaf node, which is a hash of cross-chain transactions such as `bridgeAsset` / `bridgeMessage`.
28
26
29
27
### Rollup Exit Root
30
-
- Once a chain updates its **Local Exit Tree** in `PolygonRollupManager.sol`, the contract updates the chain’s **Local Exit Root**.
31
-
- Each time a chain’s Local Exit Root is updated, the **Rollup Exit Root** is also updated.
32
-
- The **Rollup Exit Root** is the Merkle root of all Local Exit Roots.
33
-
- Any update to the Rollup Exit Root triggers an update of the **Global Exit Root**, which is maintained in `PolygonZkEVMGlobalExitRootV2.sol` on the L1.
28
+
Once a chain updates its **Local Exit Tree** in `PolygonRollupManager.sol`, the contract updates the chain’s **Local Exit Root**. Each time a chain’s Local Exit Root is updated, the **Rollup Exit Root** is also updated.The **Rollup Exit Root** is the Merkle root of all Local Exit Roots.
29
+
30
+
Any update to the Rollup Exit Root triggers an update of the **Global Exit Root**, which is maintained in `PolygonZkEVMGlobalExitRootV2.sol` on the L1.
34
31
35
32
### Mainnet Exit Root
36
-
-Functionally similar to the **Local Exit Root**, but it tracks the bridging activities of L1 to all chains connected through the Agglayer.
37
-
-When the **Mainnet Exit Root** is updated in `PolygonZkEVMBridgeV2.sol`, the contract then updates `mainnetExitRoot` in `PolygonZkEVMGlobalExitRootV2.sol`.
33
+
Functionally similar to the **Local Exit Root**, but it tracks the bridging activities of L1 to all chains connected through the Agglayer.
34
+
When the **Mainnet Exit Root** is updated in `PolygonZkEVMBridgeV2.sol`, the contract then updates `mainnetExitRoot` in `PolygonZkEVMGlobalExitRootV2.sol`.
38
35
39
36
### Global Exit Root, L1 Info Tree, Global Index
40
-
-**Global Exit Root** is the hash of the **Rollup Exit Root** and **Mainnet Exit Root**.
41
-
- When a new **Rollup Exit Root** or **Mainnet Exit Root** is submitted, the contract appends the new **Global Exit Root** to the **L1 Info Tree**.
42
-
-**L1 Info Tree** is a **Sparse Merkle Tree** that maintains Global Exit Roots. It is a binary tree with a height of 32, updated every time a new Global Exit Root is submitted.
43
-
-**Global Index** is a **256-bit string** used to locate the unique leaf in the latest **Global Exit Tree** when creating and verifying SMT proofs.
37
+
**Global Exit Root** is the hash of the **Rollup Exit Root** and **Mainnet Exit Root**. When a new **Rollup Exit Root** or **Mainnet Exit Root** is submitted, the contract appends the new **Global Exit Root** to the **L1 Info Tree**.
38
+
**L1 Info Tree** is a **Sparse Merkle Tree** that maintains Global Exit Roots. It is a binary tree with a height of 32, updated every time a new Global Exit Root is submitted.
39
+
**Global Index** is a **256-bit string** used to locate the unique leaf in the latest **Global Exit Tree** when creating and verifying SMT proofs.
44
40
45
41
## Bridge Service
46
42
47
43
### Chain Indexer Framework
48
44
- An EVM blockchain data indexer that parses, sorts, and organizes blockchain data for the **Bridge Service API**.
49
45
- Each Agglayer-connected chain has its own indexer instance.
50
46
47
+
51
48
### Transaction API
52
49
- Provides details of a bridge transaction initiated by or incoming to a user’s wallet address.
0 commit comments