1
0
Commit Graph

18563 Commits

Author SHA1 Message Date
ThomasV
d1917b2951 Merge pull request #9837 from spesmilo/htlc_slots_left
pass number of htlc_slots_left to suggest_splits
2025-05-20 12:55:45 +02:00
ThomasV
4e64a880fc Merge pull request #9836 from f321x/concurrent_lookup_of_payment_identifier
make openalias and lnaddress lookup concurrent
2025-05-20 12:45:57 +02:00
ThomasV
b432a1406a lnchannel: apply stricter max_htlc_value_in_flight rules for receiving
Otherwise we create invoices that eclair cannot route to us
2025-05-20 12:44:14 +02:00
f321x
e433b8d5bf explicitly test the htlc slot limit in TestMppSplit 2025-05-20 12:26:21 +02:00
f321x
40f11213df make openalias and lnaddress lookup concurrent 2025-05-20 10:08:36 +02:00
ThomasV
713a20e309 Merge pull request #9833 from f321x/use_asyncio_dnspython_methods
dns: use async dnspython interface
2025-05-20 08:56:47 +02:00
ThomasV
8396a22286 Merge pull request #9801 from SomberNight/202505_ban_unicode
ci: add linter task "ban unicode" to protect against malicious unicode
2025-05-19 15:02:45 +02:00
Sander van Grieken
000b1bb3b5 swaps: update instructions in manifest, add Max Forward and Max Reverse amounts in qml provider picker 2025-05-19 14:55:34 +02:00
f321x
3693c38e37 swaps: replace offers dict with class, fix incorrect naming
introduces a class SwapOffer which is used instead of passing around
offers in dicts.

Also fixes incorrect variable naming of swapserver npubs / public keys
by assigning the npub instead of the hex pubkey to
config.SWAPSERVER_NPUB
2025-05-19 14:22:23 +02:00
ThomasV
cc25048e29 swap providers dialog with liquidity info 2025-05-19 13:22:50 +02:00
ThomasV
b949eb5bf9 paytoedit: do not stip whitespaces in payto field while user is typing (fix regression) 2025-05-19 11:52:30 +02:00
ThomasV
e06e2c0ba4 Merge pull request #9740 from f321x/update_swap_liquidity_on_events
swaps: Improve accuracy of swapserver liquidity announcement.
2025-05-19 10:23:38 +02:00
f321x
07a40b1c53 Improve accuracy of swapserver liquidity announcement.
Adds event handler and more calls to the liquidity update trigger to
ensure that changes in liquidity will get published more reliably.
2025-05-19 09:52:53 +02:00
ThomasV
73e93285db CLI: add 'clearconfig' command 2025-05-19 08:42:55 +02:00
ThomasV
cbe0244d66 Merge pull request #9840 from SomberNight/202505_chan_save_error
lnchannel: persist error sent by remote peer into db
2025-05-19 08:20:19 +02:00
SomberNight
d0be5fcfc8 lnchannel: persist error sent by remote peer into db
If a force-close happens due to e.g. a feerate disagreement or an invalid signature, etc,
and the remote peer sends us an error, it can be useful if users can provide us with this error.
If the user does not have logging enabled when the error is sent, without this persistence it will likely get lost.
2025-05-18 16:54:56 +00:00
ThomasV
d435d65bf5 Merge pull request #9838 from spesmilo/cli_get_preimage
CLI: add preimage to invoices
2025-05-18 15:37:44 +02:00
ThomasV
a66439eea5 CLI: add preimage to get_invoice
This should make regtest extract_preimage more reliable
2025-05-18 15:25:06 +02:00
ThomasV
a213dfca85 Qt: move nostr_relays to network dialog 2025-05-18 13:42:25 +02:00
ThomasV
79941529d2 simplify plugin logic: remove install/uninstall buttons
external plugins are enabled iff authorized
2025-05-18 12:24:38 +02:00
ThomasV
0a69a3d658 Merge pull request #9765 from f321x/plugin_pubk_user_prompt
plugins: add functionality to allow setting plugin pubkey from gui
2025-05-18 12:08:12 +02:00
ThomasV
4a17d5a316 pass number of htlc_slots_left to suggest_splits 2025-05-17 15:50:03 +02:00
SomberNight
1c41bd23b7 network: broadcast_transaction: log full raw tx on errors 2025-05-16 15:49:54 +00:00
SomberNight
68ac2d8079 network: sanitize_tx_broadcast_response: add new error messages 2025-05-16 15:48:12 +00:00
f321x
f90ca34fb9 use async dns interface in dnshacks 2025-05-16 17:10:16 +02:00
f321x
f7ad95f42d make lightning dns seed fetching async 2025-05-16 17:10:10 +02:00
f321x
61492d361e Use async dnspython methods for openalias/dnssec 2025-05-16 17:09:41 +02:00
ThomasV
367dde4c9b Merge pull request #9835 from accumulator/qml_psbt_nostr_toggle
qml: add psbt_nostr enable/disable option in Preferences
2025-05-16 14:48:36 +02:00
Sander van Grieken
9a2a65c20f qml: add psbt_nostr enable/disable option in Preferences 2025-05-16 14:00:23 +02:00
ThomasV
f147058664 Merge pull request #9834 from f321x/fix_terms_wizard_windows
fix: make ToU scrollbar detection more reliable
2025-05-16 13:32:01 +02:00
ThomasV
b8c6200434 Merge pull request #9800 from accumulator/psbt_nostr_qml_choices
Psbt nostr qml choices
2025-05-16 13:30:58 +02:00
f321x
12ff5b2728 fix: make ToU scrollbar detection more reliable
adds some delay before detecting the scrollbar in the terms of use
dialog. This prevents it from falsely detecting a scrollbar and
disabling the "I Agree" button even if there is no scrollbar. I noticed this
issue on windows, the order in which the window is created seems to be
slightliy different from linux/wayland there.
2025-05-16 13:13:00 +02:00
ThomasV
9f9919e351 available_to_spend: check too_many_htlcs
partial fix for #8857
(this should at least fix the trampoline case)
2025-05-16 12:34:27 +02:00
ThomasV
128eb9cc8b available_to_spend: remove unused 'strict' parameter 2025-05-16 12:29:49 +02:00
ThomasV
fed526bbdf lnchannel: create helper functions too_many_htlcs and remaining_max_inflight 2025-05-16 12:29:00 +02:00
Sander van Grieken
c3f0993e53 test_lnchannel: add single_payment testcase for TestAvailableToSpend 2025-05-16 12:29:00 +02:00
Sander van Grieken
7f621d29b5 lnchannel: available_to_spend constrain max amount to channel max_htlc_value_in_flight_msat 2025-05-16 12:28:11 +02:00
ThomasV
25c53ec3a5 Merge pull request #9792 from accumulator/qml_issue_noamt_lninvoice_sticky_override_amt
qml: fix storing override amount too soon, while user is allowed to set a new override amount which was silently ignored.
2025-05-16 11:19:53 +02:00
Sander van Grieken
77407fa206 qml: offer same choices as desktop; Open, Discard, Save to wallet 2025-05-16 10:41:41 +02:00
accumulator
8368469e2c Merge pull request #9832 from accumulator/fix_9829
qml: handle callbacks via ui thread.
2025-05-16 10:23:03 +02:00
Sander van Grieken
c89398cd5b qml: handle callbacks via ui thread. 2025-05-16 09:49:41 +02:00
SomberNight
6320597f2c regtests: rm sleep from "swapserver_forceclose" test
less reliance on timing
(OTOH it hardcodes the output index of the commitment tx... meh)
2025-05-15 19:50:16 +00:00
SomberNight
f3551f3c25 commands: add cmd wait_for_sync 2025-05-15 19:42:34 +00:00
SomberNight
586cf33c05 lnchannel: rm sweep_info cache
- was added when functions in lnsweep returned already signed tx, and signing is expensive
- get_ctx_sweep_info does not presign anymore
- cache invalidation is difficult here
  - e.g. not only on new blocks, but we should e.g. also invalidate the cache when learning new preimages
2025-05-15 19:41:44 +00:00
SomberNight
b1f0c6e353 synchronizer: get_transaction should discard tx_height as it can change
tx_height comes from the `get_history` RPC, we then call the `get_transaction` RPC.
By the time the `get_transaction` RPC returns, we might have received another
scripthash status update, called `get_history` again, and updated height for the txid.
Synchronizer._get_transaction() should not call adb.receive_tx_callback() with
the old tx_height (but it was doing exactly that).

Patch to trigger, e.g. regtest failures:
(e.g. for tests.regtest.TestLightningAB.test_extract_preimage)
```
diff --git a/electrum/interface.py b/electrum/interface.py
index 8649652b9c..fce7a1c6de 100644
--- a/electrum/interface.py
+++ b/electrum/interface.py
@@ -991,6 +991,7 @@ class Interface(Logger):
         return res

     async def get_transaction(self, tx_hash: str, *, timeout=None) -> str:
+        await asyncio.sleep(3)
         if not is_hash256_str(tx_hash):
             raise Exception(f"{repr(tx_hash)} is not a txid")
         raw = await self.session.send_request('blockchain.transaction.get', [tx_hash], timeout=timeout)

```
2025-05-15 19:35:15 +00:00
SomberNight
61283fe18b adb: (trivial) receive_tx_callback: make tx_height param kw-only 2025-05-15 19:09:37 +00:00
ThomasV
626264d24f Merge pull request #9784 from f321x/allow_lnaddress_contacts
qt: allow lightning addresses in contacts
2025-05-15 19:09:48 +02:00
f321x
b6e1e527c2 contacts: support lightning addressses as contact address
lightning addresses are useful and widely adopted, so it should be
possible to save them as payment identifier for a contact.
2025-05-15 17:55:23 +02:00
ThomasV
6500788328 Merge pull request #9710 from f321x/dont_delete_config_on_syntax_error
config: Raise instead of overwriting the config file on syntax error
2025-05-15 17:24:35 +02:00
f321x
8870838834 raise instead of overwriting the config file on syntax error 2025-05-15 17:21:16 +02:00