requestNetwork icon indicating copy to clipboard operation
requestNetwork copied to clipboard

fix(eip1559): use hex number for eth_feehistory 'blockcount' parameter

Open alexandre-abrioux opened this issue 3 years ago • 5 comments

🚨 https://github.com/rainbow-me/fee-suggestions/pull/25 is needed before merging this PR.

Description of the changes

Quicknode's RPC servers do not allow the use of an integer for the blockCount argument of eth_feeHistory. Indeed, the doc specifies that it should be an hexadecimal number: https://infura.io/docs/ethereum#operation/eth_feeHistory Infura and Alchemy are more permissive in this regard.

This change will use the hex string instead of an integer to check if eth_feeHistory is supported on the RPC backend.

We need to wait for an update of the rainbow-me/fee-suggestions library before merging this because this library is using an integer and not a hex string in its RPC calls. If we merged this PR right away we would generate errors when running the request-node against Quicknode's backend.

alexandre-abrioux avatar Feb 08 '22 13:02 alexandre-abrioux

So why not switch first to Alchemy RPC ?

bertux avatar Feb 15 '22 10:02 bertux

@bertux Infura & Alchemy do not support the Gnosis Chain. But this PR is not urgent since the original issue was that we were not calling the GasPriceDefiner in TheGraphStorage, so we were using a gas price that was too low sometimes, and this was fixed in https://github.com/RequestNetwork/requestNetwork/pull/760.

alexandre-abrioux avatar Feb 15 '22 14:02 alexandre-abrioux

Marking this as Draft, PR is stale

alexandre-abrioux avatar May 23 '22 07:05 alexandre-abrioux

rebased to fix conflicts following refactor in https://github.com/RequestNetwork/requestNetwork/pull/931

alexandre-abrioux avatar Oct 07 '22 09:10 alexandre-abrioux

Coverage Status

Coverage: 87.784%. Remained the same when pulling d01e8fe30cdc47991d734d382c34060ac7c11a07 on fee-history-hex into 35f2edee22fbc68c06abc7c455e8d58e9c7717b1 on master.

coveralls avatar Oct 07 '22 09:10 coveralls

https://github.com/rainbow-me/fee-suggestions/pull/25 has been merged, and the lib has been updated by @leoslr in https://github.com/RequestNetwork/requestNetwork/pull/1072, merging this now

alexandre-abrioux avatar Mar 08 '23 14:03 alexandre-abrioux