openoms / joininbox

A terminal based graphical menu for JoinMarket
MIT License
153 stars 20 forks source link

[Feature Request] Tumbler #57

Open Tracachang opened 3 years ago

Tracachang commented 3 years ago

Tumbler script being a powerful tool to boost privacy I think it would be great to have it in the joininbox.

Is there any plans to be added?

Thank you

openoms commented 3 years ago

The tumbler script is part of the installation so available in the CLI and from the QT GUI too.

Adding to the menu needs some work which I hope to get to at some point.

Until then here is all the info to use the CLI: https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/tumblerguide.md

openoms commented 2 years ago

Reopening as did not give up on this to be the part of the menu.

Help for the CLI:

$ python tumbler.py -h
Usage: tumbler.py [options] [wallet file] [destaddr(s)...]

Sends bitcoins to many different addresses using coinjoin in an attempt to
break the link between them. Sending to multiple  addresses is highly
recommended for privacy. This tumbler can be configured to ask for more
address mid-run, giving the user a chance to click `Generate New Deposit
Address` on whatever service they are using.

Options:
  -h, --help            show this help message and exit
  -m MIXDEPTHSRC, --mixdepthsource=MIXDEPTHSRC
                        Mixing depth to start tumble process from. default=0.
  --restart             Restarts the schedule currently found in the schedule
                        file in the logs directory, with name TUMBLE.schedule
                        or what is set in the schedulefile option.
  --schedulefile=SCHEDULEFILE
                        Name of schedule file for tumbler, useful for restart,
                        default TUMBLE.schedule
  -a ADDRCOUNT, --addrcount=ADDRCOUNT
                        How many destination addresses in total should be
                        used. If not enough are given as command line
                        arguments, the script will ask for more. This
                        parameter is required to stop amount correlation.
                        default=3
  -N MAKERCOUNTRANGE, --makercountrange=MAKERCOUNTRANGE
                        Input the mean and spread of number of makers to use.
                        e.g. 9 1 will be a normal distribution with mean 9 and
                        standard deviation 1 inclusive, default=9 1 (floats
                        are also OK)
  --minmakercount=MINMAKERCOUNT
                        The minimum maker count in a transaction, random
                        values below this are clamped at this number.
                        default=4
  -M MIXDEPTHCOUNT, --mixdepthcount=MIXDEPTHCOUNT
                        How many mixing depths to mix through
  -c TXCOUNTPARAMS, --txcountparams=TXCOUNTPARAMS
                        The number of transactions to take coins from one
                        mixing depth to the next, it is randomly chosen
                        following a normal distribution. Should be similar to
                        --addrask. This option controls the parameters of the
                        normal distribution curve. (mean, standard deviation).
                        default=2 1
  --mintxcount=MINTXCOUNT
                        The minimum transaction count per mixing level,
                        default=2
  --donateamount=DONATEAMOUNT
                        percent of funds to donate to joinmarket development,
                        or zero to opt out (default=0%)
  -l TIMELAMBDA, --timelambda=TIMELAMBDA
                        Average the number of minutes to wait between
                        transactions. Randomly chosen  following an
                        exponential distribution, which describes the time
                        between uncorrelated events. default=60
  --stage1-timelambda-increase=STAGE1_TIMELAMBDA_INCREASE
                        Stage 1 sweep coinjoins have a longer wait time. This
                        parameter controls by what factor longer is this
                        average wait time compared to stage2 coinjoins which
                        are controlled by `--timelambda`, default=3
  -w WAITTIME, --wait-time=WAITTIME
                        wait time in seconds to allow orders to arrive,
                        default=20
  -s MINCJAMOUNT, --mincjamount=MINCJAMOUNT
                        minimum coinjoin amount in transaction in satoshi,
                        default 100k
  -q LIQUIDITYWAIT, --liquiditywait=LIQUIDITYWAIT
                        amount of seconds to wait after failing to choose
                        suitable orders before trying again, default 60
  --maxbroadcasts=MAXBROADCASTS
                        maximum amount of times to broadcast a transaction
                        before giving up and re-creating it, default 4
  --maxcreatetx=MAXCREATETX
                        maximum amount of times to re-create a transaction
                        before giving up, default 9
  -A AMTMIXDEPTHS, --amtmixdepths=AMTMIXDEPTHS
                        number of mixdepths ever used in wallet, only to be
                        used if mixdepths higher than mixdepthsrc + number of
                        mixdepths to tumble have been used.
  --rounding-chance=ROUNDING_CHANCE
                        probability of non-sweep coinjoin amount being
                        rounded, default=0.25 (25%)
  --rounding-sigfig-weights=ROUNDING_SIGFIG_WEIGHTS
                        If rounding happens (determined by --rounding-chance)
                        then the weights of how many significant figures to
                        round to. The five values refer to the probability of
                        rounding to one, two, three, four and five significant
                        figures respectively. default=(55, 15, 25, 65, 40)
  --datadir=DATADIR     Specify the path to a directory you want to use to
                        store your userdata - wallets, logs and commitment
                        files - and your joinmarket.cfg. By default, the
                        directory .joinmarket is used.
  --recoversync         choose to do detailed wallet sync, used for recovering
                        on new Core instance.
  --wallet-password-stdin
                        Read wallet password from stdin
  --version             Print JoinMarket version and exit.
  -f TXFEE, --txfee=TXFEE
                        Bitcoin miner tx_fee to use for transaction(s). A
                        number higher than 1000 is used as "satoshi per KB" tx
                        fee. A number lower than that uses the dynamic fee
                        estimation of your blockchain provider as confirmation
                        target. This temporarily overrides the "tx_fees"
                        setting in your joinmarket.cfg. Works the same way as
                        described in it. Check it for examples.
  -x MAX_CJ_FEE_ABS, --max-cj-fee-abs=MAX_CJ_FEE_ABS
                        Maximum absolute coinjoin fee in satoshi to pay to a
                        single market maker for a transaction. Both the limits
                        given in --max-cj-fee-abs and --max-cj-fee-rel must be
                        exceeded in order to not consider a certain offer.
  -r MAX_CJ_FEE_REL, --max-cj-fee-rel=MAX_CJ_FEE_REL
                        Maximum relative coinjoin fee, in fractions of the
                        coinjoin value, to pay to a single market maker for a
                        transaction. Both the limits given in --max-cj-fee-abs
                        and --max-cj-fee-rel must be exceeded in order to not
                        consider a certain offer. Example: 0.001 for a maximum
                        fee of 0.1% of the cj amount
  --order-choose-algorithm=ORDER_CHOOSE_FN
                        Set the algorithm to use for selecting orders from the
                        order book. Default:
                        fidelity_bond_weighted_order_choose Available options:
                        random_under_max_order_choose, cheapest_order_choose,
                        weighted_order_choose,
                        fidelity_bond_weighted_order_choose
  -C                    alias for --order-choose-
                        algorithm=cheapest_order_choose
  -F                    alias for --order-choose-
                        algorithm=fidelity_bond_weighted_order_choose
  -R                    alias for --order-choose-
                        algorithm=random_under_max_order_choose
  -W                    alias for --order-choose-
                        algorithm=weighted_order_choose
openoms commented 2 years ago

Example TUMBLE.schedule displayed with:

# [mixdepth, amount-fraction, N-counterparties (requested), destination address, wait time in minutes, rounding, flag indicating incomplete/broadcast/completed (0/txid/1)]
dialog \
 --title "Tumbler schedule"  \
 --prgbox "(echo 'mixdepth,amount-fraction,N-counterparties,destination address,wait time in minutes,rounding,flag (0/txid/1)' ;cat /home/joinmarket/.joinmarket/logs/TUMBLE.schedule) | column -t -s, 2>/dev/null" 20 110

Started with:

python tumbler.py -m 2 -N 2 1 --minmakercount 1 signetfb

image

See more at https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/tumblerguide.md

openoms commented 2 years ago

Notes:

Settings

-m MIXDEPTHSRC, --mixdepthsource=MIXDEPTHSRC  Mixing depth to start tumble process from. default=0

Ran the Tumbler with -m2 I had funds in all mixdepths Left with a cj-out in m1 and m2.

So what I could gather it sent funds from the mixdepth starting with MIXDEPTHSRC ( here m2), but coinjoined the lower mixdepths regardless.

This option is best to be ignored unless funds to be left in the lower mixdepths (but will still move from m0)

Interruptions

RampantDespair commented 2 weeks ago

@openoms Hey, is this feature still in the pipeline or was it abandoned?