erigon icon indicating copy to clipboard operation
erigon copied to clipboard

`debug_traceCall` not working if gas price is not enough or not set (behavior different from Geth)

Open zzh1996 opened this issue 4 years ago • 3 comments

Erigon version: 2022.02.02-beta OS & Version: Linux

Request:

curl http://127.0.0.1:8545/ -H "Content-Type: application/json" --data '{
        "method": "debug_traceCall",
        "params" :[
                {
                    "from": "0x0123456789012345678901234567890123456789",
                    "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "data": "0x",
                    "value": "0x0"
                },
                "latest", {"tracer": "callTracer"}
        ],
        "id": 0,
        "jsonrpc": "2.0"
}'

Erigon response:

{"jsonrpc":"2.0","id":0,"error":{"code":-32000,"message":"tracing failed: fee cap less than block base fee: address 0x0123456789012345678901234567890123456789, gasFeeCap: 0 baseFee: 54337541210"}}

Geth response:

{"jsonrpc":"2.0","id":0,"result":{"type":"CALL","from":"0x0123456789012345678901234567890123456789","to":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","value":"0x0","gas":"0x2fa9e78","gasUsed":"0xef7","input":"0x","output":"0x"}}

zzh1996 avatar Feb 12 '22 13:02 zzh1996

I think that's done to be consistent with OpenEthereum that handled traces this way. Imo its not ideal though, geths behavior here is better. Would love to see a flag on rpc deamon to mimic geths tracecall.

geomad avatar Feb 19 '22 00:02 geomad

I think that's done to be consistent with OpenEthereum that handled traces this way. Imo its not ideal though, geths behavior here is better. Would love to see a flag on rpc deamon to mimic geths tracecall.

Thanks for your reply. As far as I know, OE does not have this RPC. All OE tracing API starts with trace_. debug_traceCall is a geth API.

zzh1996 avatar Feb 19 '22 04:02 zzh1996

Is anyone having issues using debug_traceCall with archive blocks? I'm getting:

{"jsonrpc":"2.0","id":1,"result":null,"error":{"code":-32000,"message":"block 18992271(9c7cb3118bc32a473de8ed2cc98d8a3ba7e616a518db75b2beaa483dc2823809) not found"}}

But the block is available via eth_getBlockByNumber on 2022.07.3

This is with BSC Mainnet

quickchase avatar Aug 17 '22 19:08 quickchase

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

github-actions[bot] avatar Jun 14 '23 02:06 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jun 26 '23 02:06 github-actions[bot]

Any plan to fix this? It would make sense that it behaves the same as Geth.

soos3d avatar Apr 05 '24 21:04 soos3d

Hello Team! Any updates on this? Would love to see a fix for this.

dwampa avatar May 13 '24 11:05 dwampa