-
Notifications
You must be signed in to change notification settings - Fork 49
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
fix(gas): amortize evm transaction fixed cost over bundle #442
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more.
|
where | ||
I: Iterator<Item = &'a UserOperation>, | ||
{ | ||
let ov = GasOverheads::default(); |
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.
somewhat unnecessary duplication since we are creating the GasOverheads
object both here and within user_operation_gas_limit
, but favoring this over needing to make GasOverheads
public.
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.
Since we're doing this here, we might as well do the same thing in calc_static_pre_verification_gas
?
Either we make it part of both the interfaces, or we instantiate in each.
Again I eventually want these to look like bundle_gas_limit<C: ChainSpec>
and then you can get these constants off of the chain spec.
+ U256::from(5_000) | ||
+ U256::from(21_000), |
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.
Is it possible to get these from some common place? Tests will break if we ever modify these values.
These are the sorts of things I want to move to the ChainSpec
config class in the future.
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.
Changed to exposing the relevant fields of GasOverheads
, it's not great but just avoiding a major refactor for now.
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.
#349
Proposed Changes