Skip to content

feat: adapt merge_algorithm setting #742

@theborakompanioni

Description

@theborakompanioni

As a user, I want to adapt the merge_algorithm setting when starting the Maker service, in order to have more fine-grained control and the ability to use an already existing JM option.

See: https://github.com/joinmarket-webui/jam-docker/blob/master/standalone/default.cfg#L166-L170

Options:

  • default
  • gradual (for dust sweeping)
  • greedy (for more rapid dust sweeping)
  • greediest (for most rapid dust sweeping)

default

Default coin selection algorithm.

https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/2a108992a8cd5395f036ba5ad1202b9f77e0a5b1/src/jmclient/support.py#L67C8-L68

gradual

UTXO selection algorithm for gradual dust reduction
If possible, combines outputs, picking as few as possible of the largest
utxos less than the target value; if the target value is larger than the
sum of all smaller utxos, uses the smallest utxo larger than the value.

https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/2a108992a8cd5395f036ba5ad1202b9f77e0a5b1/src/jmclient/support.py#L86-L91

greedy

UTXO selection algorithm for greedy dust reduction, but leaves out
extraneous utxos, preferring to keep multiple small ones

https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/2a108992a8cd5395f036ba5ad1202b9f77e0a5b1/src/jmclient/support.py#L113-L116

greediest

UTXO selection algorithm for speediest dust reduction
Combines the shortest run of utxos (sorted by size, from smallest) which
exceeds the target value; if the target value is larger than the sum of
all smaller utxos, uses the smallest utxo larger than the target value.

https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/2a108992a8cd5395f036ba5ad1202b9f77e0a5b1/src/jmclient/support.py#L141-L146

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions