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

Total achieved difficulty is stored in u64 #5851

Closed
SWvheerden opened this issue Oct 23, 2023 · 0 comments · Fixed by #5935
Closed

Total achieved difficulty is stored in u64 #5851

SWvheerden opened this issue Oct 23, 2023 · 0 comments · Fixed by #5935
Assignees
Labels
release-blocker Something that needs to be fixed before a release can be made

Comments

@SWvheerden
Copy link
Collaborator

Total difficulty achieved is stored in a u64. This should be much larger as this will overflow at one point or another. Recommended is u256 for individual targets and something larger for the compared chain difficulty

@SWvheerden SWvheerden added the release-blocker Something that needs to be fixed before a release can be made label Oct 23, 2023
@SWvheerden SWvheerden self-assigned this Nov 8, 2023
SWvheerden added a commit that referenced this issue Nov 13, 2023
Description
---
Increases the accumulated algo difficulty from u64 ti u128. 
Increases the total accumulated difficulty from u128 to u256. 

Motivation and Context
---
Having block difficulty as u64 and accumulated difficulty as u64 will
overflow.
See:  #5851

How Has This Been Tested?
---
unit tests

Fixes: #5851

---------

Co-authored-by: Aaron Feickert <66188213+AaronFeickert@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Something that needs to be fixed before a release can be made
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant