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
|`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 |
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).
2
2
3
3
### EVM-equivalence
4
4
@@ -24,58 +24,9 @@ EVM-equivalence is critical to Polygon zkEVM for several reasons, including the
24
24
25
25
Ultimately, Polygon zkEVM offers developers the same UX as on Ethereum, with significantly improved scalability.
26
26
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
-
33
27
The following differences have no impact on the developer's experience on the zkEVM compared to the EVM:
34
28
35
29
- Gas optimization techniques.
36
30
- Interacting with libraries, like Web3.js and Ethers.js.
37
31
- Deploying contracts seamlessly on the zkEVM without any overhead.
38
32
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