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

Don't ignore gasometer's record_cost() error #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

notlesh
Copy link
Contributor

@notlesh notlesh commented Apr 23, 2021

This fixes a problem where a precompile that returns gas exceeding the remaining gas is ignored. Instead of getting an OOG error, no gas is recorded -- effectively the precompile invocation is a freebie!

@notlesh
Copy link
Contributor Author

notlesh commented Apr 23, 2021

This may still be wrong because we should consume all remaining gas at this point. It's actually indicative of a poorly designed precompile; the precompile should have estimated gas and done a proper check before attempting an expensive computation.

@sorpaas
Copy link
Member

sorpaas commented May 28, 2021

Yeah this should actually be an error of Fatal::ConstaintFailed. The interpreter basically doesn't know what to do next and it indicates a logic error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants