velas/evm

Gas calculation in tracer

Opened this issue · 0 comments

gBaGu commented
  1. Tracer doesn't count call opcode:
    In transact_call() gas recorded before calling tracer.start_call(). Is this an intended behaviour?

  2. Tracer doesn't count refund:
    call_inner() is using self.gas_left() to calculate gas consumption for a trace but self.gas_left() doesn't count refunded gas which leads to trace with gas_used bigger then transaction used gas.

  3. When setting gas_limit to exact gas amount transaction will use, transaction will fail if there will be refund during execution.