70366ffede Bump cryptography to 41.0.4 for all platforms (Kristaps Kaupe)
Pull request description:
Remove conditions for old `cryptography` for 32-bit platforms. Back in a day it was pinned to v3.3.2, because newer versions introduced Rust as a dependency and 32-bit platforms don't have pre-built wheels. I think we should get rid of this hack - 1) not much people are running 32-bit OSes anymore (years ago default Raspberry Pi OS was 32-bit even for 64-bit boards, that's not true anymore), 2) none of developers actually tests stuff on these platforms and against such old `cryptography` versions, 3) it should be still possible to use JM with 32-bit archs, just local installation of Rust will be needed to build.
Also bump to v41.0.4, as v41.0.2 and v41.0.3 is statically linked with vulnerable versions of OpenSSL (although these vulnerabilities should not affect JM).
ACKs for top commit:
roshii:
utACK 70366ffede
Tree-SHA512: 57a75a21f38d0e793bafc89bacf5487131a4848e2a1fbd72c281e84ca5c64bc673a91d1484bb5fd4ec3c69d07a333a12bceb5cabe0e5eb76b62f9631a83b6732
83d7ebb40b Log in case JM loads RPC wallet at startup (Kristaps Kaupe)
Pull request description:
There are some cases when this operation can be slow, better log. Otherwise user might think JM just hanged up.
In my case I was doing some testing on ARM machine where I don't run JM everyday, so that wallet haven't been used for a long time and Core needed to do rescan for almost 8000 blocks.
ACKs for top commit:
roshii:
utACK 83d7ebb40b
Tree-SHA512: b605e5e9310113caf21f540a62c2604a80dcbc054515f85d747a782a7220153631e3e4593d1c05821f9a8dcb50602355129c2903d85dd15007c12dc8f6dbb4e2
71815129e3 Upgrade setuptools also with --docker-install (Kristaps Kaupe)
Pull request description:
This was missed in #1484.
ACKs for top commit:
roshii:
tACK 71815129e3
Tree-SHA512: 4e7d3fb139558d24992bf78b22b8a191fdbf99de14abc34adfd370b7bd2d3ff8b1ceaf1c6c2ccf1b000107e83c87420e73b4fc1cb1453883502f1e83f137737f
1ebb68f119 Update txtorcon to 23.0.0 (Kristaps Kaupe)
Pull request description:
Replaces #1558.
Changes:
* Drop Python2 support
* Fix a bug with stream updates (and CONTROLLER_WAIT)
https://github.com/meejah/txtorcon/releases/tag/v23.0.0
Top commit has no ACKs.
Tree-SHA512: 1a3cc28d05ab90cf1e33fcd5322b099e0674bffa5879a93330857c14113a32c71cad708f2c01e680a3229ad3aaea27c9baaf076ee9786d48db808d61412a5978
c8eef50e93 Migrate to modern packaging and src layout (roshii)
Pull request description:
- Migrate to src-layout following https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#src-layout to facilitate automatic package discovery and editable installs.
- Create `joinmarket` namespace distribution package in line with https://packaging.python.org/en/latest/guides/packaging-namespace-packages/
- Migrate to `pyproject.toml` file for project configuration instead of legacy `setup.py`
In practice:
- Joinmarket packages are moved to `src` folder, with their respective test moved to `test` folder at project root
- Optional dependencies definitions groups allows a granular installation depending on user needs
- Integrated test cannot be run prior to subpackages' respective test, `reactor` is somehow left unclean by the latter., the former test definitions are therefore moved to a dedicated `unified` folder.
- A private module is created in `jmqtui` to be run upon UI update (not tested)
Fixes https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1491
Top commit has no ACKs.
Tree-SHA512: f88c4f58c114700a68cbc451fa37ad53e9e2e07b837c20ac4d83a73e6803a28a4a38ec68320932ba309a72107d6747f37465f9898a9cdf0e2f210aa067146e1b
c08e824d02 build(deps): update tor from v0.4.7.13 to v0.4.8.7 (theborakompanioni)
Pull request description:
Updates local tor from v0.4.7.13 to v0.4.8.7.
~~Release notes: 51cefce3e6~~
ACKs for top commit:
kristapsk:
ACK c08e824d02
Tree-SHA512: cf4368ec95897b22ed94b228f1d0feb9a08c939ecec5b82f84d5d68df43aa0d7898907856ca53d5bb9a3b4da26b2e8611d37a86fe59f12ab0160287477331b11
c9c4648ee1 Update release-notes-0.9.10.md (Bitcoin Belly Button)
Pull request description:
Added instructions on how to recreate the joinmarket.cfg when upgrading,
Top commit has no ACKs.
Tree-SHA512: 2fb03e049972371514ba4e58b71bf3b55967f2d0f338c7bbadec1df33beb70c5605b403dc2962c908b931abfd0972be115b216d45b8f0d329a0c3323f6c00277
af9f462690 fix(docs): remove duplicate keys in wallet-rpc.md (theborakompanioni)
Pull request description:
Resolves#1552.
This is a hot fix to make the api docs served at https://joinmarket-org.github.io/joinmarket-clientserver/api/ work again.
Removes
```
'401':
$ref: "#/components/responses/401-Unauthorized"
```
in favor of
```
'401':
$ref: '#/components/responses/401-AuthenticationError'
```
when both are present.
This PR does not remove response `401-Unauthorized` completely, as it is still used and I am not totally sure which one of them is actually returned.
## How to test
```
cd docs/api
python3 -m http.server 9999
```
Then visit `http://localhost:9999` and verify that the page loads as expected.
ACKs for top commit:
kristapsk:
ACK af9f462690
Tree-SHA512: c876c7b18041307d7d9d6097ee756d45c09ca45a7d283f06014b30f96ad532d49395f1a47c6918b3c030859bff451443455220b4485598e49edd3320c5968f45
47bc77fd6b Fix some internal dependencies (Kristaps Kaupe)
Pull request description:
Alternative to #1543 (see [this comment](https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1541#issuecomment-1699409791)).
* `txtorcon` is used by `jmbase` too, not only `jmdaemon`;
* get rid of `jmdaemon` dependency in `jmclient`.
Fixes#1540.
Fixes#1541.
ACKs for top commit:
AdamISZ:
utACK 47bc77fd6b
Tree-SHA512: f0c60172d286d5b8baeb46288291d3a7ade1a7ed4d7945cd4f11a7ed04aa118a665dee0c6da0ee346b6a8c5270d2616ad3a31bb37dcbcf027b0d844566793bcc
3fc74fbe2a Refactor and cleanup of blockchaininterface and related (Kristaps Kaupe)
Pull request description:
Summary of changes:
* Add typehints to `jmclient/jmclient/blockchaininterface.py` and `jmclient/jmclient/jsonrpc.py`;
* Move all methods called by external code to `BlockchainInterface` base class or add abstract methods there;
* <del>Remove broken `ElectrumWalletInterface` (we can re-introduce it later from history if somebody wants to fix it);</del><ins> (done in #1477)</ins>
* More dummy abstract method overrides for `DummyBlockchainInterface` (for tests);
* Alphabetical ordering of imports and other minor stuff;
* Behaviour change - previously fee estimation would fail if it could not get mempoolminfee, now will go with default 10 sat/vB.
#1460 was part of this, but did separate PR for that one, as it is simpler to review small refactoring changes.
This should make it more easy to: 1) write new code that uses blockchaininterface, 2) write new alternative implementations of `BlockchainInterface`.
Top commit has no ACKs.
Tree-SHA512: 7699de0419c1006ff3c6ac5da7d26055b8e3508c424b5bdd3117fea575d30ab21e8617b2d50ae7c8b2e76997d6f4b14781bb56fcdad4efc081d533a713666a31
Summary of changes:
* Add typehints to blockchaininterface.py and jsonrpc.py;
* Move all methods called by external code to BlockchainInterface base
class or add abstract methods there;
* More dummy abstract method overrides for DummyBlockchainInterface (for
tests);
* Alphabetical ordering of imports and other minor stuff;
* Behaviour change - previously fee estimation would fail if it could
not get mempoolminfee, now will go with default 10 sat/vB.
Co-authored-by: Pulp <51127079+PulpCattel@users.noreply.github.com>
The JWT validation update in PR 1480 contained a small error: by calling
the function get_POST_body() twice, the content of the request was
unavailable in the second call. This calls only once, but has the
downside of requiring a specific set of keys in the json request data.
Hence this might be fixed to be more flexible later, see comments in the
PR.
b2822ddb95 Implement wallet RPC's JWT token authority (roshii)
Pull request description:
Implement `jmclient.auth` module to manage JWT.
Upon successful authentication (e.g. unlock wallet), response includes both a `token` and a `refresh_token`. The former can be used for call authentication, valid for 30 min. After expiration, user can call `/token/refresh` endpoint with his expired access token in header and refresh token in POST call payload to get both a new access and refresh token. Refresh token is valid for 4 hours.
Anytime a new access token is issued, refresh token signature key is re-initialized, invalidating any previously issued token.
Tokens are scoped to a specific `wallet_name` and a generic `walletrpc` category, and should allow future upgrades such as authorization granularity.
Fixes https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1297
Top commit has no ACKs.
Tree-SHA512: 44dd4338ceace04f838e92dae35b0df16b7d01d92599af57eb2652a9dcea0a41663128eec88f3e76efa0b6729a4b202122760b9ee0920863c128c0ec0ab2c83d
9f10af3adf Release notes and version for v0.9.10 (Kristaps Kaupe)
Pull request description:
My first attempt at doing release, please review!
Top commit has no ACKs.
Tree-SHA512: f52718385b90695aee6063f911d9705b5216c4aa7fc7574a4d5e8ed1e52fd3523485c3208c2c1e07f547c5f133f07642eb1198c17db35c8f73ea1276ffb8d704
e3681f7a8a Fixes websocket test in test_wallet_rpc.py (Adam Gibson)
Pull request description:
Prior to this commit, the test of the reception of a notification via the websocket would fail intermittently because the notification was being sent without waiting for the setup of the websocket connection to complete.
After this commit, we fire the notification event only after the setup and authentication check of the new websocket connection is complete.
ACKs for top commit:
roshii:
utACK e3681f7a8a
Tree-SHA512: b207a0a7d0d909dd523f2b344794c9f55bb08fdc1021ef41639a166c547947ce9b3f11ddb949c27f7dd607119f4d567e05dc1eae2aa760955eae96e139a02664
Prior to this commit, the test of the reception of a notification via
the websocket would fail intermittently because the notification was
being sent without waiting for the setup of the websocket connection to
complete.
After this commit, we fire the notification event only after the setup
and authentication check of the new websocket connection is complete.
88bd45b02e Parse URI params in guaranteed order, for duplicates, last one wins (Kristaps Kaupe)
cd1f394381 Add test coverage for is_bip21_uri() (Kristaps Kaupe)
6b2a248bb5 Add typehints to BIP21 code (Kristaps Kaupe)
Pull request description:
First commit adds typehints to BIP21 code, which now I try to do with any code I seriously touch.
Second commit adds test coverage for `is_bip21_uri()` public function.
Third commit makes sure we parse URI parameters in guaranteed order, if there are duplicates, last one wins. See https://github.com/bitcoin/bitcoin/pull/27928 for context.
ACKs for top commit:
AdamISZ:
tACK 88bd45b02e
Tree-SHA512: fcc0055dc2e12cff7d9246c6bd0207c7481da1070ca0d15b478456a1a5b57db61820fba3764ce5d9947565ded724fec2ef3c9856ab5055b5d2b0244395517afa
c9f6ac8610 RPC-API: add getinfo endpoint. (Adam Gibson)
Pull request description:
This commit creates a new endpoint /getinfo which currently returns only the version of Joinmarket (JM_CORE_VERSION) running in the backend joinmarketd. In future commits the returned dict may add more information, for example the current block height of the connected Bitcoin Core node.
Additionally, this commit fixes the response type of the /rescanblockchain endpoint as defined in the OpenAPI spec.
ACKs for top commit:
roshii:
tACK c9f6ac8610
kristapsk:
utACK c9f6ac8610
Tree-SHA512: 4ec6ea7311451068fa7b2f053598744588ec60557282b8f3ab82a5a1041fc04d0df5a31f9fc0ba403ffc5508c564abf4cb0e308c76fee6cd0650d5939b55f4bc
This commit creates a new endpoint /getinfo which currently returns only
the version of Joinmarket (JM_CORE_VERSION) running in the backend
joinmarketd. In future commits the returned dict may add more
information, for example the current block height of the connected
Bitcoin Core node.
Additionally, this commit fixes the response type of the
/rescanblockchain endpoint as defined in the OpenAPI spec.
828398fc1c RPC-API: read gaplimit from config (Adam Gibson)
Pull request description:
Prior to this commit, an attempt to change the gap limit used in wallet syncing, by setting gaplimit in the config via configset, would fail, since gaplimit was only being read from command line options. After this commit, the value of gaplimit in the POLICY section of the config, defaulting to 6, will be read and used in Wallet object creation, either via the createwallet or recoverwallet endpoints, or via the wallet opening operation in the unlockwallet endpoint. This can be used in combination with the rescanblockchain endpoint to allow discovery of funds in addresses beyond the default gap.
Top commit has no ACKs.
Tree-SHA512: 278f01f6cc0b5d8588da2d70a65de0151d3cfbbf4ff9f92b2318a8b035d260aa56df335cb76504e91cf5abde84dec5936d8b3c8bfdd15feb3f5fce47619e5873
c92120619e GitHub workflow update (test multiple Bitcoin Core versions) (Kristaps Kaupe)
Pull request description:
* <del>Remove Python 3.6 (EOL), add Python 3.10.</del><ins>Done in #1409</ins>
* Add support for testing against multiple Bitcoin Core versions, add 0.18.0 (oldest officially support for test suite) and <del>22.0</del><ins>25.0</ins> (latest stable release). Previously we tested against hardcoded 0.19.1. IMO testing against oldest supported and latest makes sense, if tests pass on both, they should pass on releases inbetween too, unless there is some behaviour affecting us changed twice.
Also changed Core downloads from bitcoin.org to bitcoincore.org.
For now, opening PR as a test and for discussion. <del>Will increase running time 2x.</del>
ACKs for top commit:
AdamISZ:
ACK c92120619e
kristapsk:
> ACK [c921206](c92120619e)
Tree-SHA512: 1b4d1c5037498923822448c00c7b53bbc133d7c9c5ad897884dd3fdc317145ad564e5de2df154b8ed39cdc21e2abdc18c6e945d243ba54199be68abcc39f7990