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.
updated xenial and stretch dockerfiles since they bundle old versions of libsodium
refacatoring to make BlockchainInterface and BitcoinCoreNoHistoryInterface python2 compatible
add the -acceptnonstdtxn flag when invoking bitcoind for versions >= 0.19.0
refactor the use of nonlocal to make it compatible with python2
document the get_bitcoind_version method
Fixes#105.
Prior to this commit the channel chosen to send on in a
call to MessageChannelCollection.prepare_privmsg was not
respect and instead the entry in the active_channels was
used, resulting in a Taker not seeing the presence of Makers
in other channels than the one chosen here. This meant that
in cases of channel disconnection, fallback to other channels
was failing (although not always deterministically). This
commit fixes this by allowing the sending of the privmsg
on a specific channel, as was intended, and so when Makers
send messages on multiple channels, they are marked as seen
on all those channels, allowing dynamic switching in case
of channel connection failures.
In addition there are two minor improvements to debug
messages.
This is the first mitigation of issue #105 , so it doesnt crash and prints useful log output for users to handle this issue.
Fixing this problem by switching to another message channel is way more complex.
- 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
is supposed to trigger a 60 sec timeout. If not all channels are successfully
joined within those 60 seconds, announce on all IRC servers that already
were joined instead.
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).
Previously, if a bot reconnected and encountered a nick
collision, it would append '_' and connect, but counterparties
would ignore appended characters after NICK_MAX_ENCODED+2, and
so would send to the other nick. This happens in network
connection failure scenarios.
Strategy here is to simply insist on regaining the nick on that
message channel where it has been lost, retrying every 10s.
There is also a loud warning message printed.
Make RPC connection persistent to improve high throughput RPC
access where necessary; uses keep alive and recreates connection
when it drops.
Restrict listtransaction calls to the required account, plus only
looks back 100 txs (assuming concurrent txs less than this), thus
greatly reducing the number of gettransaction calls over RPC.
Fixes bug in choose_sweep_orders (was not filtering out non-sw
orders).
Removes tickchainthread from tests, so no longer any threads used
even in tests; replaces with reactor task loop.
Temporarily removes test_wallets and test_segwit from build tests,
since they used blocking which only worked in threaded tests; these
tests must be rebuilt.