Skip to content

Commit 4cc9510

Browse files
EmpieichOhsutaiyu
andauthored
Apply suggestions from code review
Co-authored-by: hsutaiyu <51791408+hsutaiyu@users.noreply.github.com>
1 parent 0015ef9 commit 4cc9510

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

docs/zkEVM/architecture/index.md

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Polygon zkEVM, as an L2 scaling-solution to Ethereum, processes and rolls up many transactions into batches.
1+
As an Ethereum Layer 2 scaling solution, Polygon zkEVM gathers transactions into batches after executing them.
22

3-
The batches are sent to Ethereum, sequenced, proved to be valid, as well as being verified. All these steps are carried out under the control of smart contracts.
3+
Aggregated batches are then dispatched to Ethereum for verification and validation, all managed through smart contracts.
44

5-
The aim with this document is to provide a broader sense of the protocol design while stating the currently implemented configuration.
5+
This document aims to offer a comprehensive understanding of the protocol design while delineating the currently implemented configuration.
66

77
The major components of Polygon zkEVM are:
88

@@ -30,15 +30,14 @@ The earlier version, Polygon Hermez 1.0, was based on the Proof of Donation (PoD
3030

3131
PoD was basically a decentralized auction conducted automatically, with participants (coordinators) bidding a certain number of tokens in order to be selected for creating batches.
3232

33-
It was based on a decentralized auction model to get the right to produce batches in a specific timeframe.
3433

35-
The latest Consensus Contract (PolygonZkEVM.sol) is designed to leverage the experience of the PoD in v1.0 and adds support for the permissionless participation of multiple coordinators to produce batches in L2.
34+
The updated consensus contract (PolygonZkEVM.sol) is designed to build upon the insights gained from PoD in v1.0 and adds support for permissionless participation of multiple coordinators in producing L2 batches.
3635

37-
In the PoD mechanism, the economic incentives were set up so the validators need to be very efficient in order to be competitive.
36+
In the PoD mechanism, economic incentives were structured to _require_ validators to operate with high efficiency to remain competitive.
3837

39-
The latest version of the zkEVM Consensus Contract (deployed on Layer 1) is modelled after the [Proof of Efficiency](https://ethresear.ch/t/proof-of-efficiency-a-new-consensus-mechanism-for-zk-rollups/11988).
38+
The latest version of the zkEVM consensus contract (deployed on Layer 1) is modeled after the [Proof of Efficiency](https://ethresear.ch/t/proof-of-efficiency-a-new-consensus-mechanism-for-zk-rollups/11988).
4039

41-
Although designed to support for permissionless participation of multiple coordinators to produce batches in L2, for security sake and due to the protocol being in its early development stages, only one coordinator (called the Sequencer) is currently brought to service.
40+
While the protocol design is intended to support permissionless participation of multiple coordinators to generate L2 batches, for security reasons and given the protocol's early development stage, only one coordinator (referred to as the Sequencer) is currently operational.
4241
4342
### Implementation model
4443
@@ -61,35 +60,35 @@ The strategic implementation of the contract-based consensus ensures that the ne
6160
6261
A full zk-rollup schema requires on-chain publication of both the transaction data (which users need to reconstruct the full state) and the validity proofs (zero-knowledge proofs).
6362

64-
However, given the Ethereum configuration, publishing data on-chain incurs gas prices, making the choice between a full zk-rollup and a hybrid configurations challenging.
63+
However, given Ethereum's current framework, publishing callback data to L1 incurs high gas fees, complicating the decision between opting for a full zk-rollup or a hybrid configuration.
6564

6665
Under a Hybrid schema, either of the following is possible:
6766

6867
- Validium: Data is stored off-chain and only the validity proofs are published on-chain.
69-
- Volition: For some transactions, both the data and the validity proofs remain on-chain while for the remaining ones, only proofs go on-chain.
68+
- Volition: For some transactions, both the data and the validity proofs are published on-chain, while in others, only the proofs are stored on-chain.
7069

71-
Unless, among other things, the proving module can be highly accelerated to mitigate costs for the validators, a Hybrid schema remains viable.
70+
Unless, among other considerations, the proving module can be significantly accelerated to alleviate high costs for validators, a hybrid schema remains a viable option.
7271
7372
### `PolygonZkEVM.sol`
7473
7574
The underlying protocol in zkEVM ensures that the state transitions are correct by employing a validity proof.
7675

77-
In order to ensure that a set of pre-determined rules have been followed when allowing state transitions, the consensus contract (`PolygonZkEVM.sol`, deployed on L1) is utilized.
76+
In order to ensure adherence to a set of pre-determined rules for state transitions, the consensus contract (`PolygonZkEVM.sol`, deployed on L1) is utilized.
7877
7978
!!!info
80-
The consensus contract is currently deployed on both [Ethereum Mainnet](https://etherscan.io/address/0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2) and [Cardona Testnet](https://sepolia.etherscan.io/address/0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A).
79+
The consensus contract is currently deployed on both [Ethereum mainnet](https://etherscan.io/address/0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2) and [Cardona testnet](https://sepolia.etherscan.io/address/0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A).
8180
8281
A smart contract verifies the validity proofs to ensure that each transition is completed correctly.
8382

84-
The verification is accomplished by employing zk-SNARK circuits.
83+
State transition verification is carried out by employing zk-SNARK circuits.
8584

86-
A system of this type requires two processes: transaction batching and transaction validation.
85+
A system of this type necessitates two processes: transaction batching and transaction validation.
8786

88-
Polygon zkEVM employs two types of participants in order to carry out the two procedures: A sequencer and an aggregator.
87+
Polygon zkEVM implements two participant network roles in order to carry out its procedures: A sequencer and an aggregator.
8988

9089
Under this two-layer model:
9190

92-
- The sequencer proposes transaction batches to the network for execution. That is, they roll-up transaction requests into batches and add them to the Consensus Contract.
91+
- The sequencer proposes transaction batches to the network upon executing them. That is, it rolls up transactions into batches and adds them to the consensus contract.
9392
9493
- The aggregator checks the validity of the transaction batches and provides validity proofs.
9594

@@ -102,41 +101,41 @@ The smart contract, therefore, makes two calls:
102101

103102
!!!info
104103

105-
Although the current protocol design allows for several sequencers and aggregators, for the sake of security and due to the protocol being in its early development stages, only one sequencer and one aggregator are currently put into service.
104+
Although the current protocol design allows for several sequencers and aggregators, to prioritize security and given the early stage of protocol development, only one sequencer and one aggregator are currently operational.
106105

107-
These are henceforth referred to as _trusted sequencer_ and _trusted aggregator_.
106+
These are henceforth referred to as the _trusted sequencer_ and the _trusted aggregator_.
108107

109108
### Tokenomics
110109

111-
The consensus smart contract imposes the following requirements on the trusted sequencer and the trusted aggregator:
110+
The consensus smart contract imposes the following requirements on the trusted sequencer and the trusted aggregator.
112111
113112
#### Sequencer
114113

115114
- The trusted sequencer must run the software necessary for a full zkEVM node.
116115

117116
- The trusted sequencer should pay a fee in the form of POL tokens for the right to create and process batches.
118117

119-
- The trusted sequencer is incentivized for proposing valid batches (which consist of valid transactions,) with the fees paid by the users of the network who sent the transactions.
118+
- The trusted sequencer is incentivized to propose valid batches (consisting of valid transactions) with the fees paid by the network users who initiated the transactions.
120119

121120
#### Aggregator
122121

123-
An trusted aggregator receives all the transaction information from the trusted sequencer and sends it to the prover, which in turn provides a zk-proof after performing some complex computations.
122+
A trusted aggregator receives all the transaction information from the trusted sequencer and sends it to the prover, which in turn provides a zk-proof after performing some complex computations.
124123

125124
A special _verfier_ smart contract validates the validity proof.
126125

127126
The trusted aggregator's task is to therefore:
128127

129128
- Provide validity proofs for the L2 transactions proposed by the trusted sequencer.
130129

131-
- Run zkEVM's zkNode software and the zkProver for creating the zero-knowledge validity proofs.
130+
- Run zkEVM's zkNode software and the zkProver for generating zero-knowledge validity proofs.
132131

133132
- For a given batch, the trusted aggregator earns the POL fees (paid by the trusted sequencer) for providing a validity proof.
134133

135-
- In a decentralized setting, an trusted aggregator needs to indicate their intention to validate transactions. And subsequently competes to produce validity proofs based on their own strategy.
134+
- In a decentralized setting, each trusted aggregator needs to declare its intention to validate transactions, and subsequently compete to produce validity proofs based on its own strategy.
136135

137136
## zkNode
138137

139-
zkNode is the software needed to run a zkEVM node. It is a client that the network requires to implement the synchronization and govern the roles of the participants (trusted sequencer or trusted aggregator).
138+
zkNode is the essential software for running a zkEVM node. It is a client that the network requires to implement the synchronization and govern the roles of the participants, including the trusted sequencer and the trusted aggregator.
140139

141140
Other than the trusted sequencer and the trusted aggregator, participants in the Polygon zkEVM network can take part as nodes that seek to know the state of the network.
142141

@@ -170,7 +169,7 @@ Below is a summary of the fee structure for the trusted sequencer and the truste
170169

171170
## zkProver
172171

173-
zkEVM employs zero-knowledge technology to create validity proofs.
172+
zkEVM employs zero-knowledge technology to generate validity proofs.
174173

175174
It uses a zero-knowledge prover (zkProver), which is intended to run on a server and is being engineered to be compatible with most consumer hardware.
176175

@@ -198,7 +197,7 @@ It is a combination of two smart contracts, one deployed on one chain and the se
198197

199198
The L1 and L2 contracts in zkEVM are identical except for where each is deployed.
200199

201-
Bridge L1 contract is on the Ethereum mainnet in order to manage asset transfers between rollups, while bridge L2 contract is on a specific rollup and it is responsible for asset transfers between mainnet and the rollup (or rollups).
200+
Bridge L1 contract is on the Ethereum mainnet in order to manage asset transfers between rollups, while bridge L2 contract operates in a designated rollup, managing asset transfers between mainnet and the rollup(s).
202201

203202
Layer 2 interoperability allows a native mechanism to migrate assets between different L2 networks. This solution is embedded in the bridge smart contract.
204203

@@ -208,15 +207,15 @@ Verifier is a smart contract which is able to verify any zk-SNARK cryptographic
208207

209208
The SNARK verifier proves the validity of every transaction in the batch.
210209

211-
It is the key entity in any zk-rollup architecture as it verifies the correctness of each proof, and thus ensuring integrity in state transitions.
210+
It is the core entity in any zk-rollup architecture as it verifies the correctness of each proof, thus ensuring the integrity of state transitions.
212211

213212
The verifier contract is currently deployed on the [Ethereum mainnet](https://etherscan.io/address/0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9) and [Cardona testnet](https://sepolia.etherscan.io/address/0x8EdA1d8c254a77a57A6A7A1C0262e9A44A7C6D6d).
214213

215214
## Transaction life cycle
216215

217-
Before getting transactions in the L2 flow, users need some funds to perform any L2 transaction.
216+
Users need funds on L2 to be able to send transactions to the L2 network.
218217

219-
To do so, users need to transfer some ether from L1 to L2 through the zkEVM bridge dApp.
218+
To do so, users need to deposit Ether to L2 through the [Polygon Portal](https://portal.polygon.technology/bridge).
220219

221220
- Bridge
222221

@@ -226,15 +225,15 @@ To do so, users need to transfer some ether from L1 to L2 through the zkEVM brid
226225

227226
- L2 transactions
228227

229-
- User initiates a transation in a wallet (e.g. MetaMask) and sends it to a trusted sequencer.
228+
- User initiates a transaction using their wallet (e.g. MetaMask) and sends it to a trusted sequencer.
230229

231230
- The transaction gets finalized on L2 once the trusted sequencer commits to adding the transaction to a batch. This is known as the trusted state.
232231

233232
- Sequencer sends the batch data to L1 smart contract, enabling any L2 node to synchronize from L1 in a trustless way. This is also known as the virtual state.
234233

235-
- Aggregator will take pending transactions, and build a proof.
234+
- Aggregator takes the pending transactions, and builds a proof.
236235

237-
- Once the proof is verified, user's transactions attain L1 finality (important for withdrawal purposes). This is called the consolidated state.
236+
- Once the proof is verified, the transactions attain L1 finality (important for withdrawal of funds from L2). This is called the consolidated state.
238237

239238
The above process is a summarized version of how transactions are processed in Polygon zkEVM.
240239

@@ -256,7 +255,7 @@ Smart contracts are deployed to ensure that everyone who executes state changes
256255

257256
## Efficiency and overall strategy
258257

259-
Efficiency is key to network performance. Polygon zkEVM applies several implementation strategies to guarantee efficiency. A few of them are listed below:
258+
Efficiency is key to network performance. Polygon zkEVM uses several implementation strategies to maximize efficiency. A few are listed below:
260259

261260
1. The first strategy is to deploy the consensus contract, which incentivizes the aggregator to participate in the proof generation process.
262261

0 commit comments

Comments
 (0)