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
Sometimes we always get the error {"jsonrpc":"2.0","error":"gas required exceeds allowance or always failing transaction"} when estimate gas from Remix IDE or RPC in general, although the transactions don't cause any execution error.
Currently if a transaction is reverting, EstimateGas will exhibit worst-case behavior and binary search up to the max gas limit (~40 state-clone + tx executions) which is very expensive and reducible.
We could consider is whether it's worth it to hone in on the exact gas usage needed, or if something "close enough" is enough. Currently by binary searching until hi == lo + 1, we're wasting a lot of executions to get the exact to-the-gas accuracy, which is unnecessary while most wallets will just add some random number on top to account for network conditions.
Most txs don't need much higher gas limit than their gas used, and most txs don't require near the full block limit of gas. So the selection of where to bisect the range is skewed to favour the low side.
The text was updated successfully, but these errors were encountered:
{"jsonrpc":"2.0","error":"gas required exceeds allowance or always failing transaction"}
when estimate gas from Remix IDE or RPC in general, although the transactions don't cause any execution error.hi == lo + 1
, we're wasting a lot of executions to get the exact to-the-gas accuracy, which is unnecessary while most wallets will just add some random number on top to account for network conditions.The text was updated successfully, but these errors were encountered: