Fixes#1082:
This commit allows recovery of a wallet from a seedphrase
with a new endpoint wallet/recover. 4 parameters are passed in,
the same three as for wallet/create but also a bip39 seedphrase
as the fourth argument.
This commit also adds a rescanblockchain RPC call and status:
This adds a new endpoint /rescanblockchain which is (Core) wallet specific
(due to underlying JM architecture). This action is spawned in a thread,
since the bitcoind RPC call is blocking and can take a very long time.
To monitor the status of the rescan, an extra field `rescanning` is
added to the /session endpoint.
Also adds test of rpc wallet recovery
f6795e439f Add typehints to jmbitcoin/jmbitcoin/amount.py (Kristaps Kaupe)
Pull request description:
Was working on some other stuff and got to this and I think we should use typehints in future for anything we change, so splitted this off, should be easy to review.
ACKs for top commit:
AdamISZ:
utACK f6795e439f
Tree-SHA512: c8af41383212c06dd8b54081a0f2521762573e2b901a35cbc61ddd3f0a6226b4e2b93c217c079b85084dcb9cefa2aab7e11c22ea580cc604d71cce5a68db0a3b
373493fcce Refactor: move output descriptor code out of blockchaininterface (Kristaps Kaupe)
Pull request description:
This code was originally written before output_descriptors module was introduced. Also added tests.
ACKs for top commit:
AdamISZ:
utACK 373493fcce
Tree-SHA512: 72548414b6911f48dafe6e2cbcff3b7a5af03f5e11119106845ee1e434e87f4ef930ffd76c76bdfc775a2d80b370969975dd900c16eb1e3b84cbf54b66d901e3
cb2ad2b845 docs: add restart config to directory node service (openoms)
Pull request description:
Found it while testing that if Tor fails the start-dn.py exits and by default systemd does not restart it.
This small recommended change ensures that the process is restarted both in case of graceful and ungraceful exit and leaves 10 seconds between.
ACKs for top commit:
kristapsk:
utACK cb2ad2b845. Should not hurt in any way. Merging.
Tree-SHA512: d916553e091125a765b27a6c9a5bbb11b9a653d37af8e74e9521285a55ee91bf54f4a8c47bb4136762c6321036983c2921880db9c5e3ce4dbc0704d9a7414e13
f57e9fd42e Bump cryptography for 64-bit ARM and x86 (Kristaps Kaupe)
Pull request description:
Wheels for these are now being published, so there is no more problem with `rustc` dependency. But modern Linux distributions doesn't support old versions of `cryptography` anymore.
Using 37.0.4 not 39.0.1, as tests are failing with newer versions. Will open separate issue about that.
Resolves#1452.
Note that I had ability to test this only on 64-bit ARM (Python 3.10) and x86 (Python 3.9) on Linux, not other platforms.
Top commit has no ACKs.
Tree-SHA512: 6d1febfe65284652728aec2b09370fdde87b66358003cbad1ced5bfa984f466793d6b00f79b22ab3e2eda3826220102607dfa16c133cae6fb79e2314abb317d6
eeb362be6c added bumpfee.py script for bumping fees for rbf transactions (Tim Akinbo)
Pull request description:
Following the merging of JoinMarket-Org/joinmarket-clientserver#921, this PR adds the `bumpfee.py` script to enable fee bumping of replaceable transactions in JoinMarket.
Top commit has no ACKs.
Tree-SHA512: 7e85874997bb9db96326c7dbd2521dcfa364113d83c54d57051584756fa395bd902a7daccc9e6b1f44daaa92a30453f43707bf19e15f073171e4f4b1e16ad24c
refactoring to improve readability and testing
added support for taking the fee from multiple owned outputs as needed
added unit tests
removed same mixdepth restriction for inputs
added option for specifying which output to deduct fees from
added additional test cases
refactoring: moved tx_vsize to jmbitcoin package
added a sanity check to ensure that the transaction id supplied belongs to our wallet
fixed a linting error
Wheels for these are now being published, so there is no more problem
with rustc dependency. But modern Linux distributions doesn't support
old versions of cryptography anymore.
Using 37.0.4 not 39.0.1, as tests are failing with newer versions.
f8af2bf1f6 Fix libsecp256k1 commit ids in docs (Kristaps Kaupe)
Pull request description:
Noticed when reviewing #1444. Checked for all historical libsecp256k1 commits ids used historically with this:
```
$ git grep -h secp256k1_lib_tar= $(git rev-list --all) | sort | uniq
secp256k1_lib_tar="${secp256k1_version}.tar.gz"
secp256k1_lib_tar='0d9540b13ffcd7cd44cc361b8744b93d88aa76ba'
secp256k1_lib_tar='490022745164b56439688b0fc04f9bd43578e5c3'
secp256k1_lib_tar='f2d9aeae6d5a7c7fbbba8bbb38b1849b784beef7'
```
Then searched for old commit ids in whole repo (`grep -R commitid`).
Using wrong libsecp256k1 may cause problems because of ABI changes.
Top commit has no ACKs.
Tree-SHA512: ad7276aa282a31114f707fb541394a892a0ebc0f5d324925a11297ebde2bb6133efc3655f0d274e5f620723ec97e6e9fb01de4ee16807d0f63184945595e25e0
9574cfc42f release notes and version for v0.9.9 (Adam Gibson)
Pull request description:
Top commit has no ACKs.
Tree-SHA512: 924b68d1ec75af2b17fc5139403ecfa0a54fe69f3fa98131c0738e97356447a92a53dd6a5642e577451795b18d5a3fdcd39f89fa1814f20beead5e7e104ed191
1e159df8a9 Update bencoder.pyx to 3.0.1 (Kristaps Kaupe)
980edd6b2c CI: Add Python 3.11 (Kristaps Kaupe)
Pull request description:
All that was needed was upgrade of [bencoder.pyx to 3.0.1](https://pypi.org/project/bencoder.pyx/3.0.1/). It supports Python versions from 3.6 to 3.11.
Note that I haven't more carefully tested JM with Python 3.11, just made sure it installs and CI tests passes.
ACKs for top commit:
AdamISZ:
Based on above tests, and based on other discussoins, ACK 1e159df8a9
Tree-SHA512: b024359c0c55bdf677ea3161440351498fbb75997e771d80110cdfd44e75df5d1b2cce2d80c82d87239623d59807fae0161772d0bca2556f6e8d0bd8fd4f06f9
61b640073e Tests: bind to any first free TCP ports instead of hardcoded ones (Kristaps Kaupe)
Pull request description:
Without this, tests will fail if `joinmarketd` is already running in system, binding to default ports.
ACKs for top commit:
AdamISZ:
ACK 61b640073e
Tree-SHA512: f636abe3c6b14e042dfac4afbe839a4139b3a6d5d963d77691ac769f113b84051e07b232146651f6987338368a9dd3839e43b5d440e021a1b826c905ac810396
9a412d8be0 Connections to dnodes slow down (Adam Gibson)
Pull request description:
(edited from original comment since force-pushed a new set of code, though the intention is exactly the same)
Fixes https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1435.
Prior to this commit, if connections were immediately closed,
no backoff or jitter were applied to delay the next connection attempt,
resulting in too many connection attempts to directory nodes that the
client could not reach, and spam in the logs.
After this commit, we enforce that we always shut down the ClientService
on any disconnection trigger or connection failure, and only attempt to
reconnect with a manual backoff delay (4 seconds increasing by 50% for
20 attempts, plus a few seconds jitter), for directory nodes, while for
non-directory nodes we always give up on any failure.
Top commit has no ACKs.
Tree-SHA512: 26af339cd83fee2c3c94aef030e658d8cca58ca8bcfda5fa9a166f90d75b3c5c8bdd56c74d5c83222751f1a3561e3315e635a886bf534c9c49351b0712c12fad
See #1435.
Prior to this commit, if connections were immediately closed,
no backoff or jitter were applied to delay the next connection attempt,
resulting in too many connection attempts to directory nodes that the
client could not reach, and spam in the logs.
After this commit, we enforce that we always shut down the ClientService
on any disconnection trigger or connection failure, and only attempt to
reconnect with a manual backoff delay (4 seconds increasing by 50% for
20 attempts, plus a few seconds jitter), for directory nodes, while for
non-directory nodes we always give up on any failure. Max delay is a bit
above 3 hours.
c4d9b9264a tests: make setup fixtures optional. (PulpCattel)
Pull request description:
Currently, in tests, we always setup `bitcoind` and `miniircd` (this happens because of `autouse=True` in fixtures).
A lot of test modules do not require these slow and expensive setups. (`miniircd` in particular is AFAICT only used in 1 test module `jmdaemon/test/test_irc_messaging.py`).
After #1427, we now have indipendent fixtures for each component, so we can tell `Pytest` specifically what we need.
This PR uses [pytest.mark.usefixtures()](https://docs.pytest.org/en/7.2.x/how-to/fixtures.html#use-fixtures-in-classes-and-modules-with-usefixtures) to specify fixtures usage at the test module level.
Useful so that fixtures like `setup_regtest_bitcoind` can run *only* if we are planning to invoke a test that requires them.
For example, it's now possible to run:
```
pytest jmbitcoin/
```
This will skip all setup initialization because no test module in `/jmbitcoin` asks for it.
When running the entire test suite, there should be no difference in behaviour.
To see "behind the scene” of how `Pytest` schedules a test run, without actually running it, there's the very useful option `--setup-plan`.
ACKs for top commit:
AdamISZ:
Nice change, thanks. tACK c4d9b9264a
Tree-SHA512: 307d8a60a13cbbd9648efc489cb6da2ecf8e3d42772df09ec99a14fa822ad86ca53212364fd437c79ab718a8effe0de6b6810f6a8ee1df3ae1ad44181beec7a3
34fa1b6c63 Add link to my public orderbook mirror (Kristaps Kaupe)
Pull request description:
I've started hosting a permanently running JM orderbook on a VPS. Alternative to the one provided by @nixbitcoin, mine is .onion-only.
At least now there will be two public orderbook sites now, so that people can compare results. There are known issues with long running OB. Have scheduled mine to restart once per hour as a workaround.
Top commit has no ACKs.
Tree-SHA512: e5f314e1e4b84aa55cece6d6c7133684a920d24e0d78f65c0c30533e8029fa8ebb9ea4d2821fb95cd579a2add78b19c2993cd81f34e702d8634451eaa17733ef
1370c12a5a Use different jm_test_datadir for each local user (Kristaps Kaupe)
Pull request description:
Otherwise will have permission denied errors when trying to run tests from a different local users on the same system.
ACKs for top commit:
AdamISZ:
tACK 1370c12a5a
Tree-SHA512: f99ca2b10fc7a35f6001e9191ad5374222fd19072a48bd0a8a0c516c69a2d8b53233b8c9308d90f48a3d4419995c75ab8662dec26b47aba230d5ed0ca838ca0f
This allows running tests that do not require, e.g., bitcoind, without having to run these setup fixtures at all.
Signed-off-by: PulpCattel <PulpCattel@users.noreply.github.com>
63d74bc0f1 Call num_cores() only after deps_install() (Kristaps Kaupe)
Pull request description:
There may be no Python available before that.
Alternative to #1419.
Top commit has no ACKs.
Tree-SHA512: 7a377fec8b819458e678ef2fd869bd6692f404772f4b42c4fd8caad530b0d49c96010841362b9279488781e914d917897589be46f562f8c5c5025a17f36542c4
This may or may not fix#1057 and other test failures. Since the network
delay in receiving the message is unknown (but expected to be very
small, usually), we keep trying to receive notification of the
transaction message in the websocket test 10 times for a total of 2
seconds (on the assumption that if it takes longer than that, something
else is wrong).