-
Notifications
You must be signed in to change notification settings - Fork 62
feat(input-selection): add large first input selection strategy #1621
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
feat(input-selection): add large first input selection strategy #1621
Conversation
696e9e8
to
6548c9f
Compare
|
packages/input-selection/test/LargeFirstSelection/LargeFirstSelection.test.ts
Outdated
Show resolved
Hide resolved
packages/input-selection/src/LargeFirstSelection/LargeFirstInputSelector.ts
Outdated
Show resolved
Hide resolved
packages/input-selection/src/LargeFirstSelection/LargeFirstInputSelector.ts
Outdated
Show resolved
Hide resolved
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.
Great work! 🚀 There are some build errors to resolve (CI fail)
Fixed @mkazlauskas , but dismissed the review |
343d4f3
to
b7cffc0
Compare
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.
Looks good. Just a few minor formatting issues , I’ve highlighted some examples but do a find/replace to correct. Also was there any opportunity to commit an initial change with just simple code refactoring , then introduce the new algorithm? I found it hard to differentiate and see the most important code to review, so keep in mind for next time, if so
packages/input-selection/src/LargeFirstSelection/LargeFirstInputSelector.ts
Outdated
Show resolved
Hide resolved
packages/input-selection/src/LargeFirstSelection/LargeFirstInputSelector.ts
Outdated
Show resolved
Hide resolved
feat(input-selection): add Large first input selection strategy
307e16b
to
05e6c45
Compare
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.
LGTM!
Context
Some users with complex wallets that have hundreds (or even thousand) of UTxOs with small amounts can make our current input selection strategy fail due to selecting more inputs than max allowed, we need alternative input selection strategies for such wallets
Proposed Solution
This PR introduces large first input selection, which reduces the number of outputs needed per transaction.