This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refactor: fixed point arithmetic for SRML. #3456
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
48564db
Macro-ify perthings.
kianenigma 87ad0f9
Refactor fixed64
kianenigma b3fc046
Half-workign phragmen refactor.
kianenigma df550ef
Finalize phragmen refactor.
kianenigma 2786e54
Fix creation of perquintill
kianenigma a179dec
Master.into()
kianenigma db192c6
Fix build errors
kianenigma 03785b0
Line-width
kianenigma 877947e
Fix more build errors.
kianenigma 882f904
Line-width
kianenigma 1423901
Fix offence test
kianenigma 00006dd
Master.into()
kianenigma 14fe8ac
Resolve all TODOs.
kianenigma b0fe675
Apply suggestions from code review
kianenigma fdc5de7
Fix most of the review comments.
kianenigma ef200c7
Merge branch 'kiz-srml-fixed' of github.com:paritytech/substrate into…
kianenigma cdbc69c
Merge branch 'master' of github.com:paritytech/substrate into kiz-srm…
kianenigma 67582d1
Updates to multiply by rational
kianenigma 7dc5a76
Master.into()
kianenigma 4ade1ac
Fxi build
kianenigma 3567227
Fix abs issue with Fixed64
kianenigma c8bea27
Master.into()
kianenigma 3cd1222
Fix tests and improvements.
kianenigma b1e78c8
Master.into()
kianenigma b40eee1
Fix build
kianenigma 4b56d33
Remove more tests from staking.
kianenigma 2bd3bf5
Review comments.
kianenigma 74a5b90
Add fuzzing stuff.
kianenigma ddbfa7c
Better fuzzing
kianenigma b1f189c
Better doc.
kianenigma 2cec0c1
Merge branch 'master' of github.com:paritytech/substrate into kiz-srm…
kianenigma ff7c446
Bump.
kianenigma a38bc62
Master.into()
kianenigma 711c3fd
Master.into()
kianenigma 810fa0e
A bit more hardening.
kianenigma 7952c3d
Master.into()
kianenigma 2802520
Master.into()
kianenigma a281e3e
Final nits.
kianenigma 177b662
Update lock
kianenigma 7396618
Merge branch 'master' of github.com:paritytech/substrate into kiz-srm…
kianenigma 9065295
Master.into()
kianenigma 96bba97
Fix indent.
kianenigma 6c08adf
Revert lock file.
kianenigma 35548be
Bump.
kianenigma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would make sense to de-structure the tuple so that we could have a more descriptive name than
assignment.1
throughout this section of code?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'd have to own it further down to push it to
assigned
. we could do that, not touch the.0
and construct into a tuple at the end. curious: would that be zero-cost?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to find much online about the implications of destructing, and then reconstructing a tuple. I want to say that the readability will beat the potential performance loss, but I have no good basis for that right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here: https://old.reddit.com/r/rust/comments/79ry4s/tuple_performance/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite an interesting read. Yet, let's keep it for an optimisation PR since it needs verification + this code can use a LOT more optimisation here and there.