evm
evm copied to clipboard
Don't ignore gasometer's record_cost() error
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!
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.
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.