721b6ede78 Allow any case for scheme part of BIP21 URI as per spec (Kristaps Kaupe)
Pull request description:
https://github.com/btcpayserver/btcpayserver/issues/2110
[BIP21](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki) states that scheme part of URI must be case insensitive:
> The scheme component ("bitcoin:") is case-insensitive, and implementations must accept any combination of uppercase and lowercase letters. The rest of the URI is case-sensitive, including the query parameter keys.
We required `bitcoin:` part to be lowercase, this is a fix for that.
Top commit has no ACKs.
Tree-SHA512: b33c89893cb13a1d23742bfb129ae9b86a367d7fda003a1eac4953b667bbc076780f31515aeff92edad214023ce9fdbc46416a9cf1f98a1c9bc385eb721821aa
Fixes#743. The utility function `get_utxo_info`
tests the validity of the utxo string and the private
key, so there is no need to repeat this test; but we
need to add utxo data in binary format, so an option
is included to return it in this form.
The 4 ways of adding external commitments were tested
as all working after this commit: read in from json,
read in from file (csv format), read in from command
line and read from wallet.
Also fixes#741 - help message refers to correct
scriptpubkey types.
Before this commit, if an RPC connection failure occurred,
while the program is shutting down, it could raise an Exception
in the BitcoinCoreInterface.get_transaction() call triggered
by the WalletService.transaction_monitor loop. This commit
prevents that.
Fixes#736. Prior to this commit, the 'relay fee floor'
was being shown at INFO level in the command line output,
but not the actual feerate paid (in direct send scenarios;
the coinjoin scenario is rather more complex since fees are
not known before negotiation flow, but estimates are printed).
After this commit, the output at INFO level for direct
sends shows specifically the feerate and then the actual fee,
with min relay feerate relegated to DEBUG messages only, for
cases of manual feerate setting.
There is also some minor cleanup in comments and coinjoin fee
estimate messages are removed for non-coinjoins.
Before this commit, if a user specified a wallet filename argument
to `wallet-tool.py` and also one of the noseed methods 'generate',
'recover' or 'createwatchonly', it would cause a crash. This is
now checked for and a readable parser error is provided instead.
Fixes#737. Before this commit, startup of
Joinmarket-Qt does not necessarily work "out
of the box" due to changes in PyQt 5.15 that
create external dependencies on shared libraries,
see comments on the Issue for details.
While we had formerly pinned PyQt 5.14, it is
in fact necessary to also pin the version of
PySide2 to the same 5.14.2 to remove the
problem.
Before this commit, the taker would choose offers from
the pit based on the setting of `native` in the `[POLICY]`
section of the config object; however this could lead to
users unwittingly choosing the wrong offer type, i.e. one
that is incompatible with their own wallets, which could
result in coinjoins with mixed address types.
This commit fixes that error by only selecting offers that
are compatible with the return value of `BaseWallet.get_txtype()`.
Also fixes up tests for this wallet type enforcement.
d5cf3878ae Get rid of remaining direct rpc() calls outside blockchaininterface.py (Kristaps Kaupe)
Pull request description:
Follow-up to #501.
Test suite passes and also did some manual testnet testing. Had error receiving payjoin from testnet.demo.btcpayserver.org, but that doesn't seem related. More testing is needed before merging.
Top commit has no ACKs.
Tree-SHA512: 036483b0f47349dc3bd6fd8bb5be153e338f7fe547c7e5194becd1ba5975fe1d9880f2d557519a7a9a708da263dd18e38cf4c28a03d5fd9348fef73032b1e6e9
Before this bugfix, the user-chosen minsize is passed
to the constructor of the YieldGenerator class unaltered,
even though it was dynamically updated to ensure 20% of
txfee profit in all cases (the wrong variable was passed).
This commit fixes that (`minsize` not `options.minsize`).
This commit updates sendtomany.py and add-utxo.py to reflect
the new default wallet type (p2wpkh) and the new bitcoin
backend code; in doing this it slightly modifies the functions
in commitment_utils.py.
Before this commit, the yg-privacyenhanced.py script,
which always randomizes coinjoin fees, was not including
`sw0absoffer` in the offertypes for which the randomized
fee must be kept as an integer, not as a decimal, resulting
in those offers being ignored by other bots.
After this commit, `sw0absoffer` (as well as `swabsoffer`)
offers always use integer coinjoin fees, as intended.
* yg scripts set reloffer/absoffer only:
Prior to this commit, the yield generator user
level scripts required the user to specify offer
types depending on the wallet, but only 'rel/abs'
distinction is user choice; the other element
(native segwit, p2sh or p2pkh) must be defined
by the wallet, so we now call `wallet.get_txtype()`
to translate from reloffer/absoffer to sw0.. etc.
* Taker chooses nversion, nlocktime per wallet type:
Takers who are still using p2sh-p2wpkh wallets will
not want to flag their transactions with different
tx metadata than previous versions that are still
running, so we check the `get_txtype()` output to
decide which nVersion and nLockTime to use.
Also, the SNICKER locktime is reverted to zero as
according to draft spec.
* change offer type in test_coinjoin
* update docs for bech32 wallets
aa3cec4623 Make libsecp256k1 tests optional (Kristaps Kaupe)
Pull request description:
They are expensive and slow, especially on a slow hardware like
Raspberry Pi.
Inspired by https://github.com/bitcoin/bitcoin/pull/20264.
Top commit has no ACKs.
Tree-SHA512: ad23f8bab1f95fb5d0d7c6f2bcbe1a6950f7f62dd82e8d34d65abf6dffcfd1e7f9100d7c1423d1d8764ba6ce5145f5df17035130314432bb6e44361e7d773960
394e6727e6 Add link to orderbook.md (Luke)
Pull request description:
This is the continuation of #716, now that we have a doc file for the orderbook I think we should advertise it somewhere.
Joinmarket is, as the name suggest, a market and an orderbook is a fundamental part of a market.
Under `Usage` seems a natural fit, as the orderbook should be one of the use cases of the repo, and gives it max visibility, but I don't have strong opinion if you have a better place (I thought about the `USAGE.md` file but I'm not sure where to put it there).
ACKs for top commit:
kristapsk:
ACK 394e6727e6
Tree-SHA512: fea1a949e3b48275c714ceb6a460a414af463c8e6298f055f6a94578d49a30051f93cd55a284704452e2a021aea75d2f07a12267d34ca6550ab3465cef73df28