The module socks.py in the jmdaemon package
is no longer used as the SOCKS proxy functionality
is provided by the txtorcon package. This commit
removes it.
8639a96243 When selecting utxos in yg, count in that change should be above dust threshold already on the first try (Kristaps Kaupe)
Pull request description:
<del>Should reduce number of</del> <ins>Eliminates</ins> the following errors for yield generators in cases when mixdepth with too low number of satoshis above cj amount + dust is choosen instead of different one with bigger balance.
```
2021-05-06 10:00:01,998 [INFO] filling offer, mixdepth=X, amount=YYY
2021-05-06 10:00:02,236 [INFO] sending output to address=ZZZ
2021-05-06 10:00:02,428 [INFO] dont have the required UTXOs to make a output above the dust threshold, quitting
2021-05-06 10:00:02,428 [INFO] Maker refuses to continue on receiving auth.
```
Also makes code simpler. Test suite has specific tests for this case (that `if change_value <= jm_single().DUST_THRESHOLD` path in old code is chosen), they pass.
Top commit has no ACKs.
Tree-SHA512: 3e4f59fed41843baa783e80382f8e85d50fb8b7a88e1107155cda02ac43e27a859a0986f5a616230613babc77d6ba33606663c9132c2c1b651138c1e7a043b34
392f51b38b Remove rand_pow_array(), it's not used anymore (Kristaps Kaupe)
Pull request description:
Resolves#869.
Top commit has no ACKs.
Tree-SHA512: de21e50513216b7a8923414726c4adf6712dd668ca000e957f0aabcba4fa74262fe95ebaef6997b1a8178a47c4cc8ccd1232714854bdfb0032190da147c43b30
16294bc402 taker_utils: Fix typo in comment (csH7KmCC9)
Pull request description:
ACKs for top commit:
kristapsk:
utACK 16294bc402. This is trivial, will just merge.
Tree-SHA512: b52daa33a344879208599ca579b80ea0f25f943bbd7898334f2ae977c665e18904252b6d8ec3fff11688a0b5ad41c869c4ddc72e1f5dbd375300598caff924e2
7bfc758110 Use mempoolminfee instead of minrelaytxfee as tx feerate floor (Kristaps Kaupe)
a982ea0e17 Better tx feerate formatting (Kristaps Kaupe)
Pull request description:
With the current state of mempool being constantly full, it is better to use `mempoolminfee` as a tx fee rate floor instead of `minrelaytxfee` (which is usually just 1 sat/vB), otherwise your local Bitcoin node may refuse to accept transaction if it's txfee is below certain value (I think it's around 3 sat/vB currently with default config). And this floor should be checked also when `estimatesmartfee` is used, as it can give you values below that.
Also improved feerate formatting (you don't want gazzilions of digits after decimal point, it's useless) and choosen tx feerate logging.
Top commit has no ACKs.
Tree-SHA512: b5ae53491bc4efa71ceaf5b7bd9955f573f563514bb884b53130ab918fd6a19fce1c0a924ef2c4064ffb57fd869dd9c02f8d683a8c25f825b4dac48f0a6caf1d
1d74222 Fix year 2038 problem in fidelity bond wallets (chris-belcher)
Tree-SHA512: 1a975818aa01f90ce132e0a7761965fcb67ea6fe22f29d38609ebe2900217b9125458714f195d731bc5c8919c6ed6b1827ddf7fd201ca6c25b67235eb7088ce5
This commit fixes two minor bugs encountered in
running create-snicker-proposal.py. First, the
port for AMP connections was not correct (by
convention it is now the Joinmarket proto main port
minus 1000), second in the above mentioned script,
the reactor startup client side was not disabling
the Joinmarket protocol, as it should.
* Rephrases from `wallet` to `spending mixdepth` and generally add hints about sourcing from other mixdepths as a usecase of `add-utxo.py`.
* Changes the `commitments_debug.txt` example.
Prior to this commit, the receiver code was assuming only
2 inputs always, when it decided how to change the input
ordering (randomly doing a reversal), but this is not correct
according to the BIP78 spec, which requires that the
receiver's inputs are *inserted* randomly, without changing
the ordering of the existing (sender) inputs. After this
commit, the BIP78 protocol is adhered to for any number of
inputs.
Added test for random_insert and for payjoin with 3 inputs
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 txtorcon package was issuing
a `GETINFO 'config/defaults'` request to the Tor control
port, which reveals potentially sensitive info, and also
sending a `CONF_CHANGED` request which is not needed. These
requests are removed by patching the library (which is hacky
but in a pretty minor way). This does not affect the Payjoin
workflow.
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.