1
0
Commit Graph

18070 Commits

Author SHA1 Message Date
f321x
d62eb7ab13 disable mpp flags in invoice creation if jit channel is required, check against available liquidity if we need a jit channel 2025-03-04 15:24:03 +01:00
ThomasV
4917f7e3ce fix balance sanity check in get_lightning_history 2025-02-28 09:42:24 +01:00
ThomasV
5ce80332ec Qt: do not expose watchtower in settings
running a watchtower requires to be able to run a daemon with the
watchtower plugin enabled. If users succeed at doing that, we
can expect them to be able to configure theclient using the
command line.

(that would not work with QML, though. maybe QML could use an
advanced config editor)
2025-02-26 12:32:38 +01:00
ThomasV
8a96c88615 remove config vars WALLET_BIP21_LIGHTNING and WALLET_BOLT11_FALLBACK (see #9580) 2025-02-26 11:41:59 +01:00
ThomasV
2038c0df0c follow-up 376d881154
please run 'git submodule update'
2025-02-26 11:27:42 +01:00
Sander van Grieken
376d881154 qml: always initialize BtcField.textAsSats 2025-02-26 11:02:12 +01:00
SomberNight
3140c78ab1 qt: follow-up LN/onchain req sep: consistent URI/bolt11 errors
- if we show error for LN request, we should also show error for LN-only bip21 URI
  follow-up af0ac40478
- for LN request, show better error msg if don't have any channels
  closes https://github.com/spesmilo/electrum/issues/9413

note: would be nice if qml GUI could reuse this logic (wallet.get_help_texts_for_receive_request)
2025-02-25 15:03:53 +00:00
ThomasV
af0ac40478 Merge pull request #9580 from spesmilo/lightning_requests
reintroduce separate request types for lightning and onchain
2025-02-25 11:28:40 +01:00
ThomasV
811a1b3332 update payserver plugin 2025-02-25 11:28:07 +01:00
ThomasV
a371102a4c update text gui for lightning invoices 2025-02-25 11:28:07 +01:00
Sander van Grieken
d005da1ea2 qml: remove display states in ReceiveDialog, add balance check for enabling Lightning receive option. 2025-02-25 11:28:07 +01:00
ThomasV
3d2531cb93 reintroduce separate request types for lightning and onchain
cmdline: add_request has a --lightning option
2025-02-25 11:27:32 +01:00
ThomasV
30901212d0 Merge pull request #9467 from accumulator/qml_input_output_color
qml: apply TxInput/TxOutput coloring for swap and billing addresses.
2025-02-24 12:54:33 +01:00
ThomasV
e1377c9856 lnsweep: do not return SweepInfo with txin equal to None 2025-02-21 09:41:13 +01:00
ThomasV
524e4ad4e6 Merge pull request #9574 from f321x/qml_flat_fee
Show flat fee in qml swap provider selection
2025-02-21 09:04:31 +01:00
f321x
f475a71871 show flat fee in qml swap provider selection 2025-02-21 08:59:18 +01:00
SomberNight
a3fc43cc2d qml: remove dependency "Pillow" (and its transitive deps)
closes https://github.com/spesmilo/electrum/issues/9572
2025-02-20 18:53:08 +00:00
ThomasV
ea4adbb4d6 Merge pull request #9573 from f321x/simplify_subswap_fee
Simplify submarine swap onchain fee model to single base fee 'mining_fee'
2025-02-20 18:42:56 +01:00
ThomasV
d714ef130a Merge pull request #9039 from accumulator/onion_messages
onion messages
2025-02-20 18:12:40 +01:00
ThomasV
7eec7e6a20 increase sleep time in TestOnionMessageManager.test_forward
Co-authored-by: ghost43 <somber.night@protonmail.com>
2025-02-20 18:05:21 +01:00
accumulator
6996574c8e Update electrum/onion_message.py _get_request_for_path_id return type
Co-authored-by: ghost43 <somber.night@protonmail.com>
2025-02-20 17:17:14 +01:00
f321x
6f97b7b5f9 simplify submarine swap onchain fee model to single base fee 2025-02-20 16:51:48 +01:00
ThomasV
0bbdad3efa lnsweep: sweep_our_ctx was returning redundant objects 2025-02-20 15:34:57 +01:00
ThomasV
f9c427124d qml: fix follow-up 392c219913 2025-02-20 09:38:47 +01:00
Sander van Grieken
ad6eb73dd3 onion_messages: guard onion message forwarding behind config option
EXPERIMENTAL_LN_FORWARD_PAYMENTS (default False)
2025-02-20 00:31:36 +01:00
Sander van Grieken
c3c5aaab3d onion_messages: add tests for forwards, receive unsolicited. 2025-02-19 17:43:36 +01:00
SomberNight
19b2536da2 wallet: add method "can_rbf_tx"
from https://github.com/spesmilo/electrum/pull/8821
2025-02-19 16:10:52 +00:00
SomberNight
2d6ad49a38 github: migrate to new-style issue templates 2025-02-19 15:51:59 +00:00
Sander van Grieken
0b86e39121 onion_messages: additional checks and comments;
- check on initial_node_id as the type can in theory contain a sciddir.
- log allowed_features if present in recipient_data, with an additional comment describing
the handling of allowed_features in the future.
- document the SHOULD constraint on onion_message payload size
2025-02-19 14:29:50 +01:00
Sander van Grieken
560b244b4d onion_messages: replace more hardcoded test vector values with symbols 2025-02-19 14:29:50 +01:00
Sander van Grieken
f9a374729e onion_messages: generalize List parameter typing to more abstract Sequence 2025-02-19 14:29:50 +01:00
Sander van Grieken
6e35ffe4b5 lnmsg: support both primitive and complex types (subtypes) in LNSerializer.
This renames lnmsg._{read,write}_field to lnmsg._{read,write}_primitive_field, renames
LNSerializer._{read,write}_complex_type to LNSerializer.{read,write}_field and allows
LNSerializer.{read,write}_field to handle both primitive and complex types.

Also makes these funcs public, as these encodings are used outside of lnmsg as well
(e.g. encoding blinded paths in BOLT12 invoice_request)
2025-02-19 14:29:50 +01:00
Sander van Grieken
e216f1b324 onion_messages: add parameter typing and comments 2025-02-19 14:29:50 +01:00
ThomasV
71b9761981 onion_messages_manager:
- use namedtuple instead of dict for pending messages
 - use asyncio.Future instead of event and result
2025-02-19 14:29:50 +01:00
ThomasV
d814796484 Deobfuscate names
The name 'requestreply' do not mean anything. If something can either
be a request or a reply, perhaps we can call it 'message', instead of
introducing a new name?

In general, coming up with new names comes at a cost, because you
are forcing other developers to learn and use your terminology.
Please minimize that.
2025-02-19 14:29:50 +01:00
ThomasV
aeaec452a0 Remove unnecessary events
We do not need asyncio Events in order to signal that a queue is
empty. Instead, we should use asyncio queues.
2025-02-19 14:29:34 +01:00
ThomasV
86432f55ee Remove redundant code: this line is duplicated 2 lines below 2025-02-19 14:29:34 +01:00
ThomasV
3314ee1de1 test_onion_messages: cleanup time constants, make speedup homogeneous.
1. Do not pass request_reply_timeout and request_reply_retry_delay
to OnionMessageManager.

Arguments passed to a function are useful only if their value might
change during the execution of a program. If that is not the case,
it is preferable to define them as constants. That makes the code
easier to read, because the reader can focus on arguments that are
actually relevant.

2 . Multiply all time constants by the same factor, instead
of doing so incompletely and on a per parameter basis. (note
that before this commit, the speedup factor was not consistent)

3. Do not use util.now(), because it is rounded as integer.

With these changes, the tests can effectively run with a 100x speedup
2025-02-19 14:29:34 +01:00
ThomasV
4efd4a0ff7 test_onion_message: enable logging so that we can see what is going on 2025-02-19 14:29:34 +01:00
ThomasV
a157108e75 onion_messages: fix code indentation 2025-02-19 14:29:34 +01:00
Sander van Grieken
7109c22317 unasync, no add_peer in create_onion_message_route_to, add manager tests 2025-02-19 14:29:34 +01:00
Sander van Grieken
7b4180202a add onion message support 2025-02-19 14:29:02 +01:00
Sander van Grieken
12ffbfc29e lnutil: add onion message feature flag 2025-02-19 14:28:11 +01:00
Sander van Grieken
7c8dfdecbb lnmsg: additional de/serialization support for onion messages
- add support for `subtype`/`subtypedata` type declarations
- add new primitive type `sciddir_or_pubkey`
- better assert message for cardinality errors
2025-02-19 14:27:47 +01:00
Sander van Grieken
00bba471ff onion_wire: use unqualified byte,... type for yet undefined nested tlv types 2025-02-19 14:27:45 +01:00
Sander van Grieken
dca6adcbf6 lnwire: add msg and tlv types for onion_message, including unknown_tags for test vectors 2025-02-19 14:27:36 +01:00
ThomasV
392c219913 simplify history-related commands:
- reduce number of methods
 - use nametuples instead of dicts
 - only two types: OnchainHistoryItem and LightningHistoryItem
 - channel open/closes are groups
 - move capital gains into separate RPC
2025-02-19 11:40:21 +01:00
SomberNight
ae8bfdcb51 qt: main_window: (trivial) fix typo on statusbar
a whitespace was missing
2025-02-18 15:36:27 +00:00
ghost43
3f9340270c Merge pull request #9568 from f321x/fix_node_ann_features
Ignore odd bits if even bit is set too in list_enabled_bits
2025-02-18 14:47:34 +00:00
f321x
9394b18b4e add method list_enabled_ln_feature_bits 2025-02-18 15:21:24 +01:00