Fidelity bond wallets are intended to be used when at a later date
using fidelity bonds to greatly increase joinmarket's resistance to
sybil attacks. This commit adds support for timelocked addresses.
It allows users to optionally create wallet which support such
addresses. The synchronization code is modified to also scan for
timelocked addresses. The keypairs of the timelocked addresses go in
the newly created 2nd address type, where before the zeroth index were
receive addresses and first index was change.
The locktime dates are fixed at the first of each month for the next 30
years. This means users dont need to remember any dates, and so just
their seed phrase and wallet type will still be enough to recover all
funds. Each keypair used for timelocking requires an additional 360
addresses to be scanned for, which isn't a problem for Bitcoin Core.
Fidelity bonds are only stored in the zeroth mixdepth, as they are not
used in repeated coinjoins so theres no point having them in multiple
mixdepths.
Timelocked addresses don't use the get_new_script() family of functions
because they all assume that one index equals one address, and that
therefore it's possible to ask for a "next" address. For timelocked
addresses knowing the index is not enough to know the address, the
timestamp must be known too. Also once one address made of
(index, timestamp) is used you mustn't use that index and pubkey again,
even though all the other timelocks for that index/pubkey are unused.
This is for privacy reasons, as its equivalent to address reuse.
Previously an example of a BIP32 path
would be: m/wallet-type'/mixdepth'/internal/index
The 'internal' name referred to internal and external addresses (also
called change and receive). The renaming to 'address_type' is in
preparation to add more branches for timelocked addresses and burner
outputs.
The variable formally known as 'internal' is now no longer a boolean
but always an integer. This almost-always seemlessly fits because the
values False and Ture correspond to 0 and 1. The function
_get_internal_type therefore has no purpose anymore. Delete it.
faaf51eada Add BIP21 bitcoin payment URI support to sendpayment.py (Kristaps Kaupe)
Pull request description:
In future could and should be improved to add this also to Qt GUI, but didn't want to do that now, need to figure out proper UX there.
This is needed for #557.
Top commit has no ACKs.
Tree-SHA512: a3911f62c27b71796b27fb74be09f2cfb8e2f6f5b0ef0909ecafb16ef07b8023ea0f193f829bba2e580dc0880016d7c1e051e8d25f324e4a1178d112a69fa16c
Prior to this commit, the callback method in the
DaemonServerProtocol, on_commitment_seen, was using
a reference to jm_single (to access the config var
accept_commitment_broadcasts) which was not valid
as jm_single() is part of jmclient and is not accessible
to jmdaemon. This error was being swallowed by a finally:
block in the message channel method check_for_commitments,
resulting in public broadcast hp2 messages being ignored.
This commit removes the reference to accept_commitment_broadcasts,
thus resulting in all publically broadcast hp2 messages being
stored in the commitmentlist.
Prior to this commit, the function `exit()` was unavailable
due to the removal of the builtins import in 4bf1f50.
This led to NameError exceptions instead of the intended error
messages in Qt startup with wrong configuration (I did not
investigate if it could also happen on command line).
Fix was to make all exit() calls sys.exit().
7359792bb1 Move Travis-specific install_bitcoind.sh out of root (Kristaps Kaupe)
Pull request description:
It messed up Tab-completion in shell for ordinary users, `./in<Tab><Enter>` didn't work anymore.
Top commit has no ACKs.
Tree-SHA512: 12d05dde7987a63cf29dd55f0f271e582c14f2c84de3c5278de2d5e9866a8e17b90d0f7daac09815d87a6e727bf8152eadf4d0b31de8e1ef97dd70253d375760
16cf93ab82 Display INFO level log message on estimate_fee_per_kb() with result (Kristaps Kaupe)
Pull request description:
Today I accidentally did a tx with smaller fee than I wanted to, because I forgot that `joinmarket.cfg` is moved from `scripts/` to `~/.joinmarket/` in current master and looked in a wrong file for a current setting. This adds INFO log level message on every call to `estimate_fee_per_kb()`. Very likely with this change I would have noticed wrong tx fee setting before tx was negotiated and broadcast to the network. It displays both sat/vkB and sat/vB values, as first is kinda what JM uses internally, but second one might be the one most people are familiar with. As we are talking about the money here, I do believe it's better to display the same info two different ways than for people to do some mistake.
Also additional minor changes to `jmbitcoin/jmbitcoin/amount.py` to make `pycodestyle` happy (our current code is far from that, but I don't see downside for at least to try to write the new code according to PEP 8 guidelines).
Top commit has no ACKs.
Tree-SHA512: 52385d711039bd9abb522298c39271a5cff9a21997f5b2434a87f278d583600f258ebff98f067373b329f337fd08e27f8b4a86d6297154bce109c319e50fd11e
As of 13 March the latest pytest breaks the twisted tests.
As a result the version is pinned until that can be fixed.
Additionally, at the same time, the bitcoin ppa has been
removed and so cannot be used in our travis testing setup.
Hence we install bitcoin directly (for tests only, of course)
from bitcoin.org,
copying bitcoind and bitcoin-cli to `/usr/local/lib`.
0f1327626d Use either wget or curl for downloading deps (Kristaps Kaupe)
Pull request description:
Also changed shebangs to `/usr/bin/env bash`.
Closes#528
Top commit has no ACKs.
Tree-SHA512: 13b1bde98d8e08e3d3739e3e8713917511e96262b70a106a03316cd0a3f411d9cae919770597448b6b3dd347d8bdaa64f15da0da0ed2793a32cd2613b7bdd472
a51bd55903 Fix sweep in GUI (Kristaps Kaupe)
Pull request description:
Same fix as #533, but for GUI. Fixes bug introduced with #529.
Top commit has no ACKs.
Tree-SHA512: 4a347307ce7b306087c202220b8f68f14022362051fb5e02f4c59a51aed1786092dde0ea82abde4f6eaa4461a7296ce7967803ef0a121075e87f9965e4bcbf42
AgoraIRC has problems at the time of writing. I found hackint
IRC which allows both clearnet and tor connections, and has
many populated channels so will presumably be well-maintained.
f51990900f Check against dust threshold for single joins (Kristaps Kaupe)
Pull request description:
Such joins will not work anyway.
Related to discussion on IRC where somebody wanted to send 1 BTC but was actually sending 1 sat and it didn't work, of course.
Top commit has no ACKs.
Tree-SHA512: fc747a2ee2271c4554a45ccf872bbbaa1cea531b0ac7dc786137adfbee1d70db282fd65ed743dccb6018369885cd0e0804f431cffd7fc424ea3078ab277bbb6c
5f85734 Make explicit args in wallet_generate_recover_bip39 (chris-belcher)
Tree-SHA512: 12d92065a491440875afd6614719e027390728a4828fbc2ed6b1b4d7cbb9e9741d47d155c13fa9d06731b60fec81692f303f932a0f719a59a8931cce8c7440b7