20026 Commits

Author SHA1 Message Date
ThomasV 3012c367ad Qt: move LN fee slider to payment dialog. fixes #10516 2026-03-25 10:53:38 +01:00
ThomasV efb3e344d0 Merge pull request #10543 from f321x/qml_trustedcoin
qml: make 2fa secret copyable, open 2fa app for user
2026-03-25 08:36:32 +01:00
ThomasV 06e9f2b5e3 Merge pull request #10534 from SomberNight/202603_rpc_password_not_empty
daemon: forbid "setconfig" command to change rpcserver settings in-flight
2026-03-25 08:35:52 +01:00
SomberNight 0dcef9780b daemon: forbid "setconfig" command to change rpcserver settings in-flight
It is much easier to reason about the rpcserver if we don't allow changing its basic settings while it is already running. What does it mean to change the TCP port it is listening on ("rpcport") if it's already running? It is even problematic to change the rpcpassword: care needs to be taken to already update it for the current server.
(ref https://github.com/spesmilo/electrum/issues/6762)

This commit disallows changing all of the "rpc*" config variables if the daemon is already running.

---

Simultaneously, it also ensures rpc_password is always set and auth cannot be disabled.

Previously if there was a daemon running, and the user ran
`$ electrum setconfig rpcpassword ""` that would leave the RPC unauthenticated
for the current session. However next time the daemon restarted, get_rpc_credentials would see
the unset password and generate one.

I think this was the worst of both worlds:
- we did not really allow removing the rpc password, except for the current session, and
- perhaps unexpectedly, we would generate a new password on daemon restart

Instead now we explicitly make sure the RPC server can never get into a state where it does not have a password set.

Based on a report by `Zuzana Kotásková <36777@mail.vsfs.cz>`
2026-03-24 17:07:26 +00:00
f321x cb023e22e4 qml: 2fa: make 2fa setup qr code clickable
This will make the 2fa app open when the user clicks on the qr code,
much more convenient than manually copy pasting the secret.
2026-03-24 14:50:45 +01:00
f321x 37159e47a2 qml: 2fa: make it possible to copy 2fa secret
The 2fa secret is not selectable or copyable, this is very inconveniant
when setting up a new 2fa wallet as the user has to somehow manually
write the secret e.g. on a paper to then enter it again in their 2fa
app. This makes the secret string copyable by clicking on it.
2026-03-24 14:50:42 +01:00
ThomasV 3cf2c325d5 Merge pull request #10506 from accumulator/spend_from_coin_selection_refactor
qt: perform 'fully spend' action with coin selection, keep separate from coin control when doing action
2026-03-24 12:46:02 +01:00
ThomasV 31c2ffbf64 Merge pull request #10532 from spesmilo/variable_trampoline_onions
trampoline: allow trampoline onion packets of arbitrary size
2026-03-24 12:11:56 +01:00
ghost43 3c62bf7392 Merge pull request #10538 from f321x/fix_10536
wizard: catch NotLegacySinglesigScriptType during private key import
2026-03-23 12:08:24 +00:00
f321x 2c541d2663 qt: ElectrumGui: repr(UserFacingException) -> str()
Show UserFacingException in ElectrumGui.start_new_window
as str() to the user, ther doesn't seem to be a good reason
to show its repr?
2026-03-23 10:14:31 +01:00
f321x 543b73be9b wizard: catch NotLegacySinglesigScriptType
Catch NetLegacySinglesigScriptType and convert it to a
UserFacingException if the user tries to import a private key for which
it is not possible to get a singlesig descriptor (e.g. p2wsh).

Fixes #10536
2026-03-23 10:04:04 +01:00
ThomasV 89da2a3bee Merge pull request #10533 from spesmilo/adb_subscribe_to_outputs
adb.get_spender: subscribe to outputs explicitly, instead of as a sid…
2026-03-23 08:40:58 +01:00
ThomasV 64dab5ef0e Merge pull request #10535 from SomberNight/202603_rm_bip70
remove bip70 support
2026-03-23 08:39:56 +01:00
SomberNight 3e3f595ebb pem.py, x509.py: rm unused code
now that bip70 support is removed, all this is only used to check expiration of self-signed electrum server certs in interface.py
2026-03-20 18:14:38 +00:00
SomberNight 42ad18b216 rm bip70 support
- could not find a single project that still actually cares about bip70 [0]
    - well except maybe BitPay.
        - but I cannot test with BitPay:
            - they have a testnet3 staging environment on test.bitpay.com
                - but the SSL cert they use for bip70 has expired in 2021
                - the webUI probably also has not been updated since then...
                    - they claim to have added LN support in 2022 in a blog post,
                        but it's not there on test.bitpay.com
            - on mainnet, they require KYC before payment
                - < ... angry noises >
            - their loss then, I don't care.
- this is code that no one wants to maintain

- this does not yet delete the signed bip70 payment data for historical txs
    - but it is no longer possible to export it from the GUI

[0]: https://bitcoinops.org/en/topics/bip70-payment-protocol/
2026-03-20 18:12:55 +00:00
SomberNight baf9a1d976 interface.py: rm broken dead code
As it's failing due to relative imports, this might have been broken since py2->py3 migration.
```
$ python3 ./electrum/interface.py
Traceback (most recent call last):
  File "/home/user/wspace/electrum/./electrum/interface.py", line 31, in <module>
    import asyncio
  File "/usr/lib/python3.13/asyncio/__init__.py", line 8, in <module>
    from .base_events import *
  File "/usr/lib/python3.13/asyncio/base_events.py", line 18, in <module>
    import concurrent.futures
  File "/usr/lib/python3.13/concurrent/futures/__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
    ...<9 lines>...
                                          as_completed)
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 7, in <module>
    import logging
  File "/home/user/wspace/electrum/electrum/logging.py", line 6, in <module>
    import logging.handlers
ModuleNotFoundError: No module named 'logging.handlers'; 'logging' is not a package
```
2026-03-20 17:43:12 +00:00
SomberNight fa6deb8d0e interface.py: rm dead code 2026-03-20 17:43:09 +00:00
SomberNight dceece1cda mv os.urandom sanity check to main __init__.py
cool check but I am going to delete rsakey.py
2026-03-20 17:39:48 +00:00
ghost43 8f21f1d744 Merge pull request #10507 from accumulator/new_txs_notify_summary
qt, qml: for new transaction notifications, instead of using sign, explicitly say sent/received.
2026-03-20 13:58:41 +00:00
SomberNight 2ea8d11524 fixup prev 2026-03-20 13:49:16 +00:00
Sander van Grieken 03e95accdc qt, qml: for new transaction notifications, instead of using sign, explicitly say sent/received.
For multiple transactions, split summary in total sent/received and a balance change.

move duplicated code to wallet.get_user_notifications_for_new_txns()
2026-03-20 12:52:22 +01:00
ghost43 dea8d3e1bd Merge pull request #10500 from SomberNight/202602_win_build
build: win: upgrade docker base img to debian 13
2026-03-19 16:22:31 +00:00
ThomasV b19820dc9d adb.get_spender: subscribe to outputs explicitly, instead of as a side effect
This allows to subscribe only if we need it (for channel closing tx and htlcs)
2026-03-19 14:41:31 +01:00
ThomasV 01d017cd97 follow-up #10442
this assert fails if we do not have the preimage
2026-03-19 11:45:40 +01:00
ThomasV 4680369599 add more options to list_channels 2026-03-19 11:29:43 +01:00
ThomasV 7ee2477b68 Merge pull request #10528 from f321x/qt_swapserver_list_resize
swaps: improve SwapServerDialog, provider CLI, bugfixes
2026-03-19 09:42:05 +01:00
f321x f56e6318e3 swaps: make SwapManager.percentage Decimal
If SwapManager.percentage was a 0.2 float, rounding differences would
cause an exception in the fee calculation inverse sanity check when entering 20
000 sats into the SwapDialog. By making self.percentage a decimal we can
prevent this kind of issue.

```
File "/home/user/code/vibecoding_vm/electrum/electrum/gui/qt/swap_dialog.py", line 294, in on_send_edited
    recv_amount = self.swap_manager.get_recv_amount(send_amount, is_reverse=self.is_reverse)
  File "/home/user/code/vibecoding_vm/electrum/electrum/submarine_swaps.py", line 1320, in get_recv_amount
    if abs(send_amount - inverted_send_amount) > 1:
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
```
2026-03-19 09:17:34 +01:00
ThomasV 558f85296c trampoline: allow trampoline onion packets of arbitrary size 2026-03-19 08:47:07 +01:00
ThomasV edc708674d Merge pull request #10530 from f321x/plugins_website
qt: PluginsDialog: add link to website
2026-03-17 12:19:58 +01:00
f321x efca1cc511 qt: PluginsDialog: add link to website
Adds a link to the plugins.electrum.org website so users who open the
plugins dialog out of curiosity get guided to the website and can
discover other plugins and learn more about the system.
2026-03-17 12:02:31 +01:00
f321x 022a1bf0e7 swapserver: cli: skip pending swaps in history commands
skip pending swaps in the swapserver history/summary cli commands.
They are not relevant and don't contain all required informations yet.

Fixes https://github.com/spesmilo/electrum/issues/10521
Fixes https://github.com/spesmilo/electrum/issues/10525

```
 File "/home/electrum/electrum-fork/electrum/daemon.py", line 268, in handle
   response['result'] = await f(*params)
                        ^^^^^^^^^^^^^^^^
 File "/home/electrum/electrum-fork/electrum/daemon.py", line 381, in run_cmdline
   result = await func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/electrum/electrum-fork/electrum/commands.py", line 207, in func_wrapper
 File "/home/electrum/electrum-fork/electrum/commands.py", line 2349, in func_wrapper
   group = parser.add_argument_group('network options')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/electrum/electrum-fork/electrum/plugins/swapserver/__init__.py", line 79, in get_summary
   swap_history = await get_history(self)
                  ^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/electrum/electrum-fork/electrum/commands.py", line 207, in func_wrapper
 File "/home/electrum/electrum-fork/electrum/commands.py", line 2349, in func_wrapper
   group = parser.add_argument_group('network options')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/electrum/electrum-fork/electrum/plugins/swapserver/__init__.py", line 60, in get_history
   'date': swap['date'].strftime("%Y-%m-%d"),
           ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strftime'
```
2026-03-16 14:53:26 +01:00
ghost43 66ee2185b0 Merge pull request #10529 from SomberNight/202603_tests_qml
tests: move qml stuff to tests/qml/
2026-03-16 13:39:11 +00:00
SomberNight 44e99bc1a9 tests: move qml stuff to tests/qml/ 2026-03-16 13:11:48 +00:00
f321x 88c7a731c0 swaps: rm until filter when fetching server pairs
The `until` filter would limit the relay to only send us events created
up until this timestamp. If the user opens a swap transport by opening
the swap dialog, and keeps the dialog open the dialog will naturally age
above this limit and the relay will stop sending the client swapserver
events as they have (legitimately) been created after this timestamp.

As sanity check we still have the comparison against the current
timestamp in the event parsing loop to prevent pre/backdating.

Fixes https://github.com/spesmilo/electrum/issues/10520
2026-03-16 12:20:47 +01:00
f321x ffd259287d qt: SwapServerDialog: resize server list with dialog
Waste less space in the dialog by limiting the stretch to 10px and
resize the servers_list with the dialog by setting stretch=1 so it can
be made larger.

Fixes https://github.com/spesmilo/electrum/issues/10519
2026-03-16 12:20:36 +01:00
ghost43 d6ec34a80b Merge pull request #10527 from SomberNight/202603_tests_plugins
tests: move revealer and timelock_recovery stuff to tests/plugins/
2026-03-16 01:16:48 +00:00
SomberNight b397ddb008 tests: move revealer and timelock_recovery stuff to tests/plugins/ 2026-03-16 00:52:48 +00:00
SomberNight e4ad44c0c3 Merge branch '202603_timelock_recovery_plugin_checksum': fix checksum calc
merges https://github.com/spesmilo/electrum/pull/10524

> Non-Ascii characters should not be converted for
> checksum calculation.
> This will give consistent hash to BIP-128 and its
> Javascript code example.
>
> Timelock-Recovery Plans that contained only ascii
> characters are not affected.
2026-03-16 00:44:02 +00:00
SomberNight c2f3729424 plugins: timelock_recovery: move checksum func to base class
don't import qt from tests unless it is qt being tested
2026-03-16 00:41:33 +00:00
SomberNight 907ceb9f52 tests: timelock_recovery plugin: add test vector for checksum from bip 2026-03-16 00:35:38 +00:00
Oren 8c5af52c0b test_checksum_non_ascii 2026-03-15 11:25:14 +02:00
Oren 2f3f397a70 Fix checksum following BIP-128 standard
Non-Ascii characters should not be converted for
checksum calculation.
This will give consistent hash to BIP-128 and its
Javascript code example.

Timelock-Recovery Plans that contained only ascii
characters are not affected.

Also, 8 hex-chars is enough for a checksum.
2026-03-15 10:56:14 +02:00
ghost43 27a94ff5bd Merge pull request #10517 from SomberNight/202603_test_lnpeer_modern_shutdown
tests: lnpeer: uncomment testcase: test_modern_shutdown_no_overlap
2026-03-12 19:33:29 +00:00
SomberNight 1c24c61364 tests: lnpeer: uncomment testcase: test_modern_shutdown_no_overlap
This test case has always been disabled, but looks like the justification is easy to fix.
2026-03-12 19:22:44 +00:00
ghost43 169227e148 Merge pull request #10509 from SomberNight/202603_lnpeer_send_commitment
lnpeer: simplify where maybe_send_commitment() is called
2026-03-11 22:20:02 +00:00
SomberNight 7e3af72ad6 lnpeer: maybe_send_commitment: impl batching updates 2026-03-11 17:07:23 +00:00
SomberNight 93f0452406 lnpeer: simplify where maybe_send_commitment() is called
The typical flow of an update is:
---UPDATE--->
--- SIG  --->
<--REVACK----
<-- SIG  ----
---REVACK--->

It makes sense to try to send a sig ("commitment_signed") right after we send an update.
It also makes sense right after we send revack.

Besides those times, we could call "maybe_send_commitment" at *any* time, that is safe, and depending on other call locations, it might be an optimisation, however it is not needed.

In particular it is unclear why we had those calls when we *receive* updates (and only for certain types of updates - not consistently).
2026-03-11 17:07:19 +00:00
Felix d112653eaa Merge pull request #10515 from jhoenicke/patch-1
Update my Electrum server details in servers.json
2026-03-10 18:28:18 +01:00
Jochen Hoenicke e31ce7dce6 Update my Electrum server details in servers.json
I moved my node to standard port again because the non-standard one was apparently used by malware.  I also updated the domain name (both work at the moment, but I prefer the shorter one).
2026-03-10 17:58:43 +01:00
ghost43 601dda7887 Merge pull request #10514 from f321x/fix_bump_fee_exc
transaction: re-raise NetworkException in add_info_from_network
2026-03-09 15:26:08 +00:00