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

Enhance Coin Selection #42

Open
gavinharris-dev opened this issue Feb 2, 2023 · 2 comments
Open

Enhance Coin Selection #42

gavinharris-dev opened this issue Feb 2, 2023 · 2 comments

Comments

@gavinharris-dev
Copy link
Contributor

Perhaps we can use the Nami Implementation as a basis for this?

https://github.com/berry-pool/nami/blob/main/src/lib/coinSelection.js

@nicolasayotte
Copy link

nicolasayotte commented Mar 5, 2024

Please consider giving this a read and think about maybe implementing something else than Smallest First and Largest First. I am consulting on a project where helios is used and the Coin Selection is resulting in a very large amount of invalid transactions (mainly because of tx size).

cardano-foundation/CIPs#232

The discussion presents a few ways to address this issue with better algorithms

@christianschmitz
Copy link
Contributor

christianschmitz commented Mar 5, 2024

@nicolasayotte thanks for commenting on this.

The largestFirst/smallestFirst coinselection algorithms were implemented provisionally, and more advanced algorithms will be added to the library in the coming months (a project I'm currently working is having similar issues).

Note to all those reading this: the coinselection interface is a mere function type, so custom algorithms can easily be used with the Helios library (eg. wrapping whatever already exists in other libraries)

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

No branches or pull requests

3 participants