- update mktx() to allow optional locktime setting (and sequence)
- add a mk_shuffled_tx method to the wallet module
- add a P2EPTaker and P2EPMaker class (inherit from Taker, Maker)
- add a -T option to sendpayment script for doing payjoins
- add a receive_payjoin script for receivers.
- add payjoin tests in jmclient/test/test_payjoin.py
- add a custom utxo selection method select_one_utxo to support.py
- support bech32 wallets (SegwitWallet, p2wpkh) with native=true
in config POLICY for PayJoin and direct send (not Joinmarket CJ)
- add a PayJoin.md usage guide in docs/
- include version bytes in pubkey message for forward compat
- taker pays fees but controls size (utxo number and fee/kB)
- add P2WPKH fee estimator
- Enforce INFO level logging in payjoin
- refactors regtest config settings into one place
- bugfix: script_to_address vbyte argument is bytes not integer
Bug introduced with c139067be4
Return empty string instead of None from wallet_fetch_history() as wallet-tool.py prints the result
all wallet_tool_main return vals as string
Noticed (rare) problem on my maker today: it announced a wrong size. Investigating this identified this root cause:
1. a taker was building a big coinjoin with 8+ counterparties and a rather large amount, which meant it had *lots* of inputs
2. Building that TX and receiving all signatures from all makers took longer than the default timeout, that any maker waits for a coinjoin transaction to be broadcast (90 sec). Especially because there's a rate throttling to decrease the load on the IRC servers built in - so the taker intentionally slows down.
3. After around 100 seconds it was indeed broadcast, but the maker was not polling for that TX any more.
4. The TX confirmed. But the maker has no knowledge of this transaction. This means (potentially) he announces amounts that are not correct any more.
This is not a huge problem, but super easy to fix.
Proposed solution: increase timeout. I've checked my logs, I have seen this 'faulty' behavior 3 times in the last 2 months. It always was between 90-130 sec in those cases. Going from 90 sec to 180 should fix this.
Downsides of this change: can't think of any problems with the change. Anyone else?
* parsing of scripts and addresses of all segwit types.
* ability to verify arbitrary tx inputs for all segwit types.
* simplify mktx syntax (only allow [],[] args)
* add p2wpkh and p2wsh spending test and fixes to sign calls in wallet
* simplify wallet signing calls in cryptoengine
* add p2wpkh engine, add bip84 wallet
Before this change with wallet-tool.py you would get "ValueError:
invalid padding byte" and "jmclient.storage.StoragePasswordError: Wrong
password." exceptions, joinmarket-qt would fail silently.
Prior to this commit, if a user chose cancel while selecting a
filename for a new wallet in Qt, the wallet name was set to the
default `wallet.jmdat`, which could lead to a crash or overwrite.
This fixes that by ensuring that the wallet generation code
recognizes the cancel operation.
Previous to this commit, the jmbitcoin package was accessed via
a file in jmclient `btc.py` which was originally added as an
interface to allow the client to use a non-jmbitcoin package to
provide the implementation; while this idea is useful, the way
it was implemented was not, moreover it is not currently used
and contained duplicated code that was unmanaged. Also, the
original usage of this was only by the electrum plugin, which
has currently been abandoned. This simplifies the code and
avoids spurious error messages. Note that most of the changes
are a result of pulling the logging function directly from the
jmbase package instead of indirectly via this interface (which
was unnecessary and not connected with jmbitcoin).
Prior to this commit, the test function test_tumble_tweak in
jmclient/test_schedule.py would occasionally fail due to the
creation of a schedule with less than 7 transactions, resulting
in an index error when trying to tweak the remaining schedule
entries (of which there were none). Here we bump the number of
mixdepths to make this probabilistically infeasible.
Previous to this commit, if a utxo string did not conform to
the standard txid:n in hex format, of the correct length, an
exception would be thrown (specifically for invalid values of
the output index, which must be parseable as an integer). This
could allow a taker to crash a maker by sending an invalid
commitment string. After this commit this invalid utxo is
correctly ignored (and the commitment of course is invalid).
Previous to this commit, if certain types of invalid addresses were
used as coinjoin or change address by the maker, the address_to_script
function would throw an uncaught exception. This validates the maker's
chosen destination addresses before allowing them to be included in the
transaction.
The test file added here can be run locally to see potential
errors in E2E coinjoin operation, but it is not yet ready to
be included in automated testing, since errors may occur silently
in this setup. This should be fixed, and then the test should
be added to travis, in a future PR.
Previous to this patch, if an already-spent utxo was proposed
by a counterparty, the counterparty would be removed from the
proposed transaction but the input (utxo) would not, meaning
that the transaction would contain inputs for which signatures
were never going to be provided; these transactions simply time
out. This was not, of course, intended behaviour, it was intended
that the transaction would complete with the valid utxos from the
other counterparties. That's what this patch does.