Before this commit, if the sender specified
the additionalfeeoutputindex as 0, the receiver
incorrectly treated this as meaning it could not
decrement the change value at all (treating zero
as false in Python `if`), meaning that the feerate
was reduced more than intended, or in extreme
cases, the payjoin fell back incorrectly because
the feerate fell below the specified minfeerate.
After this commit, the additionalfeeoutputindex
value specified by the sender is correctly used
by the receiver in all cases.
Fixes#889.
Prior to this commit, it was possible for the
yg-privacyenhanced.py script to go into an infinite
loop of attempting to halve the txfee setting, in case
the user selected (a) reloffer, (b) an absurdly low
minsize like 1 sat, and (c) a txfee of zero.
This occurred partially due to the randomization of minsizes
included in the yg-pe algorithm, which could lead to a
pathological zero value for minsize.
After this commit the minsize is automatically bumped to
the `DUST_THRESHOLD` value if it falls below it, preventing
the possibility of a nonsensical value.
Additionally, the loop which halves the txfee is no longer
allowed to continue beyond 20 iterations, as an extra sanity
check.
4599bd75a8 Fix autofreeze warning on Qt (Adam Gibson)
Pull request description:
The autofreeze utxo callback takes a `utxo` as argument, not a utxo string, so convert here in `joinmarket-qt.py`, just as in `WalletService.default_autofreeze_callback`.
ACKs for top commit:
kristapsk:
ACK 4599bd75a8, tested before / after, merging.
Tree-SHA512: ddb13cc98bd6a116636a8e863f93696537402be71de17e169152537425b28cdb062288b442489e03f02fbcd76134269b33e49495078fff7c206f9c12543b91c2
The above commit added custom change addresses, however it
introduced a bug for multiple transaction schedules on the same
Taker object, as happens with tumbler for example: a new
change address would not be created for new transactions.
This commit fixes that and ensures a new change address is always
chosen when a custom change address was not specified for the
Taker object instantiation (which is always the case for tumbler).
This removes any reference to the `key-type` parameter on the
`importprivkey` wallet command from the code and from the help output.
This parameter was already effectively being ignored, the key type would
always default to the key type of the wallet. This brings the help info
and the code comments in line with the existing functionality.
79493749d9 Clear single send form after successful send (Kristaps Kaupe)
Pull request description:
Helps to avoid accidental sending twice to the same recipient and also clears fields for the user who needed to do it manually if doing more than one send in a single JoinMarketQt session.
Top commit has no ACKs.
Tree-SHA512: 1f79663d1d24718d038972d3b5d670f1a00f038b5169a627c82657154b3587c515b7c9fe99924208dc21e32ddb2e38d0cb8bab54cbe359585e0e459d94f5bbfc
Fixes#797.
Adds `custom_change_addr` argument to `direct_send()`
joinmarket-qt: Adds input field for optional external change address
joinmarket-qt: Better handle PayJoin/CoinJoin state changes for changeInput widget
Adds `custom_change_address` argument to Taker constructor and use it in joinmarket-qt
Custom change also allowed in sendpayment CLI with `-u` flag (not
supported in tumbler).
Explicitly disallows using custom change with BIP78 Payjoin, though that
could change later.
Both sendpayment and CLI provide detailed warnings to avoid misuse. In
particular, they have an extra warning for using a nonstandard or
non-wallet scriptpubkey type.
Setting custom change to the recipient address is explicitly forbidden.
Tests: Adds custom_change usage test in test_taker.
79bb3ff5b3 Allow to specify all conftest.py arguments to run_tests.sh (Kristaps Kaupe)
Pull request description:
Without this `test/run_tests.sh` can't be used if Bitcoin binaries aren't on `PATH` (that was the problem @csH7KmCC9 was having in #859 discussion).
There is some ugly copypasting in `parse_flags()`, but, as this is only testing script, I don't want to spend time to make it nicer right now.
Top commit has no ACKs.
Tree-SHA512: 8a085d6b1e19db8546b68393129ee235830ed5633ad41dc886b04e8529ecf434a020770ca799c8f7db7403b6e6162d2c56a1fd3b86506ed4d8ea079885403e33
f2362dce9a Log whole IRC message on "bad command" (Kristaps Kaupe)
Pull request description:
Log messages like "bad command 1" are confusing and doesn't help in debugging. I see no reason to not log whole IRC message.
Top commit has no ACKs.
Tree-SHA512: b9d5a490b2559b43dc9552434062f38108b2be3d9aae18cc49beaf4060f9342d64006fa6e972413e8031b6c3c754ada3d1f653502411408b564c42c3f6ca02d1
e7027ab20b Change IRC ports for local tests (Kristaps Kaupe)
Pull request description:
`127.0.0.1:6668` is already taken if you run I2P daemon (`i2pd`) with default config on the same machine. Any hardcoded ports can collide, but 16667+ seems to be safer value than 6667+.
Top commit has no ACKs.
Tree-SHA512: cb1b9c38e6282ab9b0f2c6cf5066a5fdcfb193a505472836aa70600bcddc51311496f343fed04540ef42c8bcf9c8a18f1f79d37d40e8389985fa6f64c1d79c0c
darkscience actually already running a v3 address, just the website isn't updated yet. you can try darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion
25b2e8e6f4 Don't create logs, wallets and cmtdata subdirectories under scripts (Kristaps Kaupe)
Pull request description:
Leftover from #475. These empty directories may confuse users.
Top commit has no ACKs.
Tree-SHA512: fafe30639a4b14a95b15bf947011ca6b8ca54a69576e133efc51dbcb530abfabd9df4affc081eda196954e331a337f263444d858474df3153775920c33873eb2
No address is a valid state for the addressInput. Not having entered an
address *is* an error once the user clicks the start button, but that is
handled by `validateSingleSend()`.
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