-
Notifications
You must be signed in to change notification settings - Fork 473
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
Better control of gas accounting #1823
base: master
Are you sure you want to change the base?
Conversation
default="static", | ||
description=( | ||
"Control how to keep the gas count" | ||
"insane: Keep static and dynamic gas including transaction fee VERY EXPENSIVE (INSANE)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, but can we make this "exhaustive"? Or, if you want to preserve the suggestion that it's over-the-top, perhaps "ludicrous"?
available_gas = self._gas | ||
available_gas -= fee | ||
|
||
exception = Operators.OR( | ||
Operators.UGT(fee, self._gas), | ||
Operators.ULT(self.safe_mul(available_gas, 63), available_gas), | ||
) | ||
self.fail_if(exception) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this line need to check the value of consts.gas
before deciding to raise the exception?
@feliam were you still hoping to merge this? I think those couple of nits are the only things blocking it. |
Add evm.gas configuration constant/variable/thing to control how to account gas. For example "static" will ignore all dynamic calculated fees. (This is different from evm.oog. The latter controls how and when to check for Out Of Gas)
Change rpl -> rust-rpl dependency.