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.
Fixes#1060.
Prior to this commit, the extra log for tumbler.py
was created in the local directory, because it was
set before running load_program_config (which defaults
to the user's default joinmarket config location), this
is now corrected.
As per discussion in #569 the use of options.txfee
to set fee rates conflicted with its earlier use
to make a first guess of fees for user warnings.
Now this connection is removed, the guess for warning
calculation is done independent of this option setting.
To facilitate easier management by users and to
follow generally accepted standards, this PR moves
the following all to user home directory, subdir
.joinmarket :
joinmarket.cfg file
wallets/ directory
logs/ directory
cmtdata/ directory
commitmentlist file
User can override location with --datadir option.
An info message is added on startup showing location.
Prior to this commit, the user was prompted to check for
the acceptability of fees in Qt via a dialog, but settings
used in CLI (max_cj_fee_***) were not also being used the
same way in Qt.
After this commit, if the user has not added those settings,
a dialog is presented with new randomised defaults (as for
CLI), and otherwise any settings in the config file are read
and used.
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
in the JM TX's instead of just for preliminary
estimations. Now it is a way to temporarily override
the tx_fees setting in joinmarket.cfg and behaves
exactly the same way as describes there.
Introduces WalletService object which is in control of
blockchain and wallet access.
The service manages a single transaction monitoring loop,
instead of multiple, and allows updates to the wallet from
external sources to be handled in real time, so that both Qt
and other apps (yg) can respond to deposits or withdrawals
automatically.
The refactoring also controls access to both wallet and
blockchain so that client apps (Taker, Maker) will not need
to be changed for future new versions e.g. client-side filtering.
Also updates and improves Wallet Tab behaviour in Qt (memory
of expansion state).
Additionally, blockchain sync is now --fast by default, with
the former default of detailed sync being renamed --recoversync.
Prior to this commit, if an invalid destination address
was entered on the command line for the tumbler script,
the invalidity would cause a crash at the time a transaction
was built with this destination (during the run).
After this commit, all destination addresses entered on
startup are checked immediately and the program quits with
this information if a specific address is invalid.
Fixes#362. Prior to this commit, if tumbler was invoked with
the --restart flag, it waited for the presence of the 0 index
output of the last seen tumbler transaction in the utxo set,
which was an unreliable indicator as that output could have,
in the meantime, been spent.
After this commit, we utilise the fact that the transaction
must be an in-wallet transaction, and use the rpc gettransaction
to check whether it has 1 or more confirmations, instead, which
should always work whether any outputs are spent or not.
after restarts, instead of sending coins back to wallet.
This is a fix for #363.
Prior to this commit, if a tumbler
run was restarted on command line with --restart, and a schedule
entry failed triggering a call of tweak_tumble_schedule, the
destination address was always reset with INTERNAL to another in-
wallet address, even if it was actually an outward destination
address, because the restart of the tumbler script created an
instance of Taker without any addresses stored in the variable
tdestaddrs. After this commit, the Taker instance is instantiated
with the remaining destination addresses in the post-restart
schedule.
The user is prompted with a warning if they use --restart in
combination with command line destination addresses; they are
warned that the latter will be ignored, since the contents of the
schedule file are respected, instead.
- update mktx() to allow optional locktime setting (and sequence)
- add a mk_shuffled_tx method to the wallet module
- add a P2EPTaker and P2EPMaker class (inherit from Taker, Maker)
- add a -T option to sendpayment script for doing payjoins
- add a receive_payjoin script for receivers.
- add payjoin tests in jmclient/test/test_payjoin.py
- add a custom utxo selection method select_one_utxo to support.py
- support bech32 wallets (SegwitWallet, p2wpkh) with native=true
in config POLICY for PayJoin and direct send (not Joinmarket CJ)
- add a PayJoin.md usage guide in docs/
- include version bytes in pubkey message for forward compat
- taker pays fees but controls size (utxo number and fee/kB)
- add P2WPKH fee estimator
- Enforce INFO level logging in payjoin
- refactors regtest config settings into one place
- bugfix: script_to_address vbyte argument is bytes not integer
This commit adds a method 'changemixdepth' to the list
of methods that can be invoked with the wallet-tool.py script.
It is a noscan method, so doesn't require sync, and uses the
value of the -m option as the new *number* of mixdepths, and
updates the wallet's storage for future runs.
Users are advised not to reduce this number, but increasing it
should always be fine.
Running tumbler with insufficient mixdepths quits with warning.
As for maker, to use this feature set segwit = false
in the POLICY section of the config file.
This commit does *not* include support in the GUI.
Additionally, minor fixes to utility scripts for non-sw wallets,
and updated add-utxo tool to support non-sw wallets.
Bugfixes to wallet_utils to support non-sw wallets
and signmessage.
Updates to joinmarket-qt to reflect; no signals, only callbacks
Includes code for watching txs both via notify addr and txs;
taker uses the latter (knows full txid), maker the former
Additional code for watching tx spends included for downstream.
Also add detailed function definitions for Taker callbacks in
taker.py comments. Modifications to joinmarket-qt, tumbler
working but these modifications not yet complete.