The Execution Engine (op-geth)

What is op-geth ? op-geth is a fork of vanilla go-ethereum (Geth) intended to maintain maximal Ethereum equivalence, it introduces several fundamental modifications to support Layer 2 rollup functionality

How does op-geth differ from geth

  1. New Transaction Type (Deposits): op-geth implements a unique Deposit transaction type (0x7E). Unlike standard transactions, deposits are derived from Layer 1 events and do not include signature validation, as they are authenticated by the rollup node. They can also mint L2 ETH based on L1 deposits.
  2. Modified Fee Structure: In vanilla Geth, EIP-1559 base fees are burned; in op-geth, base fees are collected in a BaseFeeVault. Additionally, op-geth charges a unique L1 data fee (L1-cost) to cover the expense of submitting transaction data to the Layer 1 Ethereum network.
  3. Engine API Extensions: To support deterministic block derivation, the Engine API is extended with a Transactions field to force a specific list of transactions into a block and a noTxPool flag to bypass the transaction pool entirely during block production.
  4. Gas Limit Adjustments: In vanilla Geth, the gas limit adjusts incrementally by 1/1024 per block. In the OP Stack, the gas limit can adjust instantly to any value specified by the consensus layer through the SystemConfig contract.
  5. EVM and Precompile Additions: op-geth includes the P256VERIFY precompile (at address 0x100) for secp256r1 signature verification, which is not present in standard Geth versions prior to the Osaka fork. Conversely, op-geth disables EIP-4844 blob transactions on Layer 2, and the BLOBBASEFEE opcode is modified to always push a value of 1.
  6. P2P Networking Identification: To ensure Layer 2 nodes do not attempt to peer with Layer 1 nodes, op-geth modifies the Ethereum Node Record (ENR) to include a unique opel key-value pair.
  7. Handling Failed Transitions: While standard Geth would reject a block with an invalid state transition, op-geth allows failed deposits to be included in blocks. In such cases, the EVM state changes are rolled back (except for the initial ETH mint), and the sender’s nonce is incremented to ensure the chain continues to progress.
  8. Fault Proof Compatibility: op-geth supports a single-threaded execution mode to remain compatible with the requirements of the Fault Proof Virtual Machine (Cannon), which does not support the creation of additional threads