Skip to main content

Differences between Ethereum and Linea

EVM opcodes


Linea uses the London version of the Ethereum Virtual Machine (EVM). All EVM opcodes are managed identically to Ethereum London unless presented in the following table.

Solidity 8.23 and later compiles newer versions of the EVM by default. Use the solc --evm-version london command to ensure compatibility with Linea.

Check out Ethereum's history to learn about major milestones, forks, and updates to the blockchain.

⚠️ At the moment we do not support the eth_newFilter and eth_newBlockFilter RPC calls.

Opcode nameEthereumLineaExplanation
DIFFICULTY / PREVRANDAOReturns the RANDAO value from the previous blockReturns a fixed numberIn Ethereum, PREVRANDAO was previously known as DIFFICULTY. However, through the implementation of EIP-4399, it was renamed to PREVRANDAO, and its functionality changed due to the switch from PoW to PoS. Notably, it is a full 256-bit value that represents the randomness beacon output of the previous block. For more, see the 'Security Considerations' section of the above EIP.
PUSH0Pushes the constant value 0 onto the stackPushes the constant value 0 onto the stack if Solidity compiler compatibility is implementedThe PUSH0 opcode compatibility was introduced in Solidity compiler version 0.8.20, which came after the London release. However, Linea currently supports Solidity compiler version 0.8.19 and lower, which aligns with the London release of the Ethereum mainnet. To resolve this issue, please recompile your contract using Solidity version 0.8.19 or lower.

Consult the Ethereum Foundation's Opcode Reference for more.