feat: make base fee computation parameters configurable via chain spec#3992
feat: make base fee computation parameters configurable via chain spec#3992mattsse merged 1 commit intoparadigmxyz:mainfrom roberto-bayardo:main
Conversation
rkrasiuk
left a comment
There was a problem hiding this comment.
got some minor comments, lgtm otherwise
|
Context: ported from op-rs#32 |
Codecov Report
... and 374 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@roberto-bayardo |
|
I tried to make everything consistent (with change_denomiator always preceeding elasticity) in my last commit but apparently missed updating next_block_base_fee ... thanks for the catch. fixed now. |
rkrasiuk
left a comment
There was a problem hiding this comment.
one last thing, otherwise lgtm
mattsse
left a comment
There was a problem hiding this comment.
supportive, but I'd like to make this a bit more ergonomic,
we can also add the inverse of the next_base_fee via ChainSpec::next_base_fee(&block) that could also be convenient
|
Closes #3750 |
mattsse
left a comment
There was a problem hiding this comment.
nice, only two pedantic nits
crates/primitives/src/basefee.rs
Outdated
There was a problem hiding this comment.
they can be passed as copy
| base_fee_params: &crate::BaseFeeParams, | |
| base_fee_params: crate::BaseFeeParams, |
There was a problem hiding this comment.
done, also changed next_block_base_fee to accept copy instead of reference.
crates/primitives/src/chain/spec.rs
Outdated
There was a problem hiding this comment.
| #[derive(Serialize, Deserialize, Debug, Clone)] | |
| #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] |
There was a problem hiding this comment.
thanks, also added "Copy" since we're now passing copies
Making these parameters configurable will, for example, allow chains to have a different gas target per block.