Prior to this commit, the tumbler algorithm assumed that destination
mixdepths of INTERNAL transactions were incremented by 1, but the
underlying taker code uses (mod maxmixdepth) logic always. This commit
takes the decision to make the usage of the wallet "purely" cyclic, that
is, not only the Taker object but also the tumbler algorithm now always
treat the wallet as a cycle. This is not problematic in a tumbler
algorith (or any other schedule generation algorithm), as long as we use
the strict rule of "always exit each mixdepth with a sweep", which the
tumbler always did and this commit does not change.
Also, and importantly, several much more detailed tests of the tumbler
schedule generation have been added.
The schedule format gets an extra field added denoting the number of
significant figures to round the coinjoin amounts to, with 16 meaning
no rounding.
This is part of the 2/2019 Plan to improve the privacy of JoinMarket's
tumbler script:
https://gist.github.com/chris-belcher/7e92810f07328fdfdef2ce444aad0968
The tumbler schedule is split into two stages. Stage 2 is the same
as before while stage 1 attempts to fully spend each mixdepth in a
sweep coinjoin with no change address.
The wait time between these stage 1 coinjoins is longer than for
stage 2 coinjoins, the increase is determined by a new parameter
called `stage1_timelambda_increase`.
This is part of the 2/2019 Plan to improve the privacy of JoinMarket's
tumbler script:
https://gist.github.com/chris-belcher/7e92810f07328fdfdef2ce444aad0968
This fixes the non-deterministic failures of the test_schedule tests.
It does so by addressing the underlying issue, which is described in
be made configurable in future, but assessed as not worth it here.
Also fixes minor bug in blockr data read.
Modifies schedule syntax to include complete/incomplete flag, so if
restart is chosen then the schedule is continued from the first
incomplete transaction in the sequence.
Still to do: UI for choosing schedule.
Added config var to prevent querying whether to accept offers
(needed to allow schedule of txs to complete without interaction).
Refactor parsers into separate module (more code reuse to do).
Add a tumbler schedule generator in jmclient/schedule.py.
Alter syntax of schedules; taker interprets fractional amounts
as percentage of mixdepth (for tumbler), and integers as satoshi,
zero still sweep.
TODO tumbler is only a minor delta from sendpayment, fold them together.
New module jmclient.schedule currently only parses schedule files,
and returns an array of tuples as a schedule.
Option added to sendpayment (-S) to pass in a schedule file, instead
of using command line arguments (still valid for single joins).
Added intermediate state to daemon to track whether ioauths have been
already sent, to prevent duplicate sending on timeout.