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

fix: potential overflow #5778

Merged
merged 6 commits into from
Oct 12, 2023

Conversation

SWvheerden
Copy link
Collaborator

Description

Fixes potential overflow from fee calculation

Motivation and Context

The transaction comes from remove peers, if the fee is u64::Max this can overflow and panic the node.

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Test Results (CI)

1 219 tests   1 219 ✔️  9m 51s ⏱️
     39 suites         0 💤
       1 files           0

Results for commit 0eaf5b3.

♻️ 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 Sep 18, 2023
@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Test Results (Integration tests)

33 tests   33 ✔️  13m 13s ⏱️
11 suites    0 💤
  2 files      0

Results for commit 0eaf5b3.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

While this PR is only changing a specific addition, there are a lot of the files that are touched that have similar overflow problems. Specifically, in the mempool there are a number of these unchecked additions. I would suggest rather fix all the additions/multiplies in the mempool in this PR, otherwise, it's difficult to approve when there are glaring potential overflows

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Oct 12, 2023
@stringhandler stringhandler merged commit 1d1332d into tari-project:development Oct 12, 2023
13 checks passed
@SWvheerden SWvheerden deleted the sw_fix_unwrap branch October 25, 2023 10:35
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants