Skip to content

Gap between different kinds of gas costs #664

@Arisawa-v

Description

@Arisawa-v

hello I’m measuring gas with debug_traceCall. My contract returns abi.encode(gasleft()).

With a very high gas limit I get:

Gross Gas Cost (start − final gasleft()): ~2.46M

Net Gas Cost (trace.gasUsed, maybe due to refunds): ~2.28M

But the tx only succeeds with at least 2.51M gas; setting the limit to ~gross OOGs. Calldata is short.

Is the gap between gross and non-OOG gas due to the EIP-150 63/64 rule? Is the gap between gross and net gas due to refunds? How do I correctly compute the minimal non-OOG gas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions