Skip to content

Feat/coin selection strategies - #151

Open
Sosthene00 wants to merge 2 commits into
masterfrom
feat/coin_selection_strategies
Open

Sosthene00 wants to merge 2 commits into
masterfrom
feat/coin_selection_strategies

Conversation

@Sosthene00

Copy link
Copy Markdown
Collaborator

No description provided.

@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch from e3ca307 to f77c5cc Compare August 12, 2026 10:34
Comment thread spdk-wallet/src/client/coin_select.rs Outdated
@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch 4 times, most recently from 5417acb to cf0c6e7 Compare August 26, 2026 11:37
@Sosthene00
Sosthene00 marked this pull request as ready for review August 26, 2026 11:37
@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch 3 times, most recently from 3d2e376 to 5dcb753 Compare September 8, 2026 08:40
@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch 4 times, most recently from 8238cc4 to 3165e06 Compare September 17, 2026 20:45
@Sosthene00

Copy link
Copy Markdown
Collaborator Author

Significant changes for this new version, trying to make it simpler :

  • removed all code related to mandatory inputs
  • removed all code related to multiple change outputs
  • Drain is not a strategy anymore, it wasn't making much sense
  • InputSelection doesn't expose all fields as pub, and has getters instead
  • Better algorithm for strategies, we only create a Greedy proposal if the others failed.
  • BNB_MAX_ROUNDS can be passed as an argument to relevant methods (default value stays as before though)
  • Shorter commits history

@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch 3 times, most recently from e03df6f to 1efb1c5 Compare September 22, 2026 14:57

@sdmg15 sdmg15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tAck 1efb1c5#r4074784031.
Left few nits.
A question: Can we have a more straight function for users that just let them create the transaction but with defaults?

Comment thread spdk-wallet/src/client/coin_select.rs
Comment thread spdk-wallet/src/client/spend.rs Outdated
@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch from 1efb1c5 to 8235f27 Compare September 23, 2026 11:55
@Sosthene00

Copy link
Copy Markdown
Collaborator Author

tAck 1efb1c5#r4074784031. Left few nits. A question: Can we have a more straight function for users that just let them create the transaction but with defaults?

I think we can, but since a lot things will immediately change with introduction of psbt right after this PR I'd rather wait for things to settle before thinking of shortcuts and quality of life functions

Introduce Changeless, LowestFee, and FeeRateCap BnB strategies with a
Greedy fallback, plus a separate DrainSelection for spend-all.
Propose selections independently of building the unsigned transaction,
and keep coin_select internals out of the crate's public API.
@Sosthene00
Sosthene00 force-pushed the feat/coin_selection_strategies branch from 8235f27 to 20958c6 Compare September 24, 2026 13:04
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.

4 participants