Commit Graph

19938 Commits

Author SHA1 Message Date
ghost43 67b4ebd82c Merge pull request #10497 from f321x/version_4_7_1
Version 4.7.1 preparation
2026-02-26 17:35:15 +00:00
f321x eee2e85826 bump version to 4.7.1 2026-02-26 18:06:31 +01:00
f321x 8d95135af6 add version 4.7.1 release notes
Co-authored-by: SomberNight <somber.night@protonmail.com>
2026-02-26 18:05:31 +01:00
ghost43 ff6f37389e Merge pull request #10495 from SomberNight/202602_bump_secp
deps: bump libsecp256k1 version (0.7.0->0.7.1) and electrum-ecc
2026-02-26 15:28:19 +00:00
SomberNight d733350ac5 lnwatcher: ~document behaviour re subbing to historical chans and swaps
not so intuitive

ref https://github.com/spesmilo/electrum/pull/7852 ("Persist lnwatcher")
2026-02-25 18:48:04 +00:00
ghost43 2c9f4fdbae Merge pull request #10433 from f321x/qt_changelog
qt: add Changelog to Help menu in toolbar
2026-02-25 17:26:06 +00:00
SomberNight 9dc725fa56 deps: bump libsecp256k1 version (0.7.0->0.7.1) and electrum-ecc 2026-02-25 16:38:11 +00:00
ghost43 9a41a5472a Merge pull request #10442 from SomberNight/202601_lnworker_is_preimage_public
lnsweep: simplify maybe_reveal_preimage_for_htlc
2026-02-25 15:35:20 +00:00
SomberNight 10274c1cd7 simplify prev 2026-02-24 17:57:58 +00:00
SomberNight 0b2c7a8a38 lnsweep: safer maybe_reveal_preimage_for_htlc, add "is_preimage_public"
"When should we reveal preimages onchain?"
This commit tries to simplify the thinking by making the observation:
- we can reveal preimages (actually in any context) if they are already public
- a preimage is public if any other lightning node knows it besides us
  - if we learn the preimage from another LN node, it is public
  - if we send update_fulfill_htlc, it becomes public
  - if we see a preimage onchain, it is public

- in lnsweep._maybe_reveal_preimage_for_htlc:
  - partial mpp check is not relevant if preimage is already public
  - let's just always do KeepWatchingTXO, for sanity/safety

Co-authored-by: ThomasV <thomasv@electrum.org>
2026-02-24 17:49:15 +00:00
ThomasV 6feb992712 Merge pull request #10453 from f321x/debug_rbf_fee_calculation
wallet: estimate base tx feerate based on original base tx size
2026-02-24 16:45:07 +01:00
f321x 3133148acd transaction: extend estimated_size() docstring
Extends the docstring of Transaction.estimated_size().

Co-Authored-By: SomberNight <somber.night@protonmail.com>
2026-02-24 14:37:06 +01:00
f321x e9ac3e93d7 transaction: use dummy DER ECDSA sig from descriptor.py
We have two different dummy der signatures of varying size,
this unifies them to use a single one from descriptor.py.
2026-02-24 14:37:04 +01:00
f321x f1e792cc7b test_wallet_vertical: test bump_fee raises for too low fee
Test that Abstract_Wallet.bump_fee() raises if the given feerate
of the replacement is equal to the feerate of the tx to bump as this
wouldn't be accepted to the mempool.
2026-02-24 14:37:02 +01:00
f321x 6c143fa946 test_wallet_vertical: add test for dscancel fee estimate
Check that dscancel properly raises CannotDoubleSpendTx if the
feerate of the new tx is lower than the tx to be cancelled.
2026-02-24 14:37:01 +01:00
f321x 6e1bf7c4fb test_wallet_vertical: add test for batch tx fee increase
Adds unittest to check the fee increase when adding outputs to a base
tx. Supposed to prevent creating transactions that don't get accepted
like in this traceback:
```
broadcast_transaction error [DO NOT TRUST THIS MESSAGE]: "RPCError(1, 'the transaction was rejected by network rules.\\n\\ninsufficient fee, rejecting replacement ceeaef5ac7f82286e42ebd530e965fa4c7a6c11933d6b89d6d6f0ee2c69db839; new feerate 0.00001109 BTC/kvB <= old feerate 0.00001110 BTC/kvB
```
2026-02-24 14:36:59 +01:00
f321x a9f20e4d3d wallet: rbf: estimate base tx size before stripping
Estimate the size of a base tx before stripping its signatures
so the lower bound feerate used to calculate the fee for the rbf
transaction doesn't underestimate the feerate of the base tx.
2026-02-24 14:36:50 +01:00
ghost43 8427a11a5f Merge pull request #10493 from f321x/gossip_fix_save_remote_update
lnpeer: don't try saving our own channel update as remote update
2026-02-23 16:35:13 +00:00
ghost43 cb97200933 Merge pull request #10494 from f321x/console_font_size
qt: console: allow changing font size
2026-02-23 16:33:08 +00:00
f321x 2df68d9249 qt: console: allow changing font size
Allows changing the font size in the qt Console with
`Ctrl` + `+` and `Ctrl` + `-`.
2026-02-23 17:27:39 +01:00
f321x ddb01f5355 lnpeer: don't save our own channel update as remote upd
I noticed CLN is sending our own channel update to us on
reestablishment, we then assume it to be the remote nodes
update and try to verify the signature against their pubkey
which fails and throws `InvalidGossipMsg`.

This adds a check preventing us from trying to save our own
channel updates as remote update.
2026-02-23 17:12:15 +01:00
ghost43 9a71382c5a Merge pull request #10479 from SomberNight/202602_locale_fancy_names
locale: gui: show translation completion percentage in language names
2026-02-21 04:07:54 +00:00
SomberNight 4d2ea4f22c update locale
This includes https://github.com/spesmilo/electrum-locale/pull/54,
which adds the new "X-Electrum-SourceStringCount" header into the .po/.mo files.
2026-02-21 03:51:52 +00:00
SomberNight 3afa2fcdf3 locale: gui: show translation completion percentage in language names
In the GUIs, on the language-select screen, show e.g.
  Czech (100%), Danish (13%), Dutch (54%)
instead of
  Czech, Danish, Dutch

- we count the source strings when creating the .pot PO-template file
  and add an "X-Electrum-SourceStringCount" header to it, in the push_locale.py script that uploads the .pot file to crowdin.
  - later, when we run electrum-locale/update.py to download the translations in .po files, these files will also contain the same header.
  - then when the build_locale.sh script compiles those .po files, we can read the header and use it to populate a new "stats.json" file
    that we place in electrum/locale/locale/ and bundle in the all release binaries/distributables.
    - stats.json also includes the number of translated strings for each lang
- at runtime we simply read stats.json and use the values to calculate the percentages
  - a prior implementation did not pre-calc stats.json but did all calculations at runtime (by opening all .mo translations)
    - however that was deemed to slow, hence the build-time pre-calc
      - runtime calc took 40 ms on my laptop, so I guess it could easily take 10x that on an old phone
- just as we have always been very tolerant of any locale files or even the whole locale/ dir missing, we also tolerate stats.json missing
2026-02-21 03:40:09 +00:00
SomberNight 6de3fef717 (trivial) consistent whitespaces in .gitmodules 2026-02-20 16:30:48 +00:00
ghost43 49f1eff115 Merge pull request #10490 from f321x/locale_llm_proofreader_cleanup
locale: exclude llm proofreader directory from build
2026-02-20 16:20:38 +00:00
f321x 0e7f7b30fc locale: rm llm_proofreader directory during build
Deletes the llm_proofreader directory during the build so
these scripts aren't bundled into the binaries.
2026-02-20 16:39:18 +01:00
f321x 53166cc077 git: ignore changes to locale submodule
add ignore = dirty to electrum locale submodule so changes to the
locale submodule files don't show up in the main git status.
2026-02-20 16:39:11 +01:00
f321x a1f1b39368 wallet_db: assert WalletDBUpgrader.storage is dict
Assert `WalletDBUpgrader.data` is a regular in-memory dict and not
some StoredDict, so if an exception would happen during a wallet
db upgrade the partial changes don't get commited to disk.
2026-02-20 16:06:42 +01:00
ghost43 71a1e96df6 Merge pull request #10489 from f321x/fix_10487
wallet_db: handle non-existing parent_set_key in v65
2026-02-20 14:54:38 +00:00
f321x 73a03249df wallet_db: handle non-existing parent_set_key in v65
Handles non-existing parent_set_key in _convert_version_65.

Fixes #10487
2026-02-20 13:58:51 +01:00
SomberNight 6c1e085937 contrib/locale/push_locale: do not sort source-strings
xgettext and related tools have a -s/--sort-output option, which results in the output being lexicographically sorted. The gettext maintainers recommend against using this option and even started deprecating it in some of their tools (xgettext included):
- with -s, source strings are lexicographically sorted in the .pot/.po files
- without -s, source string are output in the same order they are found in the code
  - this way, translators have to do much fewer context switches when contributing translations

note that the qml part we have already *not* been sorting
2026-02-19 16:25:22 +00:00
SomberNight cf25990973 locale: don't translate string "Electrum", "BIP39" 2026-02-19 16:13:44 +00:00
Sander van Grieken b10b14c2f8 qml: ReceiveDetailsDialog use proper ButtonContainer 2026-02-19 17:12:17 +01:00
ThomasV 0c32bde721 Merge pull request #10480 from f321x/fix_exc_offline_mode
qt: fix toolbar action exc in offline mode
2026-02-18 17:41:23 +01:00
ThomasV 51322137bd Merge pull request #10481 from f321x/nwc_thread_safety
plugin: nwc: qt: fix thread safety bug
2026-02-18 16:25:57 +01:00
accumulator c097c05e07 Merge pull request #10484 from f321x/fix_android_8_startup_error
android: biometry: catch java import errors
2026-02-18 13:50:34 +01:00
SomberNight c6dfc8e649 fix: bip21.py: add missing import
urllib.parse needs to be explicitly imported for e.g. urllib.parse.urlparse to work.
I think this was not erroring only because urllib.parse is imported in other modules.
2026-02-17 18:11:13 +00:00
SomberNight e2c41aabbe locale: don't translate string "Electrum" 2026-02-17 13:48:51 +00:00
SomberNight 6eb6f31301 contrib/locale/push_locale: add comments re proofreader-approval
see https://github.com/spesmilo/electrum-locale/commit/6b07fc29ceee1489d825334e0682983dc450f228
2026-02-17 13:33:05 +00:00
f321x f573ab2d56 android: biometry: catch java import errors
Catch JavaError when trying to load the java classes of the biometry
module on startup. This can raise if the device is on an old API version
and the loaded java class depends on apis unknown to the os.

Fixes #10470

```
02-17 10:07:25.714  5254  5270 I python  :   0.47 | E | __main__ | daemon.run_gui errored
02-17 10:07:25.714  5254  5270 I python  : Traceback (most recent call last):
02-17 10:07:25.714  5254  5270 I python  :   File "app/main.py", line 514, in handle_cmd
02-17 10:07:25.714  5254  5270 I python  :   File "app/electrum/daemon.py", line 653, in run_gui
02-17 10:07:25.714  5254  5270 I python  :   File "app/electrum/gui/qml/__init__.py", line 38, in <module>
02-17 10:07:25.714  5254  5270 I python  :   File "app/electrum/gui/qml/qeapp.py", line 49, in <module>
02-17 10:07:25.714  5254  5270 I python  :   File "app/electrum/gui/qml/qebiometrics.py", line 33, in <module>
02-17 10:07:25.714  5254  5270 I python  :   File "jnius/reflect.py", line 243, in autoclass
02-17 10:07:25.714  5254  5270 I python  :   File "jnius/jnius_export_class.pxi", line 877, in jnius.jnius.JavaMethod.__call__
02-17 10:07:25.714  5254  5270 I python  :   File "jnius/jnius_export_class.pxi", line 964, in jnius.jnius.JavaMethod.call_method
02-17 10:07:25.714  5254  5270 I python  :   File "jnius/jnius_utils.pxi", line 79, in jnius.jnius.check_exception
02-17 10:07:25.714  5254  5270 I python  : jnius.jnius.JavaException: JVM exception occurred: Failed resolution of: Landroid/hardware/biometrics/BiometricPrompt$AuthenticationResult; java.lang.NoClassDefFoundError
```
2026-02-17 10:18:21 +01:00
Felix 6f23d50b1b Merge pull request #10483 from f321x/add_server
servers.json: add additional default server
2026-02-17 09:35:57 +01:00
f321x 52b554a5f2 servers.json: add additional default server
Add new additional default server on protocol version 1.6.0 operated
by a known contributor.
2026-02-17 09:33:43 +01:00
ThomasV 952737594b announcement_signatures: add more early returns 2026-02-17 08:57:49 +01:00
ghost43 a6f4a25f57 Merge pull request #10482 from Sanksari12/master
Remove non-existing electrum server on owner's request
2026-02-17 06:58:17 +00:00
Sanksari12 67f3fcfb16 Update servers.json
Remove lavahost.org from servers.json as the host does not host a public electrum instance.
2026-02-16 19:47:42 +00:00
SomberNight cf072f6ece contrib/locale/push_locale: trivial follow-up: write vs writelines
kinda wild that writelines worked there too, that's what we get for dynamic typing... :)

follow-up https://github.com/spesmilo/electrum/commit/d20c9364efb01a513e14b5eb9195f51b9919c695
2026-02-16 17:29:24 +00:00
f321x 4556d59fc0 plugin: nwc: qt: fix thread safety bug
Call `NWCServer.event_handler_task.cancel()` on asyncio thread.

```
 File "/home/user/Documents/electrum/electrum/plugins/nwc/nwcserver.py", line 281, in restart_event_handler
   self.event_handler_task.cancel()
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
 File "/usr/lib64/python3.14/asyncio/base_events.py", line 829, in call_soon
   self._check_thread()
   ~~~~~~~~~~~~~~~~~~^^
 File "/usr/lib64/python3.14/asyncio/base_events.py", line 866, in _check_thread
   raise RuntimeError(
       "Non-thread-safe operation invoked on an event loop other "
       "than the current one")
RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one
```
2026-02-16 09:28:16 +01:00
f321x 907fff46e5 qt: fix toolbar action exc in offline mode
Fix exception when clicking on "Donate to server" in offline mode by not
showing the "Donate to server" menu action when no network is set.

Raise CancelledError in `fetch_bitcoin_paper` as
`_fetch_tx_from_network` already shows an according error message so the
second, subsequent error message shown by `on_error` is not useful if
`_fetch_tx_from_network` already failed.

```
63.53 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
 File "/home/user/Documents/electrum/electrum/gui/qt/main_window.py", line 864, in donate_to_server
   d = self.network.get_donation_address()
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_donation_address'
```
2026-02-16 09:17:42 +01:00
SomberNight 4c597ffb5a follow-up prev: satisfy ban_unicode.py 2026-02-14 10:10:59 +00:00