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
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
On a regular full node (Parity, for example), calling eth_estimateGas with an invalid contract transaction (ex. transfer ERC20 with insufficient funds) will end up receiving error code -32000; however, the current version of ganache-cli still returns a gas estimation as if the transaction will pass.
The issue seems only happen in more recent versions (Ganache CLI v6.5.1 (ganache-core: 2.6.1-beta.0)) because the previous version we used (Ganache CLI v6.2.5 (ganache-core: 2.3.3)) did return the expected error code like a full node.
I assumed it is a ganache-core bug but I could be wrong. Please feel free to let me know if I should move it to ganache-cli. Thanks!
Should get exception ValueError: {'code': -32000, 'message': 'gas required exceeds allowance or always failing transaction'} because the transaction should revert (not the owner of the DAI contract on mainnet)
Current Behavior
Got an estimated gas of 30204
Context
The issue causes inconsistent behaviors in our client on mainnet vs ganache, because it was expecting the gas estimation of an invalid tx to fail but it didn't happen on ganache.
Your Environment
Version used: Ganache CLI v6.5.1 (ganache-core: 2.6.1-beta.0)
Environment name and version: Python 3.7, web3.py 4.8.2
Operating System and version: Mac OS 10.14.4
The text was updated successfully, but these errors were encountered:
On a regular full node (Parity, for example), calling
eth_estimateGas
with an invalid contract transaction (ex. transfer ERC20 with insufficient funds) will end up receiving error code -32000; however, the current version ofganache-cli
still returns a gas estimation as if the transaction will pass.The issue seems only happen in more recent versions (
Ganache CLI v6.5.1 (ganache-core: 2.6.1-beta.0)
) because the previous version we used (Ganache CLI v6.2.5 (ganache-core: 2.3.3)
) did return the expected error code like a full node.I assumed it is a
ganache-core
bug but I could be wrong. Please feel free to let me know if I should move it toganache-cli
. Thanks!Steps to Reproduce (for bugs)
ganache-cli -f http://<your-full-node-ip>:<port>
Expected Behavior
Should get exception
ValueError: {'code': -32000, 'message': 'gas required exceeds allowance or always failing transaction'}
because the transaction should revert (not the owner of the DAI contract on mainnet)Current Behavior
Got an estimated gas of
30204
Context
The issue causes inconsistent behaviors in our client on mainnet vs ganache, because it was expecting the gas estimation of an invalid tx to fail but it didn't happen on ganache.
Your Environment
The text was updated successfully, but these errors were encountered: