Skip to content

debug_TraceBlockByNumber reports lower gasUsed than eth_getTransactionReceipt with Avalanchego v0.12.0 #1618

@jwelch-qn

Description

@jwelch-qn

Describe the bug
eth_getTransactionReceipt shows gasUsed for a specific transaction as: 1,014,929 while this debug_TraceBlockByNumber shows gasUsed: 970,713.

To Reproduce
Compare gasUsed for tx:0xd69a271d948cf87fc8d8e99568e82a5f87be11eb98b6ef25d01f90920613a54c
returned by:

curl <ENDPOINT_URL>/ext/bc/C/rpc \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"method":"debug_traceBlockByNumber","params":["0x1DD60D5", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' | jq . 

vs. gasUsed for that same tx with:

curl -s <ENDPOINT_URL>/ext/bc/C/rpc \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"method":"eth_getTransactionReceipt","params":["0xd69a271d948cf87fc8d8e99568e82a5f87be11eb98b6ef25d01f90920613a54c"],"id":1,"jsonrpc":"2.0"}' | jq .

Expected behavior
I would expect that gasUsed for a specific tx would be the same by any method that returns this data.

Operating System
Mac OS Ventura

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions