Skip to content
Egor Lysenko edited this page Mar 4, 2022 · 3 revisions

EVM

EVM in Opera works the same way as in Ethereum with the following exceptions:

  • 10% unspent gas gets spent as a disincentive against excessive transaction gas limits (see examples below) (1)
  • Transactions in blocks aren't sorted by gas price. Even though transactions in an event and txpool are sorted by gas price, events are sorted by their causality in the DAG (2)
  • Berlin and London upgrades are supported only in public testnet but not mainnet

(1) is required due to the usage of a leaderless aBFT consensus algorithm. There is no single proposer who would originate transactions for a block. This way, validator doesn't know in advance (unlike Ethereum miner) how much gas will be spent by a transaction during its on-chain execution

(2) is caused by the usage of a DAG aBFT consensus algorithm

Examples of penalty for excessive transaction gas limit

Case with perfect gas limit:

  • Transaction gas limit is 500000, and it used 500000 for its execution. Final gas used is 500000. Penalty is 0%.

Case with normal gas limit:

  • Transaction gas limit is 500000, and it used 490000 for its execution. Final gas used is 490000+(500000−490000)×0,1 = 491000. Penalty is 0.2%.

Case with excessive gas limit:

  • Transaction gas limit is 500000, and it used 21000 for its execution. Final gas used is 21000+(500000−21000)×0,1 = 68900. Penalty is 228%.
Clone this wiki locally