-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth_estimateGas fails on empty address #2804
Comments
This is the correct behaviour. Estimate gas RPC aligns with geth, and you will see the exact same behaviour on Ethereum. If the from address has no DFI, and it is trying to make a transaction, the RPC will propagate this error since you cant make transactions without any DFI. If you would like to create a state override setting to test a specfic context, please pass the state override set with the address-to-state mapping in the optional parameter in the eth_estimateGas RPC. |
thx. @sieniven it might be according to geth. but reality for exchanges is different it seems. |
@kuegi that is not true. Please verify again on your end that you are directly interacting with an ethereum node. With any ethereum node, the default behaviour returns an invalid response: In addition, as mentioned above, please note that our node supports the addition state override set customization in our eth calls RPC. In this specific context, it does not make sense to return a default gas transfer used in this RPC when the address is zero. That would actually make the RPC faulty and unreliable. Please pass the state override if you would like to set a defined context on your RPC call. |
@sieniven Account DFI amount is not enough will also report an error? |
thx for the reply. In the end, the issue is that we make it really hard for externals right now to integrate DMC as it behaves different. If its not an issue on the node itself, its an issue on the blockscouts? What can we do, to make it easier for exchanges to integrate DMC? If I do the same call on any public eth rpc that I find, I get a valid result. So its a bit hard to believe that this should not be the standard. |
@LXHLeaner Yup. https://www.quicknode.com/docs/ethereum/eth_estimateGas - you can check out the optional state override parameter that our node supports. |
https://ethereum-sepolia.publicnode.com public RPC endpoint behaviour aligns exactly the same as our node.
We have been making multiple PRs and fixes to fix all endpoints to align ourselves as much as we can with geth. geth is the most largest client with the most widespread user base. Actually the node has been making active steps to stability and full integration (PRs #2633, #2736, #2784, #2788, etc), more to come. Would be really helpful if the community could continue pointing out any integration issues with external web3 applications :) |
Does this call return something else on your side? If I call it, it returns a valid gas estimate:
returns
Thats what I am trying to do here. |
@kuegi Thanks for providing the context. This is much more useful, and this is indeed a bug when calling eth_estimateGas with a populated data field in the call context. Will be re-opening this issue. |
I run a public BSC Node without some additional layers and Version: |
This issue will be resolved once the PR #2808 is merged. |
Summary
eth_estimateGas returns
Custom error: gas required exceeds allowance 0
if the address has no DFI on it. But it should return the estimated gas.The text was updated successfully, but these errors were encountered: