-
Notifications
You must be signed in to change notification settings - Fork 437
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
Removing totalDifficulty field from BlockForRpc class while returning… #7434
Removing totalDifficulty field from BlockForRpc class while returning… #7434
Conversation
@smartprogrammer93 could you suggest if these changes are in the right direction? |
@shubham-sonthalia looks like it is. |
Keep you PR in Draft mode until it is ready for review please 🙏 |
Does the scope of the issue involve removing |
@shubham-sonthalia only RPC for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because total difficulty is not needed in some cases, we can use BlockTreeLookupOptions.TotalDifficultyNotNeeded. For example, if we are reading a block by its hash and do not require TD, we can avoid reading from the blockInfo database.
Yes, it would be good to confirm with blockscout team. On the other hand, not sure if it is used at all for various chains (besides block explorers) |
To be honest I wouldn't merge that PR. Just because Main Ethereum doesn't need it (and spec is about main Ethereum), doesn't mean we should remove it because our clients are using other consensus algorithms and may still need it. Just let it be until proven unnecessary. |
@LukaszRozmej @smartprogrammer93 Shall I close this PR? |
@shubham-sonthalia, unfortunately, i agree with lukasz as his point makes sense. So we need to close this for now. |
Resolves #7397
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
BlockForRpc
classTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes