-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-op-rethRelated to Optimism and op-rethRelated to Optimism and op-rethA-rpcRelated to the RPC implementationRelated to the RPC implementationC-debtA clean up/refactor of existing codeA clean up/refactor of existing codeC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Description
Describe the feature
after #16927 we can move
reth/crates/optimism/consensus/src/validation/mod.rs
Lines 189 to 206 in ad8fec4
/// Read from parent to determine the base fee for the next block | |
/// | |
/// See also [Base fee computation](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/holocene/exec-engine.md#base-fee-computation) | |
pub fn next_block_base_fee( | |
chain_spec: impl EthChainSpec + OpHardforks, | |
parent: impl BlockHeader, | |
timestamp: u64, | |
) -> Result<u64, EIP1559ParamError> { | |
// If we are in the Holocene, we need to use the base fee params | |
// from the parent block's extra data. | |
// Else, use the base fee params (default values) from chainspec | |
if chain_spec.is_holocene_active_at_timestamp(parent.timestamp()) { | |
Ok(decode_holocene_base_fee(chain_spec, parent, timestamp)?) | |
} else { | |
Ok(chain_spec.next_block_base_fee(&parent, timestamp).unwrap_or_default()) | |
} | |
} | |
into next_block_base_fee
of OpChainSpec so that post holocene decoding is respected
TODO
- Call this fn from opchainspec's fn
Additional context
No response
Metadata
Metadata
Assignees
Labels
A-op-rethRelated to Optimism and op-rethRelated to Optimism and op-rethA-rpcRelated to the RPC implementationRelated to the RPC implementationC-debtA clean up/refactor of existing codeA clean up/refactor of existing codeC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Type
Projects
Status
Done