3e71df586b Fix ShellCheck warnings (Kristaps Kaupe)
027682ab2c CI: Add ShellCheck (Kristaps Kaupe)
Pull request description:
Could use `./test/lint/lint-shell.sh` instead, but this way was simpler.
https://github.com/marketplace/actions/shellcheck
ACKs for top commit:
roshii:
utACK 3e71df586b
Tree-SHA512: 4f98464b397088293ea0c7736e835d94b7079c53f0958c36aeca62d68a586fd69fa05988591dbbba51f64824ef58e5341cc7930217fba0f2b2b4aa53e3735080
438cb41c23 Replace readfp() (roshii)
Pull request description:
Replace `ConfigParser.readfp()` with `ConfigParser.read_file()` as per Python [docs](https://docs.python.org/3/library/configparser.html?highlight=configparser#configparser.ConfigParser.read_file)
The latter is available as from Python v3.2 while the former breaks as from v3.12
ACKs for top commit:
kristapsk:
ACK 438cb41c23
Tree-SHA512: 9f0c7b35a8410a49f4c7486d25535e8f4e47cc40f794c1e83d8b8ee070aa55fcf5a8e6424fd6ebf09c9978bd4e6259c9f26e7d17e2cac55745725bf44cd97917
1a8d0ea683 Correct help description for --develop (Kristaps Kaupe)
Pull request description:
#1484 changed the meaning of `--develop`.
Top commit has no ACKs.
Tree-SHA512: 162d6255ca6750a691a1b9fcb6897b6397fb0345c092bdceb88e2142f5429919fb73f2c7dd5f4d7a54576eb9f9d2409d00f0d33a9f4d458b60fdbd08e72336a1
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