6f533aaa62 Reduce number of gettransaction RPC's by caching results (Kristaps Kaupe)
Pull request description:
For one five months old mainnet wallet with 50+ transactions, it reduced number of `gettransaction` calls to Bitcoin Core from 10884 to 7477. They are called for each input of each transaction in wallet.
ACKs for top commit:
chris-belcher:
utACK 6f533aaa62
Tree-SHA512: 1a19cc9d0c3ee5b8cd549bf60bec679765190a19d47cae8b04d2d4cd4e1be3680c4b6e431a6dab2661ee576e8d8ba050a8396e2c7ce5fed4041cfc7213996736
Overwrite the selection logic of mixdepth with the cyclic order one. Improve comment to explain why modulo is used only for the first available mixdepth.
Nit correction
Co-authored-by: Kristaps Kaupe <kristaps@blogiem.lv>
Verification of message signatures against segwit addresses
is not currently functional/possible in Core, and additionally
the signing function used for messages in jmbitcoin, derived
from coincurve, was not compatible with Electrum either.
This commit uses the functionality in python-bitcointx's
signmessage module, and now the wallet method `signmessage`
creates signatures on messages against segwit addresses that
are verifiable in Electrum.
Test cases of p2sh and native are added.
8b0d08d260 Don't request privkey for ephemeral onion from Tor (Adam Gibson)
Pull request description:
Prior to this commit, the Tor control request `ADD_ONION`
did not specify that the private key need not be returned.
After this commit we add the flag `DiscardPK` by specifying
the argument private_key=txtorcon.DISCARD to the call to
`create_onion_endpoint`, so that the private key is not
returned. The private key is not needed, so this is better.
ACKs for top commit:
kristapsk:
ACK 8b0d08d260 (tested payjoin send from BTCPay to JM)
Tree-SHA512: dc6891cb91e896f7d7ad114ab85b3d78babb34186400d00ac80f09138c3303b6c1b05d3c3376a085c0e42a4b6e8399119896c8f2d00631d1a9a397195fabe624
Prior to this commit, the Tor control request `ADD_ONION`
did not specify that the private key need not be returned.
After this commit we add the flag `DiscardPK` by specifying
the argument private_key=txtorcon.DISCARD to the call to
`create_onion_endpoint`, so that the private key is not
returned. The private key is not needed, so this is better.
This completes the task of enabling
network isolation by running the receiver
side using a hidden service in the daemon,
and communicating over AMP, as is already
the case for the sender.
Updates test_payjoin for daemon receiver.
Qt BIP78 receiver update for daemon.
da1fa05f4c Output JM version at the start of yield generator (Kristaps Kaupe)
Pull request description:
Resolves#706.
Could help people to not forget which version they are running probably. :) (https://reddit.com/r/joinmarket/comments/m6ypz3/how_to_see_your_current_version_and_to_know_if/)
Top commit has no ACKs.
Tree-SHA512: 79d9ed76c8a5e7e4485c1bcd42db1d900686be72fadab2d3c9d0b1dba13f415a102fbc69445c5914d870cc39bf559df8ace112229581861c199a68dc545684d3
03ea5bb762 Add command line option support and verbose output option (Kristaps Kaupe)
Pull request description:
Verbose output is sometimes useful when tests fail, to get full error output, instead of truncated one.
Top commit has no ACKs.
Tree-SHA512: 83dcc31c2a889bd45a5e820bfeb3a6fb9fc8f5d781cf8bd29c5ffc2bdf1ae7ebdb9ef17c625f046b398531d8ffbda4ac80a373f0a4a76d3aa7844b09406d9ba2
60e2beaa78 Move wallet_utils tests to test suite (Kristaps Kaupe)
Pull request description:
Top commit has no ACKs.
Tree-SHA512: ef40d994e5b7e6305994e859080123d3c739a030973dce43df122b27a1de33e9ac09dbb967e691774a5381b945950fedc89435562c6f4391bd3feef77562f682
9ea0a732f2 Hide "Total balance" in wallet-tool when only single mixdepth is displayed (Kristaps Kaupe)
Pull request description:
Addresses minor concern raised by @AdamISZ [here](https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/820#issuecomment-792308720) that `wallet-tool.py -m` now displays "Total balance" row which actually shows not total wallet balance but balance of a single choosen mixdepth.
Top commit has no ACKs.
Tree-SHA512: 26492674df0d66aed88b89c5f23223eae2eeb034b6be8f8029f3065a1ae51bbc123e82aecb01d54ae0b0a0e23c435c6d3a9c696731cb3227b125b5fe4ef8202e
In case of all-in-one (client and daemon in same process,
the default), this commit ensures that if there was a port
conflict and the port number for the daemon was incremented,
the client connects to the newly created protocol instance.
And this applies to all three protocols (jm, snicker, bip78).
This PR creates a client-daemon protocol for
the BIP78 sender, using the base protocol
`HTTPPassThrough` which provides tor and non-tor
agents with POST and GET request functionality.
As for Joinmarket coinjoins, the use of an in-process
daemon is the default option, but it can be isolated
by changing the `[DAEMON]` section of the config.
The receiver side of BIP78 will be addressed in a
future PR.
Before this commit, if receiving payjoin (BIP78) via
JoinmarketQt, after the payjoin was successfully broadcast
by the sender, and the new utxo(s) recognized in the wallet,
the Qt app nevertheless attempted to broadcast the initial
payment transaction as the delayed call was not getting canceled
by the JMBIP78ReceiverManager (this attempt of course always
failed as the coins were spent, so was not dangerous, but merely
confusing). This is now fixed.
Before this commit, the check of receiver inputs in the
proposed PSBT from the receiver was erroneously failing,
if the number of sender inputs was greater than 1, because
the list of receiver input indices was not populated correctly
before the check. This commit fixes this bug.