Commit Graph

15029 Commits

Author SHA1 Message Date
SomberNight 0abecffe6d mac build: force using source dist for most of our python dependencies
We compile from tar.gz, instead of using pre-built binary wheels from PyPI.
(or if the dep is pure-python, use tar.gz instead of "source-only" wheel)

-----
Some unorganised things below for future reference.

```
$ dsymutil -dump-debug-map dist1/hid.cpython-39-darwin.so
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hid.o unable to open object file: No such file or directory
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hidapi/mac/hid.o unable to open object file: No such file or directory
---
triple:          'x86_64-apple-darwin'
binary-path:     'dist1/hid.cpython-39-darwin.so'
...
```

```
$ nm -pa dist1/hid.cpython-39-darwin.so
```

- https://stackoverflow.com/questions/10044697/where-how-does-apples-gcc-store-dwarf-inside-an-executable
- https://github.com/pypa/pip/issues/6505
- https://github.com/pypa/pip/issues/7808#issuecomment-770275723
- https://github.com/NixOS/nixpkgs/pull/91272
- https://github.com/cython/cython/pull/1576
- https://github.com/cython/cython/blob/9d2ba1611b28999663ab71657f4938b0ba92fe07/Cython/Compiler/ModuleNode.py#L913
2022-09-26 12:16:02 +00:00
SomberNight 1478d9d878 Qt CompletionTextEdit: cast KeyboardModifiers to int
closes https://github.com/spesmilo/electrum/issues/7979
2022-09-23 17:08:16 +00:00
SomberNight 9ed5b092e4 coinchooser: (trivial) add some type hints 2022-09-23 16:37:35 +00:00
SomberNight c43e0000ce Qt ConfirmTxDialog: disconnect timer when closing dialog
fixes https://github.com/spesmilo/electrum/issues/6791
2022-09-23 16:36:17 +00:00
ghost43 6bdabb8579 Merge pull request #7977 from JamieDriver/update_jade_api
jade: update Jade api to 0.1.37
2022-09-23 14:04:11 +00:00
ThomasV 6e429ebf9a test_lnpeer: instead of sleeping for 0.2s, wait until peers are initialized
this should fix https://cirrus-ci.com/task/6585628493086720
2022-09-23 12:42:15 +02:00
ThomasV e8a4e287e9 cleanup old non-static_remotekey code (follow-up 1f403d1ca1) 2022-09-23 11:25:49 +02:00
ThomasV 028916b447 fix #7988 2022-09-23 09:41:46 +02:00
ThomasV fe6a83d6c1 fix test_fail_pending_htlcs_on_shutdown: poll number of htlcs 2022-09-22 18:26:02 +02:00
ThomasV 30dfecc5dc wallet: check whether address can be reused in get_request_by_addr 2022-09-22 17:37:11 +02:00
Sander van Grieken 5681311fc2 fix request_status callback not passing the correct request key 2022-09-22 11:54:14 +02:00
ThomasV 79bcedd064 test_lnpeer: reset electrum.trampoline._TRAMPOLINE_NODES_UNITTESTS in tearDown 2022-09-20 19:17:32 +02:00
Sander van Grieken 11b8d5e2f0 qml: work around qeamount copy from None 2022-09-20 19:14:36 +02:00
SomberNight e5f21fb7b5 lnurl: better handle unimplemented lnurl subtypes
fixes https://github.com/spesmilo/electrum/issues/7971
2022-09-20 16:00:20 +00:00
ThomasV 20bcb15480 Factorize code in create_routes_for_payment.
Calling suggest_splits with exclude_single_part_payments=False
2022-09-20 13:55:22 +02:00
ThomasV b8cb561d1a test_mpp_split: add tests for exclude_single_part_payments=False 2022-09-20 13:49:16 +02:00
ThomasV ead886781a create_routes_for_payment: fix 'we atomically loop'
Before this commit, partial results were yielded before we had
examined the whole split configuration.

I think the correct behaviour is to create all the routes for the
current configuration, then to yield them. If there is an exception,
we should try the next one.
2022-09-20 12:52:36 +02:00
ThomasV 5e77886b98 trampoline MPP: handle direct payment to trampoline node 2022-09-20 11:44:23 +02:00
ThomasV 9251f482b5 test_lnpeer: add unit test for direct payment to trampoline node 2022-09-20 11:28:51 +02:00
ThomasV 478046289a follow-up c6f940d092 2022-09-20 10:55:19 +02:00
ThomasV 2af59e32b2 lnworker: define use_trampoline() for code clarity 2022-09-19 17:43:13 +02:00
ThomasV 68bf714ae6 Trampoline: Remember failed routes (fixes #7967).
Upon receiving UNKNOWN_NEXT_PEER, TEMPORARY_NODE_FAILURE
or TEMPORARY_CHANNEL_FAILURE, remember the trampoline route
that was used, and try other routes before raising the
trampoline fee.

Before this commit, we used to raise the trampoline fee
upon receiving any error message, in order to ensure
termination of the payment loop.

Note that we will still retry failing routes after we have
raised the trampoline fee. This choice is questionable, it
is unclear if doing so significantly increases the probability
of success.

Tests: add a test for trampoline handling of UNKNOWN_NEXT_PEER
2022-09-19 16:42:46 +02:00
Jamie C. Driver 68f320041a jade: update Jade api to 0.1.37 2022-09-15 11:54:42 +01:00
Sander van Grieken a488be61db qml: fix open channel 2022-09-14 16:07:03 +02:00
Sander van Grieken 6bbd18dc78 qml: fix flake errors 2022-09-09 19:58:48 +02:00
Sander van Grieken 27999a9583 qml: clean up, generalize plugin gui base, enumerate plugins in gui
(still quite crude impl, dynamic enable/disable plugin gui is misaligned
with backend)
2022-09-08 15:15:46 +02:00
Sander van Grieken 32a81d8ee7 qml: initial plugin support, with labelsync mostly implemented 2022-09-08 12:19:38 +02:00
ThomasV 082a50f2bd trampolines_by_id must return dict (follow-up previous commit) 2022-09-07 17:48:13 +02:00
ThomasV 99c4c75c9d hardcoded trampolines: do not mix testnet nodes and unitests.
(This was added in 3a7f5373ac. Not sure what the reason is, but
it triggers UNKNOWN_NEXT_PEER errors, that in turn affect routing
choices, e.g. fallback to single trampoline route)
2022-09-07 17:17:13 +02:00
ThomasV 92b21df843 Trampoline: if possible, do not add second trampoline for e2e payments.
This should fix #7967
2022-09-04 09:39:42 +02:00
ThomasV 2c57a8c394 lnworker: fix maybe_raise_trampoline_level.
That function was a no-op due to wrong indentation level
2022-09-03 18:32:05 +02:00
ThomasV c6f940d092 trampoline: less verbose, do not log routes that are not tried 2022-09-03 18:24:58 +02:00
ThomasV 26245c1ac9 unit tests: split test_payment_trampoline into two tests 2022-09-03 11:16:37 +02:00
ThomasV 14e96f4d53 Index request by ID instead of receiving address.
Replace get_key_for_outgoing_invoice, get_key_for_incoming_request
with Invoice.get_id()

When a new request is created, reuse addresses of expired requests (fixes #7927)

The API is changed for the following commands:
 get_request, get_invoice,
 list_requests, list_invoices,
 delete_request, delete_invoice
2022-09-02 10:58:11 +02:00
ThomasV 7d317761da wallet API: remove get_request_status, it is redundant with get_invoice_status 2022-09-01 10:01:09 +02:00
ThomasV 70da10d662 fix watchtower regtest flakiness caused by CTN variability. fixes #7961 2022-09-01 09:56:46 +02:00
Sander van Grieken 6d77253ac2 qml: remove log statement 2022-08-31 13:50:26 +02:00
Sander van Grieken 40e8ff6ce2 qml: add hack to delay rendering of QR until dialog is shown.
unfortunately, using standard QtQuick Image.asynchronous=true leads
to a deadlock at app exit so we can't use it a.t.m.
2022-08-31 13:33:58 +02:00
Sander van Grieken 179666612e qml: fix get_request in qerequestdetails 2022-08-31 13:31:19 +02:00
ThomasV f20b371737 fix #7959 2022-08-31 11:03:04 +02:00
SomberNight 42f2a3da31 Qt pay_lightning_invoice: handle NoDynamicFeeEstimates
`wallet.make_unsigned_transaction` can raise NotEnoughFunds or NoDynamicFeeEstimates.
These are "expected" exceptions that need to be handled or worked around. Added a note
of this in the docstring now.

We now handle NoDynamicFeeEstimates by allowing a static fallback fee in
`wallet.can_pay_onchain` and `lnworker.suggest_funding_amount`. It should be
fine to have a static fallback in these cases, as the user still has a chance
to set their own fee later in the flow.
(though ofc the static fallback might be too high in some mempool conditions,
in which case e.g. can_pay_onchain might return a false-negative, but this
is still an improvement over raising I believe)

fixes https://github.com/spesmilo/electrum/issues/5784
2022-08-30 11:46:52 +00:00
SomberNight a143d05fb9 mac build: bump pyinstaller (4.2 -> 5.3) 2022-08-29 15:22:47 +00:00
SomberNight b3e869a5de build win/mac: do not pass custom args to pyinstaller; use envvars
custom args no longer work with pyinstaller 5.0 (see https://github.com/pyinstaller/pyinstaller/issues/6762 )

```
option(s) not allowed:
  ...
makespec options not valid when a .spec file is given
```
2022-08-29 15:22:43 +00:00
SomberNight 2d458d3b06 (trivial) contrib/build-wine: convert line-endings (CRLF -> LF)
otherwise no-op
2022-08-29 15:20:26 +00:00
SomberNight 89e1bbf4ec mac build: add message to camera permission prompt, in Info.plist
based on https://github.com/Electron-Cash/Electron-Cash/commit/0b5b5fb228dbd3be60197b7ccde27ff32d9786ad

Co-authored-by: Calin Culianu <calin.culianu@gmail.com>
2022-08-29 13:46:47 +00:00
SomberNight e39ab1623a mac build: set minimum system version to 10.13.0 in Info.plist
based on https://github.com/Electron-Cash/Electron-Cash/commit/907e5e7009e00815f8df3925c50e8d246d3d0359

This way users get more feedback from the OS when they attempt to launch the app on old macOS.

Co-authored-by: Calin Culianu <calin.culianu@gmail.com>
2022-08-29 13:43:57 +00:00
SomberNight 859d43d0b2 mac build: let pyinstaller handle Info.plist
note: newer versions of pyinstaller (4.4+ ?) want to sign the bundle
themselves, in which case modifying the Info.plist file after
pyinstaller returns invalidates the sig.
2022-08-29 13:35:39 +00:00
SomberNight d37b5e7d75 Qt ReceiveTabWidget: change cursor to hint QR code can be clicked 2022-08-29 13:30:59 +00:00
SomberNight abec59e17d mac build: rm unused BUILDDIR 2022-08-29 12:47:31 +00:00
SomberNight 20997cf60b wallet: follow-up removal of get_request_status
follow-up d9f77a50e8
2022-08-29 12:27:05 +00:00