Skip to content

Remove total difficulty from rpc #13297

@mattsse

Description

@mattsse

Describe the feature

total difficulty has been deprecated ethereum/execution-apis#570

and we can start removing it, starting with rpc:

let mut total_difficulty = self
.provider()
.header_td_by_number(block.number())
.map_err(Self::Error::from_eth_err)?;
if total_difficulty.is_none() {
// if we failed to find td after we successfully loaded the block, try again using
// the hash this only matters if the chain is currently transitioning the merge block and there's a reorg: <https://github.com/paradigmxyz/reth/issues/10941>
total_difficulty =
self.provider().header_td(&block.hash()).map_err(Self::Error::from_eth_err)?;
}

TODO

  • simplify rpc block functions by removing total difficulty

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rpcRelated to the RPC implementationC-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