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

Audit for all usage of unchecked arithmetic and update nomenclature #2555

Closed
Tracked by #2531
cwgoes opened this issue Feb 7, 2024 · 0 comments · Fixed by #3074 or #3214
Closed
Tracked by #2531

Audit for all usage of unchecked arithmetic and update nomenclature #2555

cwgoes opened this issue Feb 7, 2024 · 0 comments · Fixed by #3074 or #3214
Assignees
Labels
pre-mainnet Must happen before mainnet. security

Comments

@cwgoes
Copy link
Collaborator

cwgoes commented Feb 7, 2024

Looking through the codebase for unchecked arithmetic I still find quite a bit, e.g.:

  • here
  • here
  • many more, just searching...

We should:

  • Remove ALL support for unchecked arithmetic. We should never use it.
  • Update all arithmetic to use checked_sub, checked_add etc. names (don't overload + / -) to make it clear that we're using checked arithmetic (and so a search for only + or -, for example, should return only internal implementation code instead decimal types and no usage other than that).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre-mainnet Must happen before mainnet. security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants