The transaction_monitor function in WalletService was polling the most
recent 100 transactions from the BlockchainInterface every 5 seconds.
This was egregious and inefficient. Introduce a _yield_new_transactions
function that remembers the newest previously yielded transaction
between invocations and yields only transactions newer than that one.
Use the new function in transaction_monitor.
Avoid repeatedly deserializing confirmed transactions that remain in the
set of monitored transactions after being confirmed either due to
"confirmed" callbacks that return False or because callbacks have timed
out and have been unregistered without cleaning the set of monitored
transactions. Change the active_txids list to an active_txs dict whose
keys are the txids and whose values are the deserialized transactions.
Use this new dict as a cache to avoid repeatedly deserializing confirmed
transactions.
Alter the BitcoinCoreInterface._yield_transactions generator to be
nicer in cases where only a small number of transactions need to be
examined. Geometrically ramp the requested number of transactions in
each successive request, starting from 1. Since new transactions can
appear in the Bitcoin Core wallet between RPC calls, overlap successive
request ranges and resume yielding transactions after finding the
previously yielded transaction to avoid yielding duplicates.
The listtransactions RPC of Bitcoin Core can return the same (txid,vout)
as both a "category":"receive" and a "category":"send". Therefore, use
(txid,vout,category) as the sync key to ensure that all distinct
elements are yielded.
Delete the unused wallet_name parameter from _yield_transactions, per
suggestion by Adam Gibson.
Prior to this commit, the file commitmentlist, which stores
commitments (podle) for makers to let them blacklist/prevent
reuse was stored in the local directory for the script, which
allowed remote running of jmdaemon but was very unhelpful for
any situation where multiple bots are running at once, e.g.
in testing or using multiple wallets against the same codebase.
This could result in incorrect rejection of coinjoins.
After this commit, by default, the commitmentlist file is stored
in datadir/cmtdata/commitmentlist, so it will be local to any
custom data directory as would be the case for running multiple
wallets on the same machine. A user can set the POLICY variable
commitment_list_location to "." to revert to the previous behaviour.
308f739467 Print which option is invalid in shell scripts (Kristaps Kaupe)
Pull request description:
To save time when you have a typo in single of them in a long list.
Top commit has no ACKs.
Tree-SHA512: 56d34b11aede9e3cd9cd5e2f79b1c43fa79dc53c9d0f650148ee4e0c0ad400e70b9847254d40bba7bf08e5da1fe955c9eae769746f2e144968d6cea8837785cd
fbab9aadf2 Update YIELDGENERATOR.md (Steve)
Pull request description:
Fixed documentation to point users to the joinmarket.cfg file for yield generator configuration.
ACKs for top commit:
kristapsk:
ACK fbab9aadf2
Tree-SHA512: c534944d77ed6470c48f1ba82b21dbcd3ba3145138b4e1682d2dd25eef4ac09c66d3285311c02e76214d27f5bbf74751bb981cad9a4ec8cb1a891221a747c0e2
9594238886 Output script instead of address in /orderbook.json (Kristaps Kaupe)
Pull request description:
Fixes#1193.
Top commit has no ACKs.
Tree-SHA512: 866e76ef1ab7e9a99a6feb9133ba347f356b14e06113898038a6c7afb146428e12cd529347e690276f8742beef0e5f0f0f0771f9cb3c7a56dd0dafa392de6e74
d832d788d1 Create un/freeze all command in wallet-tool freeze (chris-belcher)
Pull request description:
If a user has many UTXOs but wants to spend just one, they would have to freeze all the UTXOs one-by-one except for one, then after sending do the same again unfreezing all UTXOs one-by-one. This new command drastically speeds up this process.
ACKs for top commit:
kristapsk:
re-ACK d832d788d1
Tree-SHA512: 16c24de153a22d7025bcfb622ac7cba3ab3438c86d0d1cce07deb3b828f1463713ab8c8ee41694a55e7d5074dc2fd92359afb6424ea59d2c2ac905b9dfdfe7e3
If a user has many UTXOs but wants to spend just one, they would have
to freeze all the UTXOs one-by-one except for one, then after sending
do the same again unfreezing all UTXOs one-by-one. This new command
drastically speeds up this process.
97e4816ca6 Update default makercount in USAGE.md (Luke)
Pull request description:
The default number of makers is [8 to 10](83918a971d/jmclient/jmclient/cli_options.py (L474)).
ACKs for top commit:
kristapsk:
ACK 97e4816ca6
Tree-SHA512: 25ba5946195016326ce5092ad5b396612f5fd5a848a0abbbf07d2ff08b4b16f5a5320e1132e0a8d3c76ec494e94930adeda2f106ddfa0211d426f2863f087002
This commit fixes an issue regarding a wrong taker state caused by
initiating a taker operation when no `max_cj_fee` value is present.
Before this change the taker state switches to `running` indefinitely.
After this change the config check is made before updating the state.
06dc4f7a05 fix: improve NotEnoughCoinsForMaker error message (Thebora Kompanioni)
Pull request description:
Changes the error message when the maker cannot start due to not enough coins from:
`"Maker could not start, no coins."` to `"Maker could not start, no confirmed coins."`
According to @AdamISZ [here](https://github.com/joinmarket-webui/joinmarket-webui/issues/34#issuecomment-1032558663) this could be an improvement for the user, as it might make it clear that coins need to mature.
Please just dismiss if you think it's not a good idea.
Edit: The newline change has been made by GitHub automatically.. 🤔
ACKs for top commit:
kristapsk:
utACK 06dc4f7a05
Tree-SHA512: c72441e1050ec664248da01bd2df9a3fc95cf7477ea512d876797e4798ae5d915771821efa42a7de4da71df08295d796517f5eda2aabd49eb171ecc2529d9b82
7445f3a39d docs: fix example in comment of default config (Thebora Kompanioni)
Pull request description:
A small error was introduced while formatting the comments in the default config.
Should be `thousand` instead of `million` in the comment of `max_cj_fee_rel`.
ACKs for top commit:
kristapsk:
utACK 7445f3a39d
Tree-SHA512: 8a01522617da3bb285ddec356362e79bf86d6a43a5f33f0f97892bd832fd7d5eba4e60cac1392558e41ab0831393102aeda04180da0cc6fc0dc036ae1edd925c
Use sats/kilo-vbyte
Use words for large numbers
Improve unit consistency
Improve newline consistency
Improve comment consistency
Improve capitalization consistency
Improve section consistency
c5456e4a6a Don't show nonwallet_custom_change_warning in Qt GUI for non-cj sends (Kristaps Kaupe)
Pull request description:
Fixes#1171.
It was already functioning correctly as expected with `sendpayment.py`, but not in Qt GUI, where in case of unrecognized change address type it showed warning also with maker count being 0 (that's why nobody noticed it before testing #1084).
ACKs for top commit:
AdamISZ:
tACK c5456e4a6a
Tree-SHA512: b695d5b16432f29e72e626faba3bdbf3bd4a46678a7c833ed2908d9b93fda8e183c44bc1904d7d600e273c074ad1411dc901100a2c869bab003fc5c25dfe1474
Fixes#1170.
Prior to this commit, an attempt to spend using
the direct-send endpoint in the RPC API would
cause a backend crash because the NoFundsException
was not being caught.
This is now fixed.
Adds code to validate bech32m encoded taproot addresses
and scriptPubKeys. The underlying functions are in
python-bitcointx upcoming version 1.1.3.
Adds tests at both the basic address validation layer,
and also at the layer of sending transactions to
taproot outputs.
c957c8cacb Read only single line with `--wallet-password-stdin` (Kristaps Kaupe)
Pull request description:
We don't allow to enter multiline passphrases in other places anyway and this allows to feed other data via stdin to scripts afterwards.
Top commit has no ACKs.
Tree-SHA512: be94e66204f7acfb06a2354f100c83df9e2b25cd2050e8c53f7098f9327ca1881b8135610abe0903ed28534c6054677f4472bc990e125916dfb5511b296b4160
c0d6610df0 Limit number of parallel builds to CPU core count (Kristaps Kaupe)
Pull request description:
I noticed too much parallel build processes for some time, but somehow missed that `export MAKEFLAGS='-j'` previously. If `-j` is given to `make` without any argument, it means unlimited job count. It may cause problems, especially on machines with limited available RAM amount (see https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1000#issuecomment-962425193, for example). And building in parallel with more jobs than CPU cores available does not make much sense.
Top commit has no ACKs.
Tree-SHA512: d59b0cc29d874aeb7079ef124de4bff9ca301995cc0c0a21cbcfebe56c84ca2f84a8196aceedfc763bf0fcc1216434b5f55fd3534d31fffd87bb74351d8024b6