-
Notifications
You must be signed in to change notification settings - Fork 287
EVM
Egor Lysenko edited this page Mar 4, 2022
·
3 revisions
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
Case with perfect gas limit:
- Transaction gas limit is
500000
, and it used500000
for its execution. Finalgas used
is500000
. Penalty is 0%.
Case with normal gas limit:
- Transaction gas limit is
500000
, and it used490000
for its execution. Finalgas used
is490000+(500000−490000)×0,1 = 491000
. Penalty is 0.2%.
Case with excessive gas limit:
- Transaction gas limit is
500000
, and it used21000
for its execution. Finalgas used
is21000+(500000−21000)×0,1 = 68900
. Penalty is 228%.