1
0
Commit Graph

16471 Commits

Author SHA1 Message Date
SomberNight
1ff4130804 contrib/docker_notes.md: add notes re debian apt mirror, and envvars
related https://github.com/spesmilo/electrum/issues/8496
2023-06-22 15:45:30 +00:00
SomberNight
922981e586 lnpeer: improve logging in maybe_forward_htlc 2023-06-21 15:22:17 +00:00
ThomasV
4177f8be82 lnworker.create_routes_for_payment: fix MPP detection 2023-06-21 08:55:17 +02:00
gruve-p
fbf41b582a kivy: fix fx history rates 2023-06-20 09:28:13 +02:00
SomberNight
1e3f810667 update release notes for version 4.4.5 2023-06-19 17:30:06 +00:00
SomberNight
52817b220d update locale 2023-06-19 16:01:12 +00:00
ThomasV
cc57648a0c follow-up previous commit 2023-06-19 14:49:25 +02:00
ThomasV
39f8664402 make submarine swap server url configurable 2023-06-19 14:46:56 +02:00
ThomasV
606c51bc4e follow-up previous commit 2023-06-18 13:49:56 +02:00
ThomasV
295734fc53 storage: encapsulate type conversions of stored objects using
decorators (instead of overloading JsonDB._convert_dict and
 _convert_value)
 - stored_in for elements of a StoreDict
 - stored_as for singletons
 - extra register methods are defined for key conversions

This commit was adapted from the jsonpatch branch
2023-06-18 13:08:57 +02:00
SomberNight
079c0ce5b2 Merge branch '202306_trezor_coinjoin' 2023-06-15 14:03:53 +00:00
SomberNight
eef9680743 trezor plugin: support external pre-signed inputs
closes https://github.com/spesmilo/electrum/issues/8324
2023-06-14 17:03:47 +00:00
SomberNight
4a211adcaa trezor plugin: allow multiple change outputs
see https://github.com/spesmilo/electrum/issues/3920
2023-06-14 17:02:07 +00:00
SomberNight
09b9fb8374 exchange_rate: try harder to refresh quote when cache is expiring
Previously we polled every 2.5 minutes to get the fx spot price,
and had a 10 minute cache expiry during which the latest spot price
was valid.

On Android, this often resulted in having no price available (showing
"No data" in GUI) when putting the app in the foreground after e.g.
a half-hour sleep in the background: often there would be no fx price
until the next tick, which could take 2.5 minutes. (btw in some cases
I saw the application trying to get new quotes from the network as
soon as the app was put in the foreground but it seems those happened
so fast that the network was not ready yet and DNS lookups failed)

Now we make the behaviour a bit more complex: we still fetch the price
every 2.5 mins, and the cache is still valid for 10 mins, however if
the last price is >7.5 mins old, we become more aggressive and go into
an exponential backoff, initially trying a request every few seconds.
For the Android scenario, this means there might be "No data" for fx
for a few seconds after a long sleep, however if there is a working
network, it should soon get a fresh fx spot price quote.
2023-06-14 15:42:28 +00:00
SomberNight
03615c2cfc commands: onchain_history: reuse daemon.fx if available 2023-06-14 15:05:26 +00:00
SomberNight
87cba8bf32 trustedcoin: stricter client-side checks for 2fa fee 2023-06-13 16:52:50 +00:00
SomberNight
23f2412da7 qt: follow-up "rm thousand sep when copying numbers to clipboard"
follow-up https://github.com/spesmilo/electrum/pull/8479
2023-06-13 15:59:18 +00:00
ThomasV
5b5100eedc Merge pull request #8479 from thomasleveil/feat_copy_numbers
 remove thousand separator when copying numbers to clipboard
2023-06-13 14:40:17 +02:00
SomberNight
703ec09355 addr_sync: expand docstring for get_tx_fee 2023-06-13 00:24:56 +00:00
Thomas LÉVEIL
1b07472805 🐛 fix #8469 - fiat balance sorting (#8478)
in address list window
2023-06-12 22:39:31 +00:00
Thomas
cdab59f620 remove thousand separator when copying numbers to clipboard
from contextual menus
2023-06-11 23:55:10 +02:00
SomberNight
3ab47e1c45 (trivial) convert more config keys 2023-06-05 15:29:35 +00:00
SomberNight
033ad0feb9 lnworker: fix rebalance_channels
fixes https://github.com/spesmilo/electrum/issues/8468
2023-06-04 03:07:06 +00:00
SomberNight
9b14b87936 win build: tighten pip install with --no-binary somewhat
related https://github.com/spesmilo/electrum/pull/7918
2023-06-02 23:12:36 +00:00
SomberNight
48a8311849 mac build: bump pyinstaller (5.3->5.11) 2023-06-02 23:04:42 +00:00
SomberNight
e455677284 win build: bump pyinstaller (4.10->5.11)
In `build-electrum-git.sh`, the `-w` CLI arg is removed: it was apparently ignored as we are using a .spec file,
and pyinstaller 5.0+ is now raising a hard error (see https://github.com/pyinstaller/pyinstaller/issues/6660).
```
option(s) not allowed:
  --console/--nowindowed/--windowed/--noconsole
makespec options not valid when a .spec file is given
```

-----

In ecc_fast.py, we don't sys.exit() anymore as pyinstaller 5.0+ tries to import electrum during the Analysis phase.
see https://github.com/pyinstaller/pyinstaller/pull/6171

```
57912 INFO: Looking for dynamic libraries
1746 INFO: gettext setting initial language to None
1932 ERROR: libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its depende
ncies). 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 dependenc
ies). 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 dependencie
s). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one of its 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.")]
Traceback (most recent call last):
  File "C:\python3\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\python3\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\python3\scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
    run()
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 1006, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 928, in build
    exec(code, spec_namespace)
  File "deterministic.spec", line 55, in <module>
    a = Analysis([home+'run_electrum',
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 428, in __init__
    self.__postinit__()
  File "C:\python3\lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 736, in assemble
    isolated.call(find_binary_dependencies, self.binaries, self.binding_redirects, collected_packages)
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_parent.py", line 372, in call
    return isolated.call(function, *args, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_parent.py", line 302, in call
    raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to find_binary_dependencies() failed with:
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command
    output = function(*args, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 177, in find_binary_dependencies
    __import__(package)
  File "C:\python3\lib\site-packages\electrum\__init__.py", line 20, in <module>
    from .wallet import Wallet
  File "C:\python3\lib\site-packages\electrum\wallet.py", line 53, in <module>
    from .bip32 import BIP32Node, convert_bip32_intpath_to_strpath, convert_bip32_strpath_to_intpath
  File "C:\python3\lib\site-packages\electrum\bip32.py", line 11, in <module>
    from . import constants
  File "C:\python3\lib\site-packages\electrum\constants.py", line 30, in <module>
    from . import bitcoin
  File "C:\python3\lib\site-packages\electrum\bitcoin.py", line 35, in <module>
    from . import ecc
  File "C:\python3\lib\site-packages\electrum\ecc.py", line 39, in <module>
    from .ecc_fast import _libsecp256k1, SECP256K1_EC_UNCOMPRESSED
  File "C:\python3\lib\site-packages\electrum\ecc_fast.py", line 151, in <module>
    sys.exit(f"Error: Failed to load libsecp256k1.")
SystemExit: Error: Failed to load libsecp256k1.
🗯 ERROR: build-electrum-git failed
```

Also, the -OO flag is removed from wine python, for similar reasons:
pyinstaller imports electrum, and in electrum/__init__.py, we raise
if -O is used: 9b1fb0e5fe/electrum/__init__.py (L40)
2023-06-02 22:37:43 +00:00
SomberNight
98f240d6cd commands: version_info: include python version/path 2023-06-02 21:48:28 +00:00
SomberNight
9b1fb0e5fe android build: bump python, openssl 2023-06-02 17:17:43 +00:00
SomberNight
6442dbb021 mac build: bump python version (3.9.13->3.10.11) 2023-06-02 17:17:40 +00:00
SomberNight
16c3c3c4c0 appimage build: bump python version (3.9.15->3.10.11) 2023-06-02 17:17:36 +00:00
SomberNight
21cf85afca win build: bump python version (3.9.13->3.10.11) 2023-06-02 17:17:33 +00:00
SomberNight
66f219cdf3 win build: update wine 2023-06-02 17:17:30 +00:00
SomberNight
3a1c4299ca build: bump libusb version 2023-06-02 17:17:26 +00:00
SomberNight
a1c24c6261 jade(hw): fix sign_transaction()
same as 9e13246be8

fixes https://github.com/spesmilo/electrum/issues/8463
regression from https://github.com/spesmilo/electrum/pull/8230
2023-06-02 13:48:48 +00:00
Sander van Grieken
2a4d2ac009 payserver: fix import 2023-06-02 13:35:51 +02:00
Sander van Grieken
8cd95f1f7f qml: limit BIP39 cosigners script type to initial choice (bip39) or initial seed (electrum) 2023-06-02 09:46:53 +02:00
SomberNight
eba3282024 fix flake8: follow-up prev 2023-06-01 22:59:40 +00:00
SomberNight
ccc012674f unconditionally raise ImportError if asserts are disabled
I have reconsidered and now think that we should always hard-fail
if asserts asserts are disabled. It is just easier to reason about
the code knowing that asserts are evaluated.

If an end-user or library user has a concrete use case where this is
a problem, please open an issue and let us know.

follow-up
0f541be6f1
0e5464ca13
2023-06-01 17:34:32 +00:00
SomberNight
bd5a786262 update release notes for version 4.4.4 2023-05-31 13:01:32 +00:00
SomberNight
22919bc15c update locale 2023-05-31 12:50:32 +00:00
SomberNight
1c0ba83d10 (trivial) qt wizard: add title to seed options dialog window 2023-05-31 10:58:54 +00:00
Sander van Grieken
6fbe765a3e qml: make ConfirmTxDialog flickable if content larger than window (fixes #8446) 2023-05-31 11:29:14 +02:00
ghost43
2f769d4015 Merge pull request #8459 from benma/bitbox02-6.2.0
bitbox02: update to 6.2.0 to fix a bug on macOS 13.3, and ability to display amount in sats on the device
2023-05-30 23:35:52 +00:00
SomberNight
f284b42fa8 build: update pinned bitbox02 (partial rerun freeze_packages) 2023-05-30 23:34:46 +00:00
SomberNight
184281d2fc version_info cmd: better version for hidapi
was added in https://github.com/trezor/cython-hidapi/pull/143
2023-05-30 22:54:26 +00:00
SomberNight
1b9cb47623 dependencies: rm upper limit for hidapi
Was added in 752b37a03b,
due to upstream issue https://github.com/trezor/cython-hidapi/issues/142,
which should now be fixed in 0.14.0.
2023-05-30 22:51:06 +00:00
Marko Bencun
dfed0ef54a bitbox02: display amounts in sats if Electrum's base unit is sat
The BitBox02 has the ability to display all amounts in sats instead of
BTC. This was introduced in v9.13.0. If Electrum is configured to show
sats, we propagate this config to the BitBox02.

This is backwards compatible: users with older firmware will see the
values in BTC regardless of the config.
2023-05-30 23:57:03 +02:00
Marko Bencun
7164f9fd6e bitbox02: update to 6.2.0
6.2.0 was released to put a minimum requirement on hidapi 0.14.0,
which includes the fix for this issue:

https://github.com/libusb/hidapi/issues/531

That bug caused hidapi on macOS 13.3 to report 0 as the interface
number for all hid devices, which led to the bitbox02 multi edition being listed
twice instead of once - once for the main HW wallet interface and once erroneously
For the U2F interface (which should not be listed).
2023-05-30 23:55:52 +02:00
ghost43
b6cfc12962 Merge pull request #8454 from SomberNight/202305_configvar
config: introduce ConfigVars (take 3)
2023-05-30 14:52:50 +00:00
SomberNight
328a2bb3f2 config: migrate qt gui optional tabs to config vars 2023-05-30 14:04:20 +00:00