1
0
Commit Graph

14424 Commits

Author SHA1 Message Date
SomberNight
ae76a0daf5 windows binaries: try to prevent users from renaming exe while running
closes https://github.com/spesmilo/electrum/issues/4072
(this fix AFAICT only works on Windows, and #4072 contains some macOS reports as well,
however all recent reports are for Windows and overall most reports are for Windows,
so let's close it optimistically for now)
2022-05-29 03:26:20 +02:00
ThomasV
00183b5412 Qt: move current_request logic from main_window to requests_list 2022-05-28 17:52:07 +02:00
SomberNight
52b73880f9 requirements: pin protobuf "<4"
protobuf 4.x introduced breaking changes compared to 3.20.
To adapt, we would have to regenerate paymentrequest_pb2.py, using protoc>=3.19.0, however ubuntu does not have new enough protoc.
Also, unsure if newly generated paymentrequest_pb2.py would be supported by older versions of protobuf.
Best to just wait for things to settle.

```
electrum/__init__.py:20: in <module>
    from .wallet import Wallet
electrum/wallet.py:70: in <module>
    from . import transaction, bitcoin, coinchooser, paymentrequest, ecc, bip32
electrum/paymentrequest.py:37: in <module>
    from . import paymentrequest_pb2 as pb2
electrum/paymentrequest_pb2.py:36: in <module>
    _descriptor.FieldDescriptor(
.tox/py3/lib/python3.9/site-packages/google/protobuf/descriptor.py:560: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot not be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```

ceaae1b6a3/CHANGES.txt (L47)
2022-05-27 18:38:26 +02:00
SomberNight
8e9274bde4 mac build: README: add more details about installing Xcode 2022-05-27 17:51:53 +02:00
SomberNight
ecf4e3db48 mac build: compare_dmg script: if binaries mismatch, print the diff 2022-05-27 17:48:18 +02:00
SomberNight
3e290c9d47 update release notes for 4.2.2
(from 4.2.x branch)
2022-05-27 17:33:35 +02:00
ThomasV
3ce42edbab update locale submodule 2022-05-27 12:17:41 +02:00
ThomasV
7cf495d1e0 Windows build scripts: Read codesign passphrase. Lazy check if unsigned binaries are there. 2022-05-27 11:07:32 +02:00
SomberNight
58be69afd3 commands: add "encrypt_file" arg to "password" command 2022-05-26 21:41:29 +02:00
SomberNight
d04e3c7288 bip70 paymentrequest: remove support for "file" URIs 2022-05-26 19:50:47 +02:00
SomberNight
b7a3e07db8 bump version to 4.3.0a0 2022-05-26 19:10:29 +02:00
SomberNight
189390fb2d qt new_channel_dialog: use lnutil.MIN_FUNDING_SAT instead of ad-hoc val 2022-05-26 18:08:15 +02:00
SomberNight
ad42de03ac qt new_channel_dialog: fix regression: oepn chan with "max" amt
```
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\channels_list.py", line 377, in new_channel_with_warning
	self.new_channel_dialog()
  File "...\electrum\electrum\gui\qt\channels_list.py", line 399, in new_channel_dialog
	return d.run()
  File "...\electrum\electrum\gui\qt\new_channel_dialog.py", line 133, in run
	if self.min_amount_sat and funding_sat < self.min_amount_sat:
TypeError: '<' not supported between instances of 'str' and 'int'
```
2022-05-26 18:05:18 +02:00
ThomasV
30a98578c8 Refactor: move calls to lnworker methods out of the tx creation functions
(follow-up f0237e46be)
2022-05-26 15:04:43 +02:00
ThomasV
f0237e46be lnsweep: do not redeem offered HTLCs unless payment was received in full 2022-05-26 14:28:25 +02:00
ThomasV
672326bd12 lnwatcher: a bit less verbose 2022-05-26 12:00:11 +02:00
ThomasV
035c877813 channels_list: do not add extra whitespaces when displaying amounts in HTLCs 2022-05-26 09:04:46 +02:00
SomberNight
79578d6c18 lnchannel: fix diagnostic_name, for better log lines
Previously nothing re channel id was logged, as "diagnostic_name" is only evaluated once,
and it ran before channel_id was set.
2022-05-25 23:51:11 +02:00
ThomasV
58194ce78b Merge pull request #7830 from SomberNight/202205_lnpeer_reestablish_channel
lnpeer.reestablish_chan: enforce order of replaying commitsig/revack
2022-05-25 19:54:51 +02:00
SomberNight
ef4477a930 lnpeer.reestablish_chan: enforce order of replaying commitsig/revack
When replaying messages during channel-reestablishment,
previously we first resent all update messages, along with potential commitment_signed messages,
and then we potentially resent a single revoke_and_ack.

This can result in incorrect behaviour in case both a commitment_signed and a revoke_and_ack needs to be resent.
When replaying messages, the relative order of commitment_signed and revoke_and_messages needs to be preserved.
(the order of updates (htlc/fee) in relation to the revack messages does not matter)

implements https://github.com/lightning/bolts/pull/810

The logic here is somewhat based on what c-lightning does:
01e5f1886e/channeld/channeld.c (L3059)
2022-05-25 19:44:44 +02:00
ThomasV
56659c550e lnwatcher: fix another broadcast-too-early error 2022-05-25 12:45:53 +02:00
ThomasV
e99a5a7703 fix lnwatcher broadcast logic, follow-up b9f01a86fe 2022-05-25 12:34:52 +02:00
ThomasV
adbabacc12 Stabilize size of receive_tabs widgets
- use SetMinimumSize instead of sizeHint
   (partially reverts 28f794b63b)
 - to deal with small window sizes, set MinimumHeight of the
   parent TabWidget (with a few extra pixels for margins)
 - add an extra layout around address_help_text, so that it has
   margins (margins were removed in 28f794b63b)
2022-05-25 10:17:39 +02:00
ThomasV
7abc7c720f receive_tabs: add tooltip to inner widgets 2022-05-24 19:30:51 +02:00
ThomasV
b9f01a86fe lnwatcher: check that parent transaction is confirmed in CSV test 2022-05-24 19:13:10 +02:00
ThomasV
5bb99ddfaf submarine_swaps: fix order of operations in get_send_amount 2022-05-24 18:51:09 +02:00
SomberNight
2362d6d010 follow-up "remove email plugin"
follow-up c67c4e95dc
2022-05-24 18:33:19 +02:00
SomberNight
28f794b63b Qt receive tab: better receive_tabs widget size for small windows
Previously the receive_tabs widget was allowed to be much smaller
than its inner main widget (e.g. truncating visible QR code).
A bit hackish to overwrite/monkeypatch sizeHint,
but I've tried a few approaches and this seems to work best.
2022-05-24 18:15:12 +02:00
ThomasV
2e120d74b8 Qt: add name to coroutines_scheduled 2022-05-24 13:39:06 +02:00
ThomasV
feb10bc67b remove unneeded parameter (follow-up e392197ab9) 2022-05-24 13:33:16 +02:00
ThomasV
3e0d7ff549 improve channels_list menus (minor) 2022-05-24 12:48:19 +02:00
ThomasV
f14c420c30 Qt: display number of tasks (window._coroutines_scheduled) in toolbar.
Disable rebalance/swap suggestions attached to requests/invoices if there is an ongoing task.
Note: This assumes that all tasks are lightning payments, which is true for the moment.
2022-05-24 12:18:32 +02:00
ThomasV
c67c4e95dc remove email plugin 2022-05-24 11:48:14 +02:00
ThomasV
bb0f4b5a65 Merge pull request #7828 from JeremyRand/is-none-bitcoin
Fix "== None" linter fails
2022-05-24 06:41:22 +02:00
Jeremy Rand
1aa444e0f8 Fix "== None" linter fails
Credit to Zoltan Konder for pointing me to this issue.
2022-05-24 02:39:11 +00:00
SomberNight
cac4b6f92c email plugin: SSL was using insecure defaults 2022-05-23 19:04:51 +02:00
SomberNight
7e77a7e1cc email plugin: (trivial) adapt to Invoices refactor 2022-05-23 18:53:19 +02:00
SomberNight
98feff07ad threading.Thread: fix some DeprecationWarnings
"DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead"
2022-05-23 17:52:39 +02:00
ThomasV
0431cd825e Allow the QR code in the receive tab to be variable size 2022-05-23 13:17:25 +02:00
ThomasV
2a31f80d09 QRCodeWidget: add margin of 1 block, remove fixedSize parameter 2022-05-23 11:38:09 +02:00
ThomasV
3b44646bd1 QRCodeWidget: show warning in GUI 2022-05-23 10:11:35 +02:00
ThomasV
155b3703ac QR window: fix tab order 2022-05-23 09:49:17 +02:00
ThomasV
50a272ec8f do not propose rebalance between channels to the same trampoline 2022-05-23 09:31:38 +02:00
ThomasV
53b4389e05 Qt: set fixed size for reveive help widgets 2022-05-23 09:20:14 +02:00
ThomasV
4cd2807563 Qt: rephrase messages, propose 'pay onchain' as the last option 2022-05-23 09:03:45 +02:00
ThomasV
5d659cda0e improve channel_funding_sat suggestion. add min_amount parameter to new_channel_dialog 2022-05-22 17:18:28 +02:00
ThomasV
e43983e854 Qt: update current request when update_tabs is called 2022-05-22 13:32:24 +02:00
ThomasV
23230c3c10 receive widget: minor improvements, more help text 2022-05-22 11:40:01 +02:00
ThomasV
0656e6d44e suggest_rebalance: special case for MPP heuristics 2022-05-22 09:22:16 +02:00
ThomasV
53151244e2 LNWorker: Add suggest_rebalance methods for sending and receiving.
These methods return a list of channels that can be rebalanced,
in order to receive or send a given amount.

Also add 'channels' parameter to submarine swaps.
Previously, swaps were not considering which channel to use.

When we do not have liquidity to pay an invoice:
 - add 'rebalance' option in order to pay an invoice
 - use the suggested channel in the 'swap' option

When we do not have the liquidity to receive an invoice:
 - add 'Rebalance' and 'Swap' buttons to the receive tab
2022-05-21 20:25:44 +02:00