Skip to content

fix: do not compute terms if we know the result to be 0#817

Merged
rflechtner merged 5 commits intobonded-coins-audit-fixesfrom
rf-less-overflow-on-polynomial
Mar 10, 2025
Merged

fix: do not compute terms if we know the result to be 0#817
rflechtner merged 5 commits intobonded-coins-audit-fixesfrom
rf-less-overflow-on-polynomial

Conversation

@rflechtner
Copy link
Contributor

@rflechtner rflechtner commented Nov 28, 2024

fixes https://github.com/KILTprotocol/ticket/issues/3807

This means we don't compute the overflowing quadratic terms if we do not need the result.

Checklist:

  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)
    • Either PR or Ticket to update the Docs
    • Link the PR/Ticket here

@rflechtner
Copy link
Contributor Author

@Ad96el do you think we'd have to make changes to benchmarking for this?

Base automatically changed from pallet_bonded_coins to develop December 12, 2024 16:28
@rflechtner rflechtner force-pushed the rf-less-overflow-on-polynomial branch from e6d513f to 50f3ccf Compare February 6, 2025 09:30
@rflechtner rflechtner changed the base branch from develop to bonded-coins-audit-fixes March 6, 2025 17:04
@rflechtner rflechtner force-pushed the rf-less-overflow-on-polynomial branch from 50f3ccf to 121c870 Compare March 6, 2025 17:47
@rflechtner rflechtner marked this pull request as ready for review March 6, 2025 18:08
@rflechtner rflechtner requested a review from ntn-x2 March 6, 2025 18:09
@rflechtner rflechtner merged commit dd08d84 into bonded-coins-audit-fixes Mar 10, 2025
13 of 15 checks passed
@rflechtner rflechtner deleted the rf-less-overflow-on-polynomial branch March 10, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants