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
This section of the docs provides a detailed analysis of the full topology of the Polygon zero-knowledge system architecture.
6
4
7
5
Tailored for CDK stacks and using zkEVM technology, these documents explore the contents, layout, and interactions among component systems and functions. They offer in-depth descriptions of the components that constitute the larger system, with references to relevant code bases.
Various layer 2 solutions aimed at improving the scalability of the Ethereum network, primarily transaction throughput, have been developed over the past years. The ultimate and intended benefit for Ethereum network users is a reduction in gas fees, while maintaining decentralisation and security.
1
+
Over the past few years, several L2 solutions have been developed to enhance the scalability of the Ethereum network, with a focus on increasing transaction throughput. The benefit for users of the Ethereum network is to lower gas fees without compromising decentralization and security.
2
2
3
-
Polygon zkEVM is a layer 2 rollup solution that combines data availability and execution verification in layer 1 of the Ethereum blockchain to ensure L2 state transition security and reliability.
3
+
Polygon zkEVM is an L2 rollup solution that combines data availability and execution verification on L1, the Ethereum network, in order to ensure security and reliability of each L2 state transition.
4
4
5
-
This section will describe the infrastructure that Polygon designed and implemented for its zkEVM, with a focus on providing an overview of the components used in the development of the zkEVM Protocol.
5
+
This section describes the overall design of the Polygon zkEVM. It thus provides an architectural overview of its protocol.
6
6
7
7
## Components
8
8
9
-
This section describes the components used in the Polygon zkEVM to enable transaction finality while ensuring the correctness of state transitions.
9
+
It takes three main components of the Polygon zkEVM protocol to enable transaction finality while ensuring the correctness of state transitions:
10
10
11
-
The three main components of zkEVM protocol are:
12
-
13
-
- Trusted sequencer.
14
-
- Trusted aggregator.
15
-
- Consensus contract (PolygonZkEVM.sol, deployed on L1).
11
+
- The trusted sequencer.
12
+
- The trusted aggregator.
13
+
- The consensus contract (`PolygonZkEVM.sol`, deployed on L1).
16
14
17
15
### Trusted sequencer
18
16
19
-
The trusted sequencer component is in charge of receiving L2 transactions from users, ordering them, generating batches, and submitting them to the consensus contract's storage slots in the form of sequences.
17
+
The trusted sequencer receives L2 transactions from users, orders them, generates blocks of trasactions, fills batches, and submits them to the consensus contract's storage slots in the form of sequences.
20
18
21
-
The sequencer executes and broadcasts batches of transactions to L2 network nodes in order to achieve fast finality and reduce costs associated with high network usage. That's before even submitting them to L1.
19
+
The trusted sequencer processes batches and distributes them to L2 network nodes to achieve immediate finality and reduce costs associated with high network usage, all before submitting them to L1.
22
20
23
-
The Trusted sequencer must run a zkEVM node in sequencer mode and be in control of a consensus contract-enforced Ethereum account.
21
+
The trusted sequencer runs a zkEVM node in sequencer mode and controls an Ethereum account regulated by a consensus contract.
24
22
25
23
### Trusted aggregator
26
24
27
-
The trusted aggregator component can compute the L2 State based on batches of L2 transactions executed by the trusted sequencer.
25
+
The trusted aggregator computes the L2 state based on batches of L2 transactions executed by the trusted sequencer.
28
26
29
-
The main role of the trusted aggregator, on the other hand, is to take the L2 batches committed by the trusted sequencer and generate zero-Knowledge proofs attesting to the batches' computational integrity. These ZK proofs are generated by the aggregator using a special off-chain EVM interpreter.
27
+
On the other hand, the primary function of the trusted aggregator is to receive the L2 batches validated by the trusted sequencer and produce zero-knowledge proofs verifying the computational integrity of these batches. The aggregator achieves this by employing a specialized off-chain EVM interpreter to generate the ZK proofs.
30
28
31
-
The consensus contract's logic validates the zero-Knowledge proofs, resulting in the zkEVM inheriting the L1 security. Verification is required before committing new L2 state roots to the consensus contract. A verified proof is an irrefutable evidence that a given sequence of batches led to a specific L2 state.
29
+
The logic within the consensus contract verifies the zero-knowledge proofs, thereby endowing the zkEVM with the security of Layer 1. Before committing new L2 state roots to the consensus contract, verification is essential. A validated proof serves as undeniable evidence that a particular sequence of batches resulted in a specific L2 state.
32
30
33
31
!!!info
34
32
L2 state root
35
33
36
-
An L2 state root is a concise cryptographic digest of the L2 state. In case you want to read more about state roots, please check out [this article](https://ethereum.org/en/developers/docs/scaling/zk-rollups/#state-commitments).
34
+
An L2 state root is a cryptographic hash value of the L2 state. In case you want to read more about state roots, please check out [this article](https://ethereum.org/en/developers/docs/scaling/zk-rollups/#state-commitments).
37
35
38
-
The trusted aggregator should run a zkEVM node in aggregator mode and must control a specific Ethereum account enforced in a consensus contract.
36
+
The trusted aggregator runs a zkEVM node in aggregator mode and controls an Ethereum account regulated by a consensus contract.
39
37
40
38
### Consensus contract
41
39
42
40
The consensus contract used by both the trusted sequencer and the trusted aggregator in their interactions with L1 is the `PolygonZkEVM.sol` contract.
43
41
44
42
The trusted sequencer can commit batch sequences to L1 and store them in the `PolygonZkEVM.sol` contract, creating a historical repository of sequences.
45
43
46
-
The `PolygonZkEVM.sol` contract also enables the aggregator to publicly verify transitions from one L2 state root to the next. The consensus contract accomplishes this by validating the aggregator's zk-proofs, which attest to the proper execution of transaction batches.
44
+
The `PolygonZkEVM.sol` contract also enables the aggregator to publicly verify transitions from one L2 state root to the next. The consensus contract accomplishes this by validating the aggregator's zk-proofs, which attest to proper execution of transaction batches.
47
45
48
46
## zkEVM node execution modes
49
47
@@ -59,10 +57,10 @@ There is also a database to temporarily store transactions that have not yet bee
59
57
60
58
In the aggregator mode, the node has all the components needed to execute transaction batches, compute the resulting L2 state and generate the zero-knowledge proofs of computational integrity.
61
59
62
-
Also, has all the components needed to fetch transaction batches committed in L1 by the trusted sequencer and call the functions to publicly verify the L2 state transitions on L1.
60
+
Also, it has all the components needed to fetch transaction batches committed in L1 by the trusted sequencer and call the functions to publicly verify the L2 state transitions on L1.
63
61
64
62
### RPC mode
65
63
66
-
In the RPC mode, the zKEVM node has a limited functionality. It primarily maintains an up-to-date instance of L2 state, initially with respect to batches broadcast by the trusted sequencer, and later with sequences of batches fetched from the consensus contract.
64
+
In this mode, the zKEVM node has limited functionality. It primarily maintains an up-to-date instance of the L2 state, initially with respect to batches broadcast by the trusted sequencer, and later with sequences of batches fetched from the consensus contract.
67
65
68
-
The node continuously interacts with L1 in order to keep the local L2 state up to date, as well as to check the synchronization of L2 state roots. The default syncing rate for the synchronizer is every 2 seconds, unless stipulated otherwise in the configuration.
66
+
The RPC node continuously interacts with L1 to keep the local L2 state up-to-date and to verify the synchronization of L2 state roots. By default, the synchronizer updates every 2 seconds, unless a different interval is specified in the configuration.
Copy file name to clipboardExpand all lines: docs/zkEVM/how-to/using-foundry.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
@@ -183,6 +183,6 @@ The above command compiles and deploys the contract to the zkEVM Testnet. The ou
183
183
184
184
- Copy the address of your newly deployed contract (i.e. the `Deployed to:` address as in the above example output).
185
185
186
-
- Go to the [zkEVM Testnet Explorer](https://testnet-zkevm.polygonscan.com), and paste the address in the `Search by address` field.
186
+
- Go to the [zkEVM Testnet Explorer](https://cardona-zkevm.polygonscan.com/), and paste the address in the `Search by address` field.
187
187
188
188
- Check `Transaction Details` reflecting the `From` address, which is the owner's address and the `To` address, which is the same `Deployed to:` address seen in the CLI.
Copy file name to clipboardExpand all lines: docs/zkEVM/how-to/using-hardhat.md
+6-11Lines changed: 6 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This document is a guide on how to deploy a smart contract on the Polygon zkEVM
6
6
## Initial setup
7
7
8
8
!!!info
9
-
9
+
10
10
Before starting with this deployment, please ensure that your wallet is connected to the Polygon zkEVM Testnet. See the demo [here](../get-started/quick-start.md) for details on how to connect your wallet.
11
11
12
12
- Add the Polygon zkEVM Testnet to your Metamask wallet and get some Testnet ETH from the [Polygon Faucet](https://faucet.polygon.technology).
@@ -34,19 +34,14 @@ This document is a guide on how to deploy a smart contract on the Polygon zkEVM
34
34
```
35
35
36
36
- Populate the `.env.sample` file with your `ACCOUNT_PRIVATE_KEY`
37
+
???"How to get your private key in MetaMask"
38
+
Click the vertical 3 dots in the upper-right corner of Metamask window.
37
39
38
-
<details>
39
-
<summary>How to get your private key in MetaMask</summary>
40
-
41
-
- Click the vertical 3 dots in the upper-right corner of Metamask window
42
-
43
-
- Select **Account details** and then click **Export private key**
44
-
45
-
- Enter your Metamask password to reveal the private key
40
+
Select `Account details` and then click `Export private key`.
46
41
47
-
- Copy the private key and paste it into the `.env.sample` file.
42
+
Enter your Metamask password to reveal the private key.
48
43
49
-
</details>
44
+
Copy the private key and paste it into the `.env.sample` file.
50
45
51
46
- Copy the contents of the `.env.sample` file to the `.env` file,
0 commit comments