Skip to content

Commit d67ca64

Browse files
authored
Merge pull request 0xPolygon#224 from 0xPolygon/empieichO-docs-review
Update zkEVM - Etrog, EVM diffs & Historical data
2 parents 327ad76 + 952a67d commit d67ca64

File tree

3 files changed

+47
-54
lines changed

3 files changed

+47
-54
lines changed

docs/zkEVM/architecture/protocol/etrog-upgrade.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,42 @@ The below table displays Polygon zkEVM's precompiled status.
4040

4141
![Figure: etrog-precompiled](../../../img/zkEVM/etrog-precompiled.png)
4242

43+
44+
45+
46+
47+
#### Supported opcodes
48+
49+
50+
51+
| `OPCODE` | Support status | Details |
52+
| ---------------- | -------------- | ------------------------------------------------------------ |
53+
| `SELFDESTRUCT` | Not supported | Replaced by **SENDALL**. |
54+
| `EXTCODEHASH` | Supported | It returns the hash of the contract bytecode from the zkEVM state tree without checking if the account is empty. |
55+
| `DIFFICULTY` | Supported | It returns "0" instead of a random number as in the EVM. |
56+
| `BLOCKHASH` | Supported | It is the state root at the end of a processable transaction and is stored on the system smart contract. It returns all previous block hashes instead of just the last 256 blocks. |
57+
| `NUMBER` | Supported | It returns the number of processable transactions. |
58+
| `JUMPDEST` | Supported | It is allowed in PUSH bytes to avoid runtime bytecode analysis. |
59+
| `BASEFEE` | Not supported | The zkEVM implements the Berlin hardfork, but not the London hardfork. |
60+
61+
62+
63+
#### EIPs support
64+
65+
66+
67+
| EIPs | Hardfork | Support status | Description |
68+
| -------- | -------- | -------------- | ------------------------------------------------------------ |
69+
| EIP-2718 | Berlin | Not supported. | Defines a new transaction type that is an envelope for future transaction types.[^e1] |
70+
| EIP-2930 | Berlin | Not supported. | Defines the Optional Access Lists transaction type.[^e2] |
71+
| EIP-3541 | London | Supported. | Reject new contract code starting with the 0xEF byte.[^e3] |
72+
73+
74+
#### Additions
75+
76+
**zk-counters** indicate batch resources that are available, linked to state-machine components, as a supplementary addition to gas computation.
77+
78+
4379
## Dragonfruit issues
4480

4581
Dragonfruit upgrade inherited from its predecessors the configuration that each block in the zkEVM is equivalent to one L2 transaction.
@@ -85,3 +121,9 @@ The Etrog upgrade comes with groundbreaking amendments aimed at improving UX and
85121
- Allowing granularity on the timestamp within a batch.
86122

87123
Attaining the Type-2 status is remarkable.
124+
125+
126+
127+
[^e1]: https://eips.ethereum.org/EIPS/eip-2718
128+
[^e2]: https://eips.ethereum.org/EIPS/eip-2930
129+
[^e3]: https://eips.ethereum.org/EIPS/eip-3541

docs/zkEVM/get-started/historical-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ Join discussions or ask questions on Telegram: https://t.me/polygonzkevm_technic
44

55

66

7-
### 12th Feb, 2024
7+
### 13th Feb, 2024
88

99
**zkEVM mainnet Upgrade: Etrog hardfork**
1010

1111
This upgrade brings the Polygon zkEVM to being almost a type 2 ZK-EVM. See further details [here](../architecture/protocol/etrog-upgrade.md)
1212

1313
| | Version |
1414
| :-------------: | :----------------------------------------------------------: |
15-
| Node | v0.5.6 |
16-
| Prover | v4.0.4 |
15+
| Node | v0.5.8 |
16+
| Prover | v4.0.8 |
1717
| Bridge | v0.4.0 |
18-
| Change logs url | https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.7 |
18+
| Change logs url | https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.8 |
1919
| Supported ForkIDs | Mainnet & Cardona: ForkIDs 4, 5, 6 & 7. Testnet (Goerli): ForkIDs 1, 2, 3, 4, 5 & 6. |
2020

2121

docs/zkEVM/spec/evm-differences.md

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This document provides a comprehensive list of differences between the EVM and the Polygon zkEVM. The list includes supported EIPs, opcodes, and additional changes made when building the Polygon zkEVM.
1+
This document provides brief remarks on the differences between the EVM and the Polygon zkEVM. Lists of supported and unsupported EIPs, opcodes, and additional changes made when building the Polygon zkEVM, can be found [here](../architecture/protocol/etrog-upgrade.md).
22

33
### EVM-equivalence
44

@@ -24,58 +24,9 @@ EVM-equivalence is critical to Polygon zkEVM for several reasons, including the
2424

2525
Ultimately, Polygon zkEVM offers developers the same UX as on Ethereum, with significantly improved scalability.
2626

27-
28-
!!!info
29-
No impact on developer experience
30-
31-
Note that the following differences have no impact on the developer experience with the zkEVM as compared to the EVM. Gas optimization techniques, interacting with libraries like Web3.js and Ethers.js, and deploying contracts work seamlessly on the zkEVM without any overhead.
32-
3327
The following differences have no impact on the developer's experience on the zkEVM compared to the EVM:
3428

3529
- Gas optimization techniques.
3630
- Interacting with libraries, like Web3.js and Ethers.js.
3731
- Deploying contracts seamlessly on the zkEVM without any overhead.
3832

39-
40-
### Opcodes
41-
42-
Below is a list of the changes we have made to opcodes in zkEVM in comparison to the EVM.
43-
44-
- **SELFDESTRUCT** → removed and replaced by **SENDALL**.
45-
46-
- `EXTCODEHASH` returns the hash of the contract bytecode from the zkEVM state tree without checking if the account is empty.
47-
48-
- **DIFFICULTY** → returns "0" instead of a random number as in the EVM.
49-
50-
- **BLOCKHASH** → returns all previous block hashes instead of just the last 256 blocks.
51-
52-
> **BLOCKHASH** is the state root at the end of a processable transaction and is stored on the system smart contract.
53-
54-
- **NUMBER** → returns the number of processable transactions.
55-
56-
57-
### Precompiled contracts
58-
59-
Among Ethereum's precompiled contracts, the zkEVM currrently supports: [`ecRecover`](https://www.evm.codes/precompiled?fork=shanghai) and [`identity`](https://www.evm.codes/precompiled?fork=shanghai).
60-
61-
Other precompiled contracts have no effect on the zkEVM state tree and are treated as reverts, returning all gas to the previous context and setting the `success` flag to "0".
62-
63-
64-
## Additions
65-
66-
**zk-counters** → batch resources are available, linked to state-machine components, as a supplementary addition to gas computation.
67-
68-
69-
## Other minor differences
70-
71-
- zkEVM doesn't clean storage when a contract is deployed at an address due to the zkEVM state tree specification.
72-
73-
- `JUMPDEST` is allowed in push bytes to avoid runtime bytecode analysis.
74-
75-
- The zkEVM implements [EIP-3541](https://eips.ethereum.org/EIPS/eip-3541) from the [London hardfork](https://ethereum.org/en/history/#london).
76-
77-
- [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) which defines the Typed Transaction Envelope, is not supported
78-
79-
- [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930), which defines the Optional Access Lists transaction type, is not supported.
80-
81-
- [`BASEFEE`](https://ethereum-org-fork.netlify.app/en/developers/docs/gas#base-fee) opcode is not supported. The zkEVM implements the Berlin hardfork, but not the London hardfork.

0 commit comments

Comments
 (0)