joinmarket-webui / joinmarket-webui/jam

feat: adapt `merge_algorithm` setting

Open
#742 1 comment 1 reaction 1 assignee Claimed by @r3yc0n1c View on GitHub
enhancement
Dominant language
TypeScript
Stars
330
Forks
122
Avg merge
2d 17h
Merged PRs (30d)
17

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.