Skip to content
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

fails to clear mapping storage slots #257

Closed
benjamincburns opened this issue Jan 30, 2018 · 9 comments
Closed

fails to clear mapping storage slots #257

benjamincburns opened this issue Jan 30, 2018 · 9 comments

Comments

@benjamincburns
Copy link
Contributor

Another one from our archives which is likely misattributed to Ganache: trufflesuite/ganache#294

@axic
Copy link
Member

axic commented Jan 30, 2018

It would be very beneficial creating actual test cases for these and submitting them to https://github.com/ethereum/tests.

ethereumjs-vm passes those tests and if they are actually bugs, they should be part of the official test suite. This applies to the other issue too.

@benjamincburns
Copy link
Contributor Author

benjamincburns commented Jan 31, 2018

Agreed, though I'm somewhat time-limited at the moment. I'll do my best to circle back around to this in the next couple weeks if nobody else picks it up in the interim.

@axic
Copy link
Member

axic commented Jan 31, 2018

cc @winsvega

@benjamincburns
Copy link
Contributor Author

"The other one" was #255

@winsvega
Copy link

winsvega commented Feb 1, 2018

Looks like a solidity issue

@hugo-dc
Copy link
Contributor

hugo-dc commented Feb 3, 2018

I checked this problem and here is what I've found so far: When you clear storage you get gas refund, so, when ganache executes eth_estimateGas the estimated gas considers the gas refund and at the end the total gas is less than the base fee, this is why when executing the real transaction with a low gas limit ethereumjs-vm is throwing that error.

Should ganache check that the estimated gas is not lower than the base fee?

@axic
Copy link
Member

axic commented Feb 3, 2018

Gas refunds should not be taken int consideration by estimateGas as they are only returned after the transaction has finished.

@cdetrio
Copy link
Contributor

cdetrio commented Feb 4, 2018

this would be a good test case for the eth_estimateGas rpc method ethereum/EIPs#217.

@holgerd77
Copy link
Member

Referenced Ganache issue is now closed, seemed to be VM unrelated. Will close, feel free to reopen if necessary.

holgerd77 added a commit that referenced this issue Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants