You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that all three API endpoints (Infura/RPCDaemon/Silkrpc) return the same response to eth_blockNumber (sanity check)
Compare how the three API endpoints (Infura/RPCDaemon/Silkrpc) answer to eth_gasPrice
Analysis
The difference in RPCDaemon response is always some multiplier of the block baseFee (currently 7 wei on Goerli) and seems to depend on two factors:
the sorting performed in the transaction gas price heap, which triggers calls to function Less. Such function in turn calls function GetEffectiveGasTip for DynamicFeeTransaction and for LegacyTx where gasFeeCap and consequently GasPrice attribute is decremented by baseFee at every call: effectiveFee := gasFeeCap.Sub(gasFeeCap, baseFee), hence the first missing pieces depending on the number of Less calls.
the SuggestPrice function used to implement the eth_gasPrice API requires adding baseFee to the returned value to obtain the legacy gas price, which is the expected result according to Geth, given that AFAIK a formal behavior is not spec'd. However, the calling GasPrice function does not add such contribute to the returned price, hence the second missing piece.
The text was updated successfully, but these errors were encountered:
System information
Erigon version: 2021.08.1-alpha
OS & Version: Linux Ubuntu 20.04.2 LTS
Commit hash : 12982b2
Expected behaviour
Response to
eth_gasPrice
API in Goerli testnet is the same using:Actual behaviour
RPCDaemon+Erigon gives a different result from Infura and Sillkrpc-Erigon (which give the same result). E.g. at block number 0x502087
Infura: {"jsonrpc":"2.0","id":1,"result":"0x12a05f200"}
Silkrpc: {"id":1,"jsonrpc":"2.0","result":"0x12a05f200"}
RPCDaemon: {"jsonrpc":"2.0","id":1,"result":"0x12a05f1dd"}
Steps to reproduce the behaviour
eth_blockNumber
(sanity check)eth_gasPrice
Analysis
The difference in RPCDaemon response is always some multiplier of the block
baseFee
(currently 7 wei on Goerli) and seems to depend on two factors:Less
. Such function in turn calls function GetEffectiveGasTip for DynamicFeeTransaction and for LegacyTx wheregasFeeCap
and consequentlyGasPrice
attribute is decremented bybaseFee
at every call:effectiveFee := gasFeeCap.Sub(gasFeeCap, baseFee)
, hence the first missing pieces depending on the number of Less calls.eth_gasPrice
API requires addingbaseFee
to the returned value to obtain the legacy gas price, which is the expected result according to Geth, given that AFAIK a formal behavior is not spec'd. However, the calling GasPrice function does not add such contribute to the returned price, hence the second missing piece.The text was updated successfully, but these errors were encountered: