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

internal/ethapi: remove td field from block #30386

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Sep 3, 2024

@s1na
Copy link
Contributor Author

s1na commented Sep 3, 2024

If we remove GetTd usage from ethstats then the method could be dropped from the EthAPIBackend completely.

@rjl493456442
Copy link
Member

rjl493456442 commented Sep 4, 2024

If we remove GetTd usage from ethstats

Why not?

EDIT: Okay, let's keep it for a while, not sure whether ethstats will fail or not without the TD (although
they communicate via JSON)

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman added this to the 1.14.9 milestone Sep 4, 2024
@lightclient
Copy link
Member

Looks like there are still some references to "totalDifficulty" in a few places that should also be cleaned up:

  • eth/tracers/internal/tracetest/testdata/
  • internal/jsre/deps/web3.js
  • ethstats

@s1na
Copy link
Contributor Author

s1na commented Sep 13, 2024

Looks like there are still some references to "totalDifficulty" in a few places

Yep I fixed the ones in eth/tracers/internal/tracetest. Those were filled via API and had those fields. The totalDifficulty was also unused even before this because it decodes into *core.Genesis.

internal/jsre/deps/web3.js

Hm this one makes it so that when I do eth.getBlock in the console it shows "totalDifficulty": 0. Which is confusing. I am mindful that this is an external dependency and we shouldn't change it often. But since we haven't really updated web3.js or plan to do that I will go ahead and remove the offending line.

ethstats

I'd like to keep this out of this PR.

@s1na
Copy link
Contributor Author

s1na commented Sep 13, 2024

Fixed last standing issue. PTAL

@karalabe karalabe modified the milestones: 1.14.9, 1.14.10 Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants