1
0
Commit Graph

13547 Commits

Author SHA1 Message Date
bitromortac
f1b5069c78 forwarding: temp chan fail on insufficient funds
When forwarding an HTLC and the outgoing channel doesn't have
enough funds or other transient issues, we are failing the
HTLC with a temporary channel failure.

From BOLT #04:
* if during forwarding to its receiving peer, an otherwise unspecified,
transient error occurs in the outgoing channel (e.g. channel capacity
reached, too many in-flight HTLCs, etc.):
-> return a temporary_channel_failure error.
2021-03-18 08:27:48 +01:00
SomberNight
dca182992f ln gossip: run sig checks in a thread
to avoid blocking the asyncio event loop
2021-03-15 20:44:24 +01:00
SomberNight
cedc71a8e3 ln gossip: make sure all signatures are verified
we have not been verifying signatures of ChannelUpdate messages...
(regression from 2d0ef78a11)
2021-03-15 20:44:20 +01:00
SomberNight
ea56a259e4 lnworker: (trivial) split handle_error_code_from_failed_htlc method 2021-03-15 20:44:16 +01:00
ThomasV
0953da75b7 fix regression from 652d10aa5f 2021-03-15 19:29:54 +01:00
SomberNight
7243e5b763 channel_db: (fix) asyncio.Event.set() is not thread-safe
it must be called from asyncio thread
2021-03-15 17:54:13 +01:00
ThomasV
8588674539 channel backups: display status from lnworker instead of channel state 2021-03-15 16:05:05 +01:00
SomberNight
5cbfebeb24 kivy server selection: don't hide ':t' protocol suffix 2021-03-15 15:55:18 +01:00
ThomasV
2dc79b7040 (minor) word wrap qt tooltip 2021-03-15 14:48:47 +01:00
ThomasV
d6ebb4d4ca (trivial) rm debugging code 2021-03-15 14:33:57 +01:00
ThomasV
b18123fb61 Qt: add "save backup" checkbox to force-close dialog 2021-03-15 14:24:08 +01:00
ThomasV
cf926e8412 Qt: add option to request force close of channel 2021-03-15 12:38:00 +01:00
ThomasV
d0a4f3581e follow-up previous commit 2021-03-15 11:15:19 +01:00
ThomasV
abaefa362a kivy: unify fee dialogs
- confirm_tx_dialog and bump_fee_dialog inherit from FeeSliderDialog
 - changing the slider method does not require an extra popup
2021-03-15 11:02:05 +01:00
ThomasV
3ed2173a04 remove newlines in get_tx_fee_warning, it does not render well on kivy 2021-03-15 09:26:16 +01:00
SomberNight
eaffced6dd binaries: bump python version 2021-03-13 16:52:19 +01:00
SomberNight
6e6e956de4 appimage build: adapt to new PyQt (5.15.3+) layout 2021-03-13 16:52:15 +01:00
SomberNight
cecbaca4d1 rerun freeze_packages 2021-03-13 15:00:05 +01:00
SomberNight
b8395f71be contrib: freeze_packages should pin latest pip/etc if possible
We've already been pinning pip/setuptools/wheel; it is `pip freeze --all`
(the "--all" arg) that does that. This change just tries to ensure that
we pin the latest version when possible.
Previously if e.g. "pip" was not pulled in by any package in "requirements${i}.txt",
we would just pin whatever is installed locally.
2021-03-13 14:53:41 +01:00
ThomasV
2ad49bbc5b Kivy: Show fee dialog before opening a new channel.
Remove fee and rbf from settings, as they are now always proposed
2021-03-13 09:34:19 +01:00
ThomasV
3e3cfd91a6 Merge pull request #7104 from SomberNight/202103_qt_receive_tab_expiration_help
qt receive tab: change "Expires after" label and help text
2021-03-12 19:58:01 +01:00
SomberNight
4d4a66c9ba lnpeer: add comments to process_unfulfilled_htlc 2021-03-12 19:41:47 +01:00
ThomasV
018f09f2af use mktx_for_open_channel in commands module. fix indentation 2021-03-12 19:05:25 +01:00
SomberNight
5dbf6dbdec qt receive tab: change "Expires after" label and help text 2021-03-12 18:54:49 +01:00
ThomasV
7c2b7ca5c0 add channel backups to result returned by list_channels 2021-03-12 18:53:09 +01:00
SomberNight
1ba5997238 qt lightning_tx_dialog: use historical fx rate for fiat amounts 2021-03-12 18:29:00 +01:00
SomberNight
24e4aa3ab9 network.best_effort_reliable: use curio APIs instead of asyncio 2021-03-12 17:53:13 +01:00
ThomasV
65d263801a show capacity of channel backups in GUI 2021-03-12 17:39:13 +01:00
SomberNight
3ff203ea51 commands: fix list_requests
closes https://github.com/spesmilo/electrum/issues/7102
2021-03-12 17:38:19 +01:00
SomberNight
897f90d6e8 wallet: factor out "what key to use for invoice"
fix: qt request list was not using the correct key
2021-03-12 17:29:54 +01:00
ThomasV
1a4e55a911 follow-up 90b228de83 2021-03-12 16:38:48 +01:00
ThomasV
8984db3384 follow-up 90b228de83 2021-03-12 16:28:56 +01:00
ThomasV
af7bcd4ca1 add comments about ChannelBackup fields 2021-03-12 16:11:47 +01:00
ThomasV
f16358ec3c add request_force_close command to CLI
add regtest for channel backup
2021-03-12 16:10:02 +01:00
ThomasV
bed4ddbcb4 fix dict value assignment bug in import_channel_backup. In request_force_close, use Taskgroup with wait=any 2021-03-12 16:09:24 +01:00
ThomasV
e186214f6f (formatting) lnsweep indentation 2021-03-12 12:41:10 +01:00
ThomasV
90b228de83 fix wallet get_full_history: add onchain tx for channels not opened by us 2021-03-12 12:15:39 +01:00
ThomasV
6004a04705 Merge pull request #7099 from SomberNight/202103_fail_pending_htlcs_on_shutdown
fail pending htlcs on shutdown
2021-03-12 11:01:07 +01:00
SomberNight
2487a3fa90 tests: add test for prev 2021-03-11 20:35:21 +01:00
SomberNight
cb78f73ed0 lnworker: try to fail pending HTLCs when shutting down
This is most useful when receiving MPP where there is a non-trivial chance
that we have received some HTLCs for a payment but not all, and the user
closes the program. We try to fail them and wait for the fails to get
ACKed, with a timeout of course.
2021-03-11 19:31:22 +01:00
SomberNight
05e58671c9 lnhtlc: (trivial) rename method 2021-03-11 19:09:35 +01:00
SomberNight
54f7755397 lnpeer.maybe_forward_htlc: add FIXME 2021-03-11 18:51:45 +01:00
SomberNight
28a7d204ad util: document CallbackManager behaviour 2021-03-11 18:50:59 +01:00
ThomasV
533d796a41 add TODO, rename check_received_mpp_htlc 2021-03-11 16:53:55 +01:00
bitromortac
10c799faab mpp_split: add penalty for exhaustion of channels
A penalty is added for split configurations which saturate a channel.
Saturation of channels is discouraged as we don't know the fees
beforehand. The penalty is accomplished via an exponential function that
kicks in when the subamount reaches about the total funds available
(this amount is controlled by the parameter EXHAUST_DECAY_FRACTION).
2021-03-11 16:19:15 +01:00
ThomasV
1b7d8c0387 Qt: rm gossip menu item: already available in toolbar, and channel_db is not always present 2021-03-11 14:44:13 +01:00
ThomasV
dc55cf4b2d test_multipart_payment_with_timeout: give extra time for second HTLC to timeout before next test 2021-03-11 11:01:35 +01:00
ThomasV
50ab8be7a2 lnpeer: try to fix tests 2021-03-11 10:39:39 +01:00
SomberNight
707a58abf1 crypto: add comment about ripemd.py
related: https://github.com/spesmilo/electrum/issues/7093
2021-03-10 21:28:17 +01:00
SomberNight
a7c948bac1 tests: fix tearDown() issue in test_lnrouter.py
similar to 05fd424548

from logs when running tests:

--- Logging error ---
Traceback (most recent call last):
  File "...\Python39\lib\logging\__init__.py", line 1082, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "...\Python39\lib\threading.py", line 912, in _bootstrap
    self._bootstrap_inner()
  File "...\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "...\Python39\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "...\electrum\electrum\sql_db.py", line 71, in run_sql
    self.logger.info("SQL thread terminated")
Message: 'SQL thread terminated'
Arguments: ()
2021-03-10 21:23:41 +01:00