-
Notifications
You must be signed in to change notification settings - Fork 253
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
feat: Make next_block_blob_fee functions accept an update fraction parameter #1769
feat: Make next_block_blob_fee functions accept an update fraction parameter #1769
Conversation
crates/consensus/src/block/header.rs
Outdated
/// # Panics | ||
/// | ||
/// - Panics if `update_fraction` is provided and not within the range [0.0, 1.0]. | ||
pub fn next_block_blob_fee_with_fraction(&self, update_fraction: Option<f64>) -> Option<u128> { |
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.
I'd prefer this to not be optional
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.
and we also need this on BlochHeader
trait
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.
and we also need this on
BlochHeader
trait
thanks, everything done!
crates/consensus/src/block/header.rs
Outdated
let excess_blob_gas = self.next_block_excess_blob_gas()?; | ||
let adjusted_blob_gas = (excess_blob_gas as f64 * fraction) as u64; | ||
|
||
Some(eip4844::calc_blob_gasprice(adjusted_blob_gas)) |
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.
we should introduce an additional helper like calc_blob_gasprice_with_update_fraction
and use it here
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.
we should introduce an additional helper like
calc_blob_gasprice_with_update_fraction
and use it here
thanks for your review!
@@ -214,10 +214,39 @@ impl Header { | |||
/// Returns `None` if `excess_blob_gas` is None. | |||
/// | |||
/// See also [Self::next_block_excess_blob_gas] | |||
#[deprecated( | |||
since = "0.8.1", |
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.
not sure if you are okay with this version the current one is 0.8.0 so for the next one is 0.8.1;
lmk if you want me to change or remove this
ping @klkvr |
yeah sorry @DoTheBestToGetTheBest, this is superseded by #1828 |
closes #1766