1
0
Commit Graph

17081 Commits

Author SHA1 Message Date
SomberNight
1451ec936a win/mac build: fix pyinstaller missing libsecp during part of Analysis
```
602 WARNING: Failed to collect submodules for 'pkg_resources._vendor.pyparsing.diagram' because importing 'pkg_resources._vendor.pyparsing.diagram' raised: ModuleNotFoundError: No module named 'railroad'
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
5921 WARNING: collect_data_files - skipping data collection for module 'electrum.plugins' as it is not a package.
```
2023-11-30 13:43:54 +00:00
SomberNight
262c009c67 pyinstaller build: towards fixing missing "gui/common_qt" folder
pyinstaller tries to import electrum and its different submodules at build-time
during the "Analysis" phase. sys._GUI_QT_VERSION was not getting set there,
and the resulting exception was blocking pyinstaller from discovering that
gui/common_qt is being used.

at runtime:
```
$ ./dist/Electrum.app/Contents/MacOS/run_electrum
  1.53 | E | daemon.Daemon | GUI raised exception: Exception('Error loading trustedcoin plugin: ModuleNotFoundError("No module named \'electrum.gui.common_qt\'")'). shutting down.
  1.53 | E | __main__ | daemon.run_gui errored
Traceback (most recent call last):
  File "electrum/plugin.py", line 135, in load_plugin
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/vagrant/electrum/dist/Electrum.app/Contents/MacOS/electrum/plugins/trustedcoin/qt.py", line 51, in <module>
    from .common_qt import TrustedcoinPluginQObject
  File "/Users/vagrant/electrum/dist/Electrum.app/Contents/MacOS/electrum/plugins/trustedcoin/common_qt.py", line 16, in <module>
    from electrum.gui.common_qt.plugins import PluginQObject
ModuleNotFoundError: No module named 'electrum.gui.common_qt'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run_electrum", line 456, in handle_cmd
    d.run_gui()
  File "electrum/daemon.py", line 617, in run_gui
    self.gui_object = gui.ElectrumGui(config=self.config, daemon=self, plugins=self._plugins)
  File "electrum/util.py", line 473, in do_profile
    o = func(*args, **kw_args)
  File "electrum/gui/qt/__init__.py", line 153, in __init__
    self.plugins.load_plugin('trustedcoin')
  File "electrum/plugin.py", line 138, in load_plugin
    raise Exception(f"Error loading {name} plugin: {repr(e)}") from e
Exception: Error loading trustedcoin plugin: ModuleNotFoundError("No module named 'electrum.gui.common_qt'")
```
2023-11-30 13:43:50 +00:00
SomberNight
6467db0b7d json_db: rename "_write" to sth more descriptive 2023-11-27 15:30:26 +00:00
Sander van Grieken
ae9767880e ui: add icons for script type and deterministic wallet 2023-11-27 16:14:41 +01:00
ThomasV
85f13cc6ea load_keystore: deepcopy object so that it differs from the one in db.data
db.data should not be modified directly
2023-11-27 15:10:44 +01:00
Sander van Grieken
6efd1fc768 followup prev 2023-11-27 14:49:20 +01:00
Sander van Grieken
c16b83f46a tests: add test verifying if privkey add to existing imported wallet persists correctly. 2023-11-27 14:45:40 +01:00
SomberNight
ff53925811 qt console: fix tracebacks in windows binaries
fixes https://github.com/spesmilo/electrum/issues/3315

The cause was that tracebacks look different whether stack items have source text available.
When using the pyinstaller windows binary, there is no source text available.

Example when running from source:
```
>>> a
Traceback (most recent call last):
  File "...\electrum\gui\qt\console.py", line 256, in exec_command
    result = eval(command, self.namespace, self.namespace)
  File "<string>", line 1, in <module>
NameError: name 'a' is not defined

```

Example for pyinstaller windows binary:
```
>>> a
Traceback (most recent call last):
  File "electrum\gui\qt\console.py", line 256, in exec_command
  File "<string>", line 1, in <module>
NameError: name 'a' is not defined

```
2023-11-24 22:36:37 +00:00
SomberNight
b18f9570fc qml wizard: fix creating imported wallet from camera: concat with space
The parser expects the list of keys/addrs to be whitespace-separated (no commas).
Same as line 61.
2023-11-24 20:48:04 +00:00
SomberNight
affe3630b0 qt: addr/coins tab: show tooltip for "freeze address"
related https://github.com/spesmilo/electrum/issues/8698
2023-11-24 19:31:36 +00:00
Sander van Grieken
ab9c3bb9b4 qt: avoid potential proxy settings deserialization problems (fixes #8652) 2023-11-24 15:06:23 +01:00
Sander van Grieken
6f9e86a1ac qml: fix wrong year near newyear in transaction list 2023-11-24 10:54:25 +01:00
ThomasV
f602b2bbed Merge pull request #8700 from SomberNight/202311_apk_build
android build: we always want apks, as we want to use our own privkey
2023-11-23 09:42:21 +01:00
SomberNight
f14e99139c android build: we always want apks, as we want to use our own privkey
ThomasV reported contrib/release.sh generating .aab artifacts.
aabs are shady business... best to avoid handing privkeys to big G (or any 3rd party!).

This must be a consequence of the recent p4a rebase,
e.g. 04bb63bbf0
2023-11-23 03:58:35 +00:00
SomberNight
8db68cadcd swaps: forward swap: make cltv requirements explicit
related: fb4eb86e7c
2023-11-22 18:00:32 +00:00
SomberNight
9f1b8613d0 swaps: code style clean-up, add type hints, force kwargs
no intended functional changes
2023-11-22 17:50:29 +00:00
SomberNight
9d5d582752 swaps: forward swap: (fix) propagate channels parameter 2023-11-22 16:59:24 +00:00
SomberNight
7f64ecc4bd wallet.bump_fee: the glorious return of BumpFeeStrategy :D
gui/qt/rbf_dialog.py (old) lines 57-64 were implementing logic that should not be part of GUI code.
Case in point, gui/qml/qetxfinalizer.py (old) lines 511-513 duplicated half of that logic but not the other half.
That logic is now moved to wallet.get_bumpfee_strategies_for_tx().

More context: a user on irc got confused when using the qml gui. They were sending "max" and wanted to bump_fee.
The qml gui selected the "preserve_payment" strategy by default, using which there was no solution, and the user
did not notice that the strategy can be altered (via the "method" dropdown). The qt gui had logic to select
"decrease_payment" by default in such a case (which does find a solution to bump) but this logic was not
duplicated in the qml gui.
Instead of duplicating the logic, this commit moves it to shared lib code.
2023-11-20 18:55:43 +00:00
Sander van Grieken
03dd38bfb8 qml: add support for ln address and openalias, fix lnurl finalize step,
avoid overloading invoiceParser with new payment identifiers while potentially long-running
resolve/finalize steps are ongoing, show errors inresolve/finalize steps to user.
2023-11-20 17:16:22 +01:00
Sander van Grieken
ff77013a82 qml: check if self._orig_tx is valid. fixes #8407 2023-11-20 17:13:23 +01:00
Sander van Grieken
b098be988e qml: show channel close tx(id) in ChannelDetails 2023-11-20 12:58:48 +01:00
SomberNight
6a8fb26881 (trivial) follow-up prev 2023-11-20 11:37:39 +00:00
SomberNight
4cdd199f5b lnworker: add/fix some type hints, add some comments
follow-up recent refactor
2023-11-20 11:34:56 +00:00
ThomasV
1cc92d4890 trampoline forwarding: before failing payment, wait until all htcs
have failed and session is not longer active.
2023-11-18 16:08:11 +01:00
ThomasV
9b1c40e396 Refactor payment forwarding:
- all forwarding types use the same flow
 - forwarding callback returns a htlc_key or None
 - forwarding info is persisted in lnworker:
   - ongoing_forwardings
   - downstream to upstream htlc_key
   - htlc_key -> error_bytes
2023-11-18 16:03:18 +01:00
SomberNight
f1c63e2d51 commands: make payto/etc respect 'confirmed_only' config var
regression from 2f6d60c715

fixes https://github.com/spesmilo/electrum/issues/8693
2023-11-17 13:05:23 +00:00
SomberNight
c4068ab6cc swaps: add small comment 2023-11-17 11:16:45 +00:00
ThomasV
835992c7ea lnworker: remove if statements where the condition is always True.
Such statements creates confusion for the reader.
2023-11-16 17:34:48 +01:00
Sander van Grieken
a57a0d001b qml: make TextAreas more visible 2023-11-15 18:42:11 +01:00
Sander van Grieken
f8eb2e8cf8 qml: resize menus according to content 2023-11-15 17:35:08 +01:00
Sander van Grieken
4ab973f93d followup 3793a6b6b6, remove leftovers 2023-11-14 17:22:05 +01:00
Sander van Grieken
3793a6b6b6 qml: use highlight pane for QR codes, refactor ReceiveDialog invoice select UI. 2023-11-14 17:19:27 +01:00
Sander van Grieken
86a45c668c few small fixes 2023-11-14 14:36:54 +01:00
Sander van Grieken
621a397b70 i18n: translate a few untranslated strings and avoid early translate for pr_tooltips and pr_expiration_values
fixes #8689
2023-11-14 12:07:49 +01:00
SomberNight
4006a2f548 SECURITY.md: small clean-up 2023-11-13 15:45:05 +00:00
SomberNight
6ffaf7c526 lnworker: (followup prev) set .config in baseclass init, not subclasses
as methods in the base class also rely on the config field, not just methods in the subclasses
2023-11-13 15:39:15 +00:00
ThomasV
7447cf9dcc lnworker: always initialize self.config in constructor 2023-11-13 14:54:40 +01:00
ThomasV
6865204d7b Merge pull request #8671 from spesmilo/just_in_time_channels
Just in time channels
2023-11-13 14:31:34 +01:00
SomberNight
e5fae1d685 util.NetworkRetryManager: better document API 2023-11-13 12:22:05 +00:00
Sander van Grieken
94b1df4a08 qml: small UI fix, wording. 2023-11-13 11:35:30 +01:00
ThomasV
7bebd62f13 zerofonf trusdted node: use NetworkRetryManager method _can_retry_addr 2023-11-13 10:47:18 +01:00
ThomasV
a338459d45 just-in-time channels:
- a node scid alias is derived from the node ID
 - the channel opening fee is sent in a TLV field of open_channel
 - the server requires htlc settlement before broadcasting
   (server does not trust client)
2023-11-13 10:47:18 +01:00
ThomasV
816e617aaf option_zeroconf
- accept zeroconf channels only from a single node
 - fw_info uses get_scid_or_local_alias
2023-11-13 10:47:18 +01:00
ThomasV
96e143b6c3 lnpeer: abort send_revoke_and_ack and maybe_send_commitment if channel is closed. fixes #8684 2023-11-13 10:43:16 +01:00
ThomasV
98f9f295cf fix #8683; do not force close channel if we just sent update_fulfill_htlc 2023-11-12 17:10:50 +01:00
ThomasV
4a3a61c6b0 Merge pull request #8678 from accumulator/qml_password_strength
qml: introduce PasswordStrengthIndicator control, and add to Password…
2023-11-11 09:52:52 +01:00
Sander van Grieken
d1d4e19554 qml: txdetails: add lockDelay property when height is TX_HEIGHT_FUTURE and add mempool depth for height TX_HEIGHT_UNCONF_PARENT 2023-11-10 17:03:56 +01:00
ThomasV
de0dc93a9d Merge pull request #8675 from accumulator/address_delete
qml: implement delete address for imported wallets
2023-11-10 15:23:29 +01:00
ThomasV
4252c30210 Merge pull request #8682 from accumulator/about_version
qml: remove APK version, add Qt and PyQt version strings to About page
2023-11-10 15:04:53 +01:00
Sander van Grieken
3967323842 qml: refactor ChannelDetails. Add funding outpoint 2023-11-10 13:02:55 +01:00