Tangerine Whistle
Gas cost repricing to prevent DoS attacks
EIPs Changing Gas Costs
- EIP-150: Reprices opcodes that can be used for DoS attacks.
| Operation | Gas Cost |
|---|---|
arithmetic ADD | 3 |
arithmetic ADDMOD | 8 |
arithmetic AND | 3 |
arithmetic BYTE | 3 |
arithmetic DIV | 5 |
arithmetic EQ | 3 |
arithmetic EXP | 10 |
arithmetic GT | 3 |
arithmetic ISZERO | 3 |
arithmetic LT | 3 |
arithmetic MOD | 5 |
arithmetic MUL | 5 |
arithmetic MULMOD | 8 |
arithmetic NOT | 3 |
arithmetic OR | 3 |
arithmetic SDIV | 5 |
arithmetic SGT | 3 |
arithmetic SHA3 | 30 |
arithmetic SHA3 word | 6 |
arithmetic SIGNEXTEND | 5 |
arithmetic SLT | 3 |
arithmetic SMOD | 5 |
arithmetic SUB | 3 |
arithmetic XOR | 3 |
base G base | 2 |
base G high | 10 |
base G low | 5 |
base G mid | 8 |
base G verylow | 3 |
base G zero | 0 |
blockchain BALANCE | 400 |
blockchain BLOCKHASH | 20 |
blockchain COINBASE | 2 |
blockchain DIFFICULTY | 2 |
blockchain GASLIMIT | 2 |
blockchain NUMBER | 2 |
blockchain TIMESTAMP | 2 |
flow GAS | 2 |
flow JUMP | 8 |
flow JUMPDEST | 1 |
flow JUMPI | 10 |
flow MSIZE | 2 |
flow PC | 2 |
memory G memory | 3 |
memory G quadraticmemdenom | 512 |
memory MLOAD | 3 |
memory MSTORE | 3 |
memory MSTORE8 | 3 |
precompiles ECRECOVER | 3000 |
precompiles IDENTITY | 15 |
precompiles IDENTITY word | 3 |
precompiles RIPEMD160 | 600 |
precompiles RIPEMD160 word | 120 |
precompiles SHA256 | 60 |
precompiles SHA256 word | 12 |
stack DUP | 3 |
stack POP | 2 |
stack PUSH | 3 |
stack SWAP | 3 |
storage SCLEAR refund | 15000 |
storage SLOAD | 200 |
storage SSTORE refund | 15000 |
storage SSTORE reset | 5000 |
storage SSTORE set | 20000 |
system CALL | 700 |
system CALLCODE | 700 |
system CALL new account | 25000 |
system CALL value transfer | 9000 |
system CREATE | 32000 |
system DELEGATECALL | 700 |
system EXTCODECOPY | 700 |
system EXTCODESIZE | 700 |
system RETURN | 0 |
system SUICIDE | 5000 |
system SUICIDE refund | 24000 |
transaction G transaction | 21000 |
transaction G txcreate | 32000 |
transaction G txdatanonzero | 68 |
transaction G txdatazero | 4 |