Proposal: a consistent integer-overflow policy for Gonka (#1222) #1886
zpoken
started this conversation in
Protocol Improvements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We prepared proposal describing a standard way to handle integer overflow, applied consistently across the codebase, with an automated check.
Full proposal: https://github.com/zpoken/gonka/blob/zpoken/int-overflow-proposal/int-overflow-proposal.md
What we propose
nolintlintrun in all four Go modules on new lines only, so the existing backlog does not block anyone.Why
checkedMulreturnstrueon overflow, while devshard'ssafeMulreturnstrueon success.IntPart()wraps, and the v0.2.15 decimal-exponent fix shows how library semantics can reach consensus.Feedback is welcome, especially on the block-hook rule and the CI scope.
All reactions