The EVM Bytecode Interpreter is a key component of Sophon’s v27 upgrade, enabling true EVM equivalence by allowing the direct execution of unmodified EVM bytecode on Sophon’s zkEVM.
EVM equivalence means that a blockchain can execute standard EVM bytecode directly, providing:
Identical behavior to Ethereum’s EVM in all aspects
Identical address derivation for contract deployments
Full compatibility with standard Ethereum development tools
No requirement for special compilation or adaptation
This is different from mere “EVM compatibility,” which typically requires specialized tooling or compilation steps. For more details, see the official EVM Interpreter page.
The EVM Bytecode Interpreter serves as a crucial system contract that enables the execution of standard EVM bytecode on Sophon’s zkEVM, ensuring EVM equivalence. This involves:
Effortless Contract Deployment: Deploy contracts just as you would on Ethereum, using transactions without a to field and embedding contract initialization code as calldata. This process guarantees identical address derivation and behavior as on Ethereum.
Comprehensive Tool Compatibility: Utilize standard Ethereum development tools like Hardhat and Foundry without needing additional plugins or modifications.
Transparent Execution: The interpreter operates behind the scenes, invoked automatically by the protocol.
Contracts deployed in this manner are flagged as EVM bytecode and executed through the EVM interpreter. During execution, the contract’s EVM opcodes are translated into the ZKsync VM’s instruction set and executed by the ZKsync VM.
Contracts in Sophon are identified through their “versioned hash” in the AccountCodeStorage:
zkEVM contracts: Version 0x01
EVM contracts: Version 0x02
You can check if a contract was deployed with EVM bytecode by calling the isAccountEVM(address) function on the AccountCodeStorage system contract at 0x0000000000000000000000000000000000008002.
The EVM Bytecode Interpreter targets the Cancun EVM version. This means it includes Cancun’s opcodes and features, but may not include future Ethereum upgrades immediately.
While the v27 upgrade with the EVM Bytecode Interpreter brings Sophon much closer to true EVM equivalence, complete equivalence is expected with the next proving system. The current implementation covers most developers’ needs but does have some limitations due to the underlying zkEVM architecture.
Sophon’s zkEVM is a specialized virtual machine designed to execute smart contracts while generating zero-knowledge proofs of execution. It:
Maintains compatibility with most Ethereum smart contracts
Optimizes operations for efficient ZK-proof generation
Extends functionality with features like paymasters and account abstraction
The EVM Bytecode Interpreter builds on this foundation to provide true EVM equivalence while maintaining the benefits of the underlying zkEVM architecture.