Skip to content

Support optional metadata for DisplayHardforks #19345

@mattsse

Description

@mattsse

Describe the feature

currently we log:

- Shanghai                         @0
- Cancun                           @0
- Prague                           @0
- Osaka                            @15000

/// Creates a new [`DisplayHardforks`] from an iterator of hardforks.
pub fn new<'a, I>(hardforks: I) -> Self
where
I: IntoIterator<Item = (&'a dyn Hardfork, ForkCondition)>,
{

but ideally we also want to log the blob settings:

INFO [10-27|13:09:17.657]  - Cancun:                      @0          blob: (target: 3, max: 6, fraction: 3338477)
INFO [10-27|13:09:17.657]  - Prague:                      @0          blob: (target: 6, max: 9, fraction: 5007716)
INFO [10-27|13:09:17.657]  - Osaka:                       @15000      blob: (target: 6, max: 9, fraction: 5007716)

to do this we need to add optional metadata to displayhardfork

struct DisplayFork {
/// The name of the hardfork (e.g. Frontier)
name: String,
/// The fork condition
activated_at: ForkCondition,
/// An optional EIP (e.g. `EIP-1559`).
eip: Option<String>,
}
impl core::fmt::Display for DisplayFork {

and provide this as string input

TODO

  • add DisplayHardforks::with_meta so that this also accepts optional string context (iterator (hardfork, condition, Option<String>))
  • update display impl for DisplayFork
  • update ethereum callsite:
    DisplayHardforks::new(self.hardforks.forks_iter())
    so that this also gets the the blobparam for the hardforks:
    /// The settings passed for blob configurations for specific hardforks.
    pub blob_params: BlobScheduleBlobParams,

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-cliRelated to the reth CLIA-observabilityRelated to tracing, metrics, logs and other observability toolsC-enhancementNew feature or requestD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions