Skip to content

Commit 2ba02be

Browse files
Apply suggestions from code review
Co-authored-by: Dra Murphy <149679879+kmurphypolygon@users.noreply.github.com>
1 parent f5acd44 commit 2ba02be

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

docs/zkEVM/architecture/protocol/incentive-mechanism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function _updateBatchFee(uint64 newLastVerifiedBatch) internal
7272
The admin defines two storage variables that are used to **tune the fee adjustment function**:
7373

7474
- `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.
7676

7777
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.
7878

docs/zkEVM/architecture/protocol/malfunction-resistance/aggregator-resistance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function verifyBatches(
1515
) public ifNotEmergencyState
1616
```
1717

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.
1919

2020
Along with the conditions required in the `trustedVerifyBatches` function, the following conditions must also be met in `verifyBatches`:
2121

docs/zkEVM/architecture/protocol/transaction-life-cycle/batch-sequencing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Similarly, the number of batches in a sequence is limited by the contract's publ
3131

3232
Only the trusted sequencer's Ethereum account can access the `sequencedBatches` mapping. The contract must not be in an emergency state.
3333

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.
3535

3636
## Batch validity & L2 state integrity
3737

@@ -43,7 +43,7 @@ The `sequencedBatches` function iterates over every batch of the sequence, check
4343

4444
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.
4545

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.
4747

4848
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.
4949

@@ -93,7 +93,7 @@ struct SequencedBatchData {
9393
- `sequencedTimestamp` is the timestamp of the block where the sequencing L1 transaction is executed.
9494
- `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).
9595

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.
9797

9898
## Batch data minimal storage
9999

@@ -112,7 +112,7 @@ As previously stated, the hash digest becomes a commitment of the entire batch c
112112

113113
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.
114114

115-
Finally a `SequenceBatches` event is emitted.
115+
Finally a `SequenceBatches` event emits.
116116

117117
```solidity
118118
event SequenceBatches (uint64 indexed numBatch)

docs/zkEVM/architecture/protocol/zkevm-bridge/exit-tree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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.
22

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.
44

55
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.
66

@@ -14,7 +14,7 @@ An exit leaf, in particular, is a Keccak256 hash of the ABI encoded packed struc
1414
- uint256 amount: Amount of tokens/ether to bridge.
1515
- bytes32 metadataHash: Hash of the metadata. This metadata contains information about asset transferred or the message payload.
1616

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.
1818

1919
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.
2020

@@ -63,7 +63,7 @@ To claim the bridged assets on the destination L2 network, the global exit root
6363

6464
### Transfer from rollup L2 to L1
6565

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.
6767

6868
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:
6969

docs/zkEVM/architecture/protocol/zkevm-bridge/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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.
22

33
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.
44

@@ -10,15 +10,15 @@ In zk-rollups like the Polygon zkEVM, L1 smart contracts manage L2 state transit
1010

1111
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.
1212

13-
![Polygon zkEVM bridge Schema](../../../../img/zkEVM/01pzb-polygon-zkevm-schema.png)
13+
![Polygon zkEVM bridge schema](../../../../img/zkEVM/01pzb-polygon-zkevm-schema.png)
1414

1515
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.
1616

1717
Once minting is complete, the asset can be claimed by the user or recipient in the destination network (L2).
1818

1919
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.
2020

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.
2222

2323
## Comparing with Ethereum 2.0 deposit contract
2424

@@ -36,9 +36,9 @@ As a result, as stated in this document, every transfer is protected by smart co
3636

3737
## Features
3838

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.
4040

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.
4242

4343
Meanwhile, all asset transfers can be validated by any L1 and L2 nodes due to data availability.
4444

docs/zkEVM/how-to/verify-contract.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Click on **Verify & Publish** to verify your deployed smart contract.
7171

7272
## Verify using Remix
7373

74-
We use ready-made `Storage.sol` contract in Remix. Compile the contract and follow the steps provided below.
74+
We use the ready-made `Storage.sol` contract in Remix. Compile the contract and follow the steps provided below.
7575

7676
1. Deploy the `Storage.sol` contract:
7777

0 commit comments

Comments
 (0)