Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove total difficulty from rpc #13297

Closed
mattsse opened this issue Dec 11, 2024 · 1 comment · Fixed by #13303
Closed

Remove total difficulty from rpc #13297

mattsse opened this issue Dec 11, 2024 · 1 comment · Fixed by #13303
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Dec 11, 2024

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

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Dec 11, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Dec 11, 2024
@mvares
Copy link
Contributor

mvares commented Dec 12, 2024

@mattsse here needs more something? If not, close this

@mattsse mattsse closed this as completed Dec 12, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants