Closed serejke closed 1 year ago
Since the fee of Axon is fixed, Axon returns None
currently. We will fix it soon. Thank you for your opinion.
@KaoImin any update on this issue? I checked on v0.1.0-alpha.8
and this still returns reward: null
:
Given a POST request:
curl -X POST --location "http://localhost:65476" \
-H "Content-Type: application/json" \
-d "{
\"id\": 1,
\"jsonrpc\": \"2.0\",
\"method\": \"eth_feeHistory\",
\"params\": [\"0xa\", \"latest\", [5.0]]
}"
the result is:
{
"jsonrpc": "2.0",
"result": {
"oldestBlock": "0x0",
"reward": null,
"baseFeePerGas": [],
"gasUsedRatio": []
},
"id": 1
}
this is a quite serious problem. Some clients (Hyperlane) rely on the fact that this method would throw an HTTP error instead of returning non-parseable JSON result.
Hello @hongda3141. Please fix this bug.
Contact Details
No response
Current Behavior
Problem
Axon node implements
eth_feeHistory
RPC endpoint but returns"reward": null
field.For example, given a curl:
according to this line: https://github.com/axonweb3/axon/blob/d7d880082d05376b20ab84ad37e25626db44e132/core/api/src/jsonrpc/impl/web3.rs#L615
the response is:
Some JSON RPC clients are not ready for
null
value and fail to parse the response.For example, I use Foundry's
cast
send command to my local node:it fails with the following error:
Solution
Exclude
null
values from responses. The Ethereum RPC spec is not strict on the return results but I supposenull
values should be ommitted.Expected Behavior
Expected Behavior:
OS
MacOS
Axon version
No response
Kernel
MacOS
Relevant log output
No response
Anything else?
No response