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
andeth_newBlockFilter
RPC calls.
Opcode name | Ethereum | Linea | Explanation |
---|---|---|---|
BLOBHASH | Returns a versioned hash. | n/a | Unavailable on Linea due to being introduced in the Cancun upgrade. |
BLOBBASEFEE | Returns the value of the blob base-fee of the current block. | n/a | Unavailable on Linea due to being introduced in the Cancun upgrade. |
DIFFICULTY /PREVRANDAO | Returns the RANDAO value from the previous block | Returns a fixed number: 2 | In Ethereum, PREVRANDAO was previously known as DIFFICULTY . It was renamed to
PREVRANDAO in EIP-4399 and its functionality
changed due to the switch from PoW to PoS. PREVRANDAO returns a full 256-bit value that
represents the randomness beacon output of the previous block. For more, see the 'Security
Considerations' section of EIP-4399. |
MCOPY | Copies memory areas, allowing the destination and source to overlap. | n/a | Unavailable on Linea due to being introduced in the Cancun upgrade. |
PUSH0 | Pushes the constant value 0 onto the stack | Pushes the constant value 0 onto the stack if correct version of Solidity compiler is configured | The 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, recompile your contract using Solidity version 0.8.19 or lower. |
TLOAD | Load word from transient storage. | n/a | Unavailable on Linea due to being introduced in the Cancun upgrade. |
TSTORE | Save word to transient storage. | n/a | Unavailable on Linea due to being introduced in the Cancun upgrade. |
Consult the Ethereum Foundation's Opcode Reference for more.
Evmdiff is also a useful resource for comparing Linea with Ethereum.
Precompiles
Precompiles as transaction recipients
On Linea, transactions cannot set the recipient of a transaction (the address in to
) as a
precompile. The to
address of transactions cannot be in the range 0x01
-0x09
.
MODEXP
MODEXP
(0x05
) on Linea currently only supports arguments (base, exponent, modulus) that do not
exceed 512-byte integers.
Point evaluation
The point evaluation precompile was introduced in EIP-4844, and is therefore unavailable on Linea.