-
Notifications
You must be signed in to change notification settings - Fork 131
feat(l2): implement operator fee #4725
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
Conversation
This reverts commit 40948ec.
crates/vm/backends/levm/mod.rs
Outdated
| } | ||
| } | ||
|
|
||
| pub fn claculate_gas_price_for_tx( |
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.
| pub fn claculate_gas_price_for_tx( | |
| pub fn calculate_gas_price_for_tx( |
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.
Thanks! 121f052
crates/vm/backends/levm/mod.rs
Outdated
| env.block_gas_limit = i64::MAX as u64; // disable block gas limit | ||
|
|
||
| adjust_disabled_base_fee(&mut env); | ||
| adjust_disabled_base_fee(&mut env, &mut vm_type); |
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.
Instead of receive a mutable VMType, we could create a new one with the same config but the fee_operator in case gas_price is 0. That seems a bit cleaner
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 this better? 8822d68
Motivation
Introduce a new fee type:
operator fee.It behaves like the base fee (multiplied by the gas used) and is sent to the operator fee vault.
I suggest reading
transaction_fees.mdbefore reviewing the PR.Closes #4694