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

feat!: fix difficulty overflow #5935

Merged

Conversation

SWvheerden
Copy link
Collaborator

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

Copy link

github-actions bot commented Nov 9, 2023

Test Results (CI)

1 257 tests   1 257 ✔️  1h 23m 2s ⏱️
     39 suites         0 💤
       1 files           0

Results for commit 8ff6354.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Nov 9, 2023
Copy link

github-actions bot commented Nov 9, 2023

Test Results (Integration tests)

  2 files  +  2  11 suites  +11   16m 59s ⏱️ + 16m 59s
31 tests +31  25 ✔️ +25  0 💤 ±0    6 +  6 
41 runs  +41  27 ✔️ +27  0 💤 ±0  14 +14 

For more details on these failures, see this check.

Results for commit 8ff6354. ± Comparison against base commit 27f78de.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@AaronFeickert AaronFeickert left a comment

Choose a reason for hiding this comment

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

LGTM

@SWvheerden SWvheerden merged commit 55bbdf2 into tari-project:development Nov 13, 2023
13 of 14 checks passed
@SWvheerden SWvheerden deleted the sw_fix_difficulty_overflow branch November 14, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Total achieved difficulty is stored in u64
3 participants