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/zkEVM/architecture/protocol/incentive-mechanism.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ function _updateBatchFee(uint64 newLastVerifiedBatch) internal
72
72
The admin defines two storage variables that are used to **tune the fee adjustment function**:
73
73
74
74
-`veryBatchTimeTarget`, which is **the targeted time of the verification of a batch**, so the `batchFee` variable is updated to achieve this target, and
75
-
-`multiplierBatchFee`, which is the batch fee multiplier, with 3 decimals **ranging from 1000 to 1024**.
75
+
-`multiplierBatchFee`, which is the batch fee multiplier, with 3 decimals ranging from 1000 to 1024.
76
76
77
77
The function `_updateBatchFee` first determines how many of the aggregated batches are late. That is, those who are in the sequence but have not yet been aggregated.
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/protocol/malfunction-resistance/aggregator-resistance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ function verifyBatches(
15
15
) public ifNotEmergencyState
16
16
```
17
17
18
-
As previously stated, the `verifyBatches` function accepts the same arguments as the `trustedVerifyBatches` function. However, the `verifyBatches` function adds two additional constraints for a sequence to be aggregated, as well as a new L2 state stage called Pending state.
18
+
As previously stated, the `verifyBatches` function accepts the same arguments as the `trustedVerifyBatches` function. However, the `verifyBatches` function adds two additional constraints for a sequence to be aggregated, as well as a new L2 pending state.
19
19
20
20
Along with the conditions required in the `trustedVerifyBatches` function, the following conditions must also be met in `verifyBatches`:
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/protocol/transaction-life-cycle/batch-sequencing.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Similarly, the number of batches in a sequence is limited by the contract's publ
31
31
32
32
Only the trusted sequencer's Ethereum account can access the `sequencedBatches` mapping. The contract must not be in an emergency state.
33
33
34
-
The function call is reverted if the above conditions are not met.
34
+
The function call reverts if the above conditions are not met.
35
35
36
36
## Batch validity & L2 state integrity
37
37
@@ -43,7 +43,7 @@ The `sequencedBatches` function iterates over every batch of the sequence, check
43
43
44
44
If one block is not valid, the transaction reverts, discarding the entire sequence. Otherwise, if all blocks in the batches that are to be sequenced are valid, the sequencing process continues as normal.
45
45
46
-
A storage variable called `lastBatchSequenced` is used as a batch counter, and it is thus incremented each time a batch is sequenced. It gives a specific index number to each batch that is to be used as a position value in the batch chain.
46
+
A storage variable called `lastBatchSequenced` is used as a batch counter, and it is thus incremented each time a batch is sequenced. It gives a specific index number to each batch that is used as a position value in the batch chain.
47
47
48
48
The same hashing mechanism used in blockchains to link one block to the next is used in batches to ensure the cryptographic integrity of the batch chain. That is, including the previous batch's digest among the data used to compute the next batch's digest.
49
49
@@ -93,7 +93,7 @@ struct SequencedBatchData {
93
93
-`sequencedTimestamp` is the timestamp of the block where the sequencing L1 transaction is executed.
94
94
-`previousLastBatchSequenced` is the index of the last sequenced batch before the first batch of the current sequence (i.e., the last batch of the previous sequence).
95
95
96
-
The index number of the last batch in the sequence is used as key and the `SequencedBatchData` struct is used as value when the sequence is entered into`sequencedBatches` mapping.
96
+
The index number of the last batch in the sequence is the key, and the `SequencedBatchData` struct is the value, in the `sequencedBatches` mapping.
97
97
98
98
## Batch data minimal storage
99
99
@@ -112,7 +112,7 @@ As previously stated, the hash digest becomes a commitment of the entire batch c
112
112
113
113
The data availability of the L2 transactions is guaranteed because the data of each batch can be recovered from the calldata of the sequencing transaction, which is not part of the contract storage but is part of the L1 state.
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/protocol/zkevm-bridge/exit-tree.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
The zkEVM's bridge SC utilizes a special Merkle tree called Exit Tree for each of the networks participating in the communication or asset-exchange.
1
+
The zkEVM's bridge SC utilizes a special Merkle tree called an exit tree for each of the networks participating in the communication or asset-exchange.
2
2
3
-
The term `exit tree refers to an append-only Sparse Merkle tree (SMT) whose leaf nodes record information about assets being transferred out of the network. Exit trees of depth 32 are used by Polygon zkEVM.
3
+
The term exit tree refers to an append-only sparse Merkle tree (SMT) whose leaf nodes record information about assets being transferred out of the network. Exit trees of depth 32 are used by Polygon zkEVM.
4
4
5
5
From now on, a leaf of an exit tree is referred to as a exit leaf. Exit leaves are classified into two types: type 0 for recording asset(s) information and Type 1 for recording messaging information.
6
6
@@ -14,7 +14,7 @@ An exit leaf, in particular, is a Keccak256 hash of the ABI encoded packed struc
14
14
- uint256 amount: Amount of tokens/ether to bridge.
15
15
- bytes32 metadataHash: Hash of the metadata. This metadata contains information about asset transferred or the message payload.
16
16
17
-
When a user commits to transferring assets from one network to another, the bridge SC must add an exit leaf to that network's exit tree.
17
+
When a user commits to transferring assets from one network to another, the bridge contract adds an exit leaf to that network's exit tree.
18
18
19
19
The Merkle root of an exit tree is known as the exit tree root, and it is the fingerprint of all the information recorded in the exit tree's leaf nodes.
20
20
@@ -63,7 +63,7 @@ To claim the bridged assets on the destination L2 network, the global exit root
63
63
64
64
### Transfer from rollup L2 to L1
65
65
66
-
Transfers can also occur from an L2 Rollup to the Mainnet L1. In this scenario, the same procedure outlined in the previous example is followed, but in the reverse direction.
66
+
Transfers can also occur from an L2 Rollup to the L1 mainnet. In this scenario, the same procedure outlined in the previous example is followed, but in the reverse direction.
67
67
68
68
That is, once a user commits to a transfer, an exit leaf is added to the L2 exit tree with corresponding transfer information. The transfer data in this case looks as follows:
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/protocol/zkevm-bridge/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
The ability of a blockchain to exchange data with other blockchains is crucial for its participation in a broader ecosystem, a concept known as Interoperability. Various solutions have been developed to enable interoperability, each offering unique advantages and disadvantages.
1
+
The ability of a blockchain to exchange data with other blockchains is crucial for its participation in a broader ecosystem, a concept known as interoperability. Various solutions have been developed to enable interoperability, each offering unique advantages and disadvantages.
2
2
3
3
The Polygon team has developed an interoperability solution in the form of a bridge for the Polygon zkEVM network. This zkEVM bridge facilitates communication and asset migration between the Polygon zkEVM network and other networks, such as the L1 (Ethereum Mainnet) or any L2 built on Ethereum.
4
4
@@ -10,15 +10,15 @@ In zk-rollups like the Polygon zkEVM, L1 smart contracts manage L2 state transit
10
10
11
11
To better understand the zkEVM bridge protocol design, let's use an analogy. Refer to the illustration below for a clearer explanation of the protocol.
Consider two networks, L1 and L2. To bridge an asset between L1 and L2, a user must lock the asset on the origin network (L1). The bridge smart contract then mints an equivalent representative asset on the destination network (L2). This minted asset is called a Wrapped Token.
16
16
17
17
Once minting is complete, the asset can be claimed by the user or recipient in the destination network (L2).
18
18
19
19
The operation can also be performed in reverse. After burning the Wrapped Token, the bridge smart contract unlocks the original asset on the origin network.
20
20
21
-
As mentioned earlier, there is also a third option where the bridge smart contract facilitates cross-chain messaging. This allows data payloads to be sent from one network to another using the bridge smart contract's Bridge and Claim operations.
21
+
As mentioned earlier, there is also a third option where the bridge smart contract facilitates cross-chain messaging. This allows data payloads to be sent from one network to another using the bridge smart contract's bridge and claim operations.
22
22
23
23
## Comparing with Ethereum 2.0 deposit contract
24
24
@@ -36,9 +36,9 @@ As a result, as stated in this document, every transfer is protected by smart co
36
36
37
37
## Features
38
38
39
-
The Polygon zkEVM bridge smart contract's main feature is the use of Exit Trees and the Global Exit Tree, with the Global Exit Tree Root serving as the primary source of state truth.
39
+
The Polygon zkEVM bridge smart contract's main feature is the use of exit trees and the global exit tree, with the global exit tree root serving as the primary source of state truth.
40
40
41
-
The use of two distinct Global Exit Root managers for L1 and L2, as well as separate logic for the bridge SC and each of these Global Exit Root managers, allows for extensive network interoperability.
41
+
The use of two distinct global exit root managers for L1 and L2, as well as separate logic for the bridge contract and each of these global exit root managers, allows for extensive network interoperability.
42
42
43
43
Meanwhile, all asset transfers can be validated by any L1 and L2 nodes due to data availability.
0 commit comments