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
Since ConfigParser does not sufficiently support comments
in config objects, in order to support dynamic update of
the config from within a run, this PR edits the config
file at the same time as updating the config object, so
as to prevent the earlier problem that all comments in the
config file were lost whenever Qt updated the file with
the new config object.
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.
In commit 22467f4 a bug was introduced whereby detailed
sync was used instead of fast sync, but with only one
iteration, in Joinmarket-Qt, in certain circumstances,
leading to incorrect wallet reporting/display. This commit
reverts that change (except for function name change).
There may still be edge cases for large wallets doing
recovery in Qt but this will be dealt with later.
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.
Previous to this commit, selecting a new schedule file would
not "correctly" detect that an unfinished tumble run was selected
(note that this "detection" is currently just checking the
name of the file, so it may have to be changed in future). The
reason for the failure to detect is that in the PyQt5 version,
the filenames are returned as a tuple, and so the str() conversion
did not match.
Wallet persists utxo metadata; currently only
contains a field 'disabled' indexed by utxo.
User can switch this on or off (enabled) via
wallet-tool 'freeze' method.
Disabled utxos will not be used in coin
selection in any transaction.
Wallet still displays all utxo balances in
display method (and in GUI).
Add tests of disabling to test_utxomanager
Add Coins tab to Qt, with freeze/unfreeze feature.
Coins tab shows updated utxo info txid:n, amt, address and
enabled/disabled, which can be toggled from right click menu.
Instead of displaying blank tree of wallet mixdepths / addresses.
Also renamed self.history to self.walletTree, for the name to be less
confusing, as there is also TxHistoryTab which is unrelated.
Before this change with wallet-tool.py you would get "ValueError:
invalid padding byte" and "jmclient.storage.StoragePasswordError: Wrong
password." exceptions, joinmarket-qt would fail silently.
Prior to this commit, if a user chose cancel while selecting a
filename for a new wallet in Qt, the wallet name was set to the
default `wallet.jmdat`, which could lead to a crash or overwrite.
This fixes that by ensuring that the wallet generation code
recognizes the cancel operation.
Previous to this commit, the jmbitcoin package was accessed via
a file in jmclient `btc.py` which was originally added as an
interface to allow the client to use a non-jmbitcoin package to
provide the implementation; while this idea is useful, the way
it was implemented was not, moreover it is not currently used
and contained duplicated code that was unmanaged. Also, the
original usage of this was only by the electrum plugin, which
has currently been abandoned. This simplifies the code and
avoids spurious error messages. Note that most of the changes
are a result of pulling the logging function directly from the
jmbase package instead of indirectly via this interface (which
was unnecessary and not connected with jmbitcoin).