Previous to this commit, the Qt app had a monitoring
loop that triggered every 5 seconds, recalculating the
wallet view; this turns out to be expensive enough to
create a CPU bound that is noticeable to the user, for
any reasonably large wallet.
After this commit, the view is only updated when a new
transaction comes into the wallet.
7be5e5dfa0 By default auto-expand mixdepth 0 (Kristaps Kaupe)
Pull request description:
Restore pre-#934 behaviour in this regard. See discussion in #937.
Top commit has no ACKs.
Tree-SHA512: 932e1ef6e3ec386dab965925e8bffdae89333ac95c0b1da45f727e46810fb1d19684e7f07f20706cd22751c1b0f899acaf9152973a7efb2e97a512c48de5054c
0e2850acf2 Auto expand internal addresses that has non zero balances, and only auto expand the external addresses of mix depth 0. (Wukong)
Pull request description:
1. For internal addresses that has non zero balances, auto expand them as user will most likely be interested in checking the details of those addresses
2. For external addresses, only auto-expand for mixdepth 0 as that's where user will most likely make deposits to.
ACKs for top commit:
kristapsk:
ACK 0e2850acf2
Tree-SHA512: 6cd397ff276e16a925d0668466bc013d53a3806e37d57c1a933429d6b8dfa761799c1e5f8fd81e28df7ac655583a42afc17db541f1015b2c280de60cd0f03e58
c70b12f For timelock addrs use new pubkey foreach locktime (chris-belcher)
3dc8d86 Fix importprivkey on fidelity bond wallets (chris-belcher)
bbd3d1b Print privacy warning when showing timelocked addr (chris-belcher)
1ea62a7 Fix bug with timelocked addrs in receive payjoin (chris-belcher)
4868343 Fix showutxos wallettool method for fidelity bonds (chris-belcher)
81bade7 Update ygrunner to use fidelity bonds (Adam Gibson)
a3b775b Increase default fee by 4x (chris-belcher)
e970a01 Create release notes section for fidelity bonds (chris-belcher)
6cf4162 Add fidelity bond protocol tests (chris-belcher)
199b571 Consider fidelity bonds when choosing makers (chris-belcher)
97b8b3b Show fidelity bonds on orderbook watch html page (chris-belcher)
7a50c76 Announce yieldgenerator's fidelity bond (chris-belcher)
6b6fc4a Handle fidelity bonds in client-server protocol (chris-belcher)
662f097 Write and update fidelity bond docs (chris-belcher)
eb0a738 Add interest rate option to config file (chris-belcher)
d4b3f70 Enable creation of fidelity bond wallets on cli (chris-belcher)
b9eab6e Increase max locktime of fidelity bond wallets (chris-belcher)
a3b3cd4 Make fidelity bond wallets be native segwit (chris-belcher)
9a372fd Add getblockhash RPC method (chris-belcher)
e6c0847 Add calculate fidelity bond value function + tests (chris-belcher)
Tree-SHA512: d2ffde2b752f66c5fd0d3100670e69d0357fc27bd3c50f9438cef9b261a17b0554c14ee56567ca1980937f889ac8be75ecc96517b1a77c7370ed33f8b5650cc7
This commit changes how timelocked addresses are created from the seed and bip32 tree.
A good thing to do would be to have each locktime (e.g. 1st jan 2020,
1st feb 2020, 1st march 2020, etc) actually use a different pubkey from
the HD tree (i.e. ("m/84'/1'/0'/2/0" + 1st jan 2020) ("m/84'/1'/0'/2/1" + 1st feb 2020), etc).
This now means that the sync code doesnt need to know what keys have been associated with
a fidelity bond to scan for the next one. Previously when a user funded a single timelocked
address, the wallet will generate _another_ pubkey and import _another_ ~960 addresses, so
funding one address would actually mean watching and generating ~1920 addresses not ~960.
This should help with the problem found by some people that fidelity bond wallets are slower
to sync. Other optimizations are possible but the structure of fidelity bond wallets will
probably be fixed for decades, so this change is worth doing now.
This is in the best interests of takers because it will incentivize
more and greater fidelity bond usage. Takers are still asked what they
want their maximum fee to be, this commit only changes the randomly
generated suggestion.
Add two new pages for the orderbook watch html server. One displays
each fidelity bond individually, the other shows calculations about
how expensive a successful sybil attack would be against the current
fidelity bonds in the orderbook.
If a yield generator is run with a fidelity bond wallet then the
most-valuable bond will be found and announced.
The announcement includes a proof of a UTXO and its locktime. Also a
proof that the maker's IRC nickname controls the UTXO.
There is also an intermediate signature called the certificate
signature which can later be used when holding fidelity bond UTXOs in
cold storage without the protocol needing to change. Right now this
feature is unused so certificates are generated dynamically on each
request. The certificates have an expiry block height, which is defined
as the number of 2016-block retargeting periods since the genesis
block, so to check if the expiry was passed the taker will check
`current_block_height > cert_expiry*2016`.
Parse incoming and announce outgoing fidelity bond messages
Fidelity bond proof messages will be checked and added to the internal
database just like offers. Such messages are not announced in public
but only directly to takers who ask for them, this is because the
signature proofs must commmit to the maker's and taker's IRC nicknames
in order to avoid replay attacks.
The default minfeerate in payjoin is 1.1 sat/vbyte,
however the randomization of 20% for all transactions
created with direct_send means that the previous value
of 1.3 could fall to below 1.1 probabilistically, it
is therefore bumped to a value that never falls below
1.1 after randomization.