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 #1769DoTheBestToGetTheBest wants to merge 3 commits intoalloy-rs:mainfrom
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.
I'd prefer this to not be optional
There was a problem hiding this comment.
and we also need this on BlochHeader trait
There was a problem hiding this comment.
and we also need this on
BlochHeadertrait
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.
we should introduce an additional helper like calc_blob_gasprice_with_update_fraction and use it here
There was a problem hiding this comment.
we should introduce an additional helper like
calc_blob_gasprice_with_update_fractionand use it here
thanks for your review!
| /// | ||
| /// See also [Self::next_block_excess_blob_gas] | ||
| #[deprecated( | ||
| since = "0.8.1", |
There was a problem hiding this comment.
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