EVM Compatibility
Last updated
Last updated
zkLink Nova achieves EVM compatiblity by leveraging the technology of ZK Stack, a modular, open-source framework based on the code of zkSync Era.
According to Vitalik Buterin, EVM compatibility can be segmented into four types. The zkEVM of ZK Stack is categorized as a Type 4 system in the taxonomy of zkEVMs. Its EVM compatibility works by taking smart contract source code written in high-level languages and compiling it to a language designed to be zk-SNARK-friendly.
ZK Stack supports smart contracts written in Solidity or Vyper. It uses custom compilers, namely zksolc for Solidity and zkvyper for Vyper, which ensure compatibility and efficient execution of smart contracts. More importantly, zkSync provides developers with a smooth experience, offering tools for testing locally and compatibility with existing frameworks like Hardhat and Foundry.
As a Type 4 system, ZK Stack prioritizes performance by bypassing the need to Zero-Knowledge prove every aspect of EVM execution. Instead, it starts directly from higher-level code. This approach leads to more incompatibility compared to systems that closely replicate the EVM. For instance, contracts may not have the same addresses as they do in the EVM, and handwritten EVM bytecode is more difficult to use.
To sum this up, zkLink Nova based on ZK Stack (zkSync Era) is EVM compatible, meaning it supports a significant portion of Ethereum's EVM opcodes, allowing most smart contracts to work seamlessly. However, it's not EVM equivalent, as it doesn't support every opcode down to the bytecode level.
You can find the differences from Ethereum from the documentation of ZK Stack.
Please note some EVM cryptographic precompiles (notably pairings and RSA) aren't currently available.
Ethereum cryptographic primitives like ecrecover
, keccak256
, sha256
, ecadd
and ecmul
are supported as precompiles.