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: integer overflow in NNS tests in is_inactive #1984

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

andrew-lee-work
Copy link
Contributor

In tests, now was observed to be set to something between 50 and 60 seconds. When now is set to less than 2 weeks, an integer overflow is triggered, which can cause the neuron to be incorrectly recognized as inactive. This happened during testing of claim_neuron.

This should not affect prod because in prod, now should always be much larger than 2 weeks.

This was discovered using TLA codelink.

In tests, `now` may be set to less than 2 weeks. It was observed to
be set to something between 50 and 60 seconds. This caused an overflow.

This was discovered using TLA codelink.
@andrew-lee-work andrew-lee-work requested a review from a team as a code owner October 11, 2024 01:58
@andrew-lee-work andrew-lee-work changed the title Fix integer overflow in NNS tests in is_inactive fix: integer overflow in NNS tests in is_inactive Oct 11, 2024
@github-actions github-actions bot added the fix label Oct 11, 2024
@andrew-lee-work andrew-lee-work added this pull request to the merge queue Oct 11, 2024
Merged via the queue into master with commit c4b3c8f Oct 12, 2024
25 checks passed
@andrew-lee-work andrew-lee-work deleted the ajl/fix-int-overflow-in-NNS-test branch October 12, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants