1
0
Commit Graph

14180 Commits

Author SHA1 Message Date
ThomasV
eb8ab74698 fix date in release notes 4.2.0 2022-03-16 13:58:32 +01:00
SomberNight
978677700c fix prev 2022-03-16 13:34:15 +01:00
SomberNight
dcf194952b android build: update openssl 2022-03-16 13:24:03 +01:00
SomberNight
d154e368f1 wallet: fix clear_requests and clear_invoices
these are StoredDicts, subdicts in wallet_db.data, so reassigning the name does not work
2022-03-16 12:51:03 +01:00
gruve-p
1aa831c7d9 appimage: update libssl-dev libssl1.0.0 openssl (#7715) 2022-03-15 23:45:49 +00:00
SomberNight
7cd14e4ef4 android build: (reprod) exclude frozenlist-*.dist-info from apk
```
$ cat d
29,30c29,32
< 527b99c5fa20d43ab49302f6b4b1a9a671ac04601f5f471f254ae2f97cb31e17  ./META-INF/MANIFEST.MF
< 0a2887e3041a3eaeef6e0f1dbf65fcc527bf0c878728b0e9d4b783b855f3e64c  ./assets/private.mp3
---
> d18d1d9f4933952f93b32091b0a002cdb9ed94fdecc20b22d605cf8143a02d92  ./META-INF/CERT.RSA
> ec2ca24868f69427162c0dc2f3a3390e6165dec7b3202c65928ae77939316392  ./META-INF/CERT.SF
> 7a94368993707d82a328cf7625450e6868f450ecf73474574048ff70a707f4ce  ./META-INF/MANIFEST.MF
> 84c86813d93d4e74a7f199da8b925d36d89608eee37031a88f61a833ab30e6dd  ./assets/private.mp3
1672c1674
< 10666a3ae7e2080120165b2b0edbbe2eb8e7b679dac7de18dffde0e6f786fd08  ./assets/private_mp3/packages/frozenlist-1.3.0.dist-info/RECORD
---
> 803d20545cf39ade4d9b803034f0fd2002478ffdcc2056852621ae2c42e37d0d  ./assets/private_mp3/packages/frozenlist-1.3.0.dist-info/RECORD
```
2022-03-15 20:05:44 +01:00
SomberNight
2c5eb26ff0 contrib/release.sh: fix some paths re android apk 2022-03-15 20:00:43 +01:00
SomberNight
f9b07d15af macos build: brew now requires xcode cli tools (not full xcode)
Which means we need *both* xcode cli tools and full xcode.
Document this weirdness, including the exact paths they should be at.

excerpt from terminal when running make_osx:
```
Warning: You are using macOS 10.14.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

==> Downloading https://ftp.gnu.org/gnu/coreutils/coreutils-9.0.tar.xz
Already downloaded: /Users/vagrant/Library/Caches/Homebrew/downloads/5744bb33344b6180adca9d909a87e830d55982a1b3229c61e9dc0e35cfacbf25--coreutils-9.0.tar.xz
Error: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools for Xcode 11.3.1 from:
  https://developer.apple.com/download/all/
```
2022-03-15 19:59:56 +01:00
ThomasV
d10203f88e update submodule 2022-03-15 15:26:57 +01:00
SomberNight
f94f142605 prepare release 4.2.0 2022-03-15 15:06:28 +01:00
SomberNight
15643b7951 qt init: make sure wallet file parsing errors are shown in gui
Some exceptions were just killing the gui silently and not even logged.

E.g.:
```
E | gui.qt.ElectrumGui | error loading wallet (or creating window for it)
Traceback (most recent call last):
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 433, in main
    if not self.start_new_window(path, self.config.get('url'), app_is_starting=True):
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 307, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 332, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 377, in _start_wizard_to_select_or_create_wallet
    db = WalletDB(storage.read(), manual_upgrades=False)
  File "/opt/electrum/electrum/wallet_db.py", line 73, in __init__
    self.load_data(raw)
  File "/opt/electrum/electrum/wallet_db.py", line 104, in load_data
    self._after_upgrade_tasks()
  File "/opt/electrum/electrum/wallet_db.py", line 202, in _after_upgrade_tasks
    self._load_transactions()
  File "/opt/electrum/electrum/util.py", line 439, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/opt/electrum/electrum/util.py", line 435, in do_profile
    o = func(*args, **kw_args)
  File "/opt/electrum/electrum/wallet_db.py", line 1310, in _load_transactions
    self.data = StoredDict(self.data, self, [])
  File "/opt/electrum/electrum/json_db.py", line 79, in __init__
    self.__setitem__(k, v)
  File "/opt/electrum/electrum/json_db.py", line 44, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/electrum/electrum/json_db.py", line 97, in __setitem__
    v = self.db._convert_dict(self.path, key, v)
  File "/opt/electrum/electrum/wallet_db.py", line 1361, in _convert_dict
    v = dict((k, SwapData(**x)) for k, x in v.items())
```
2022-03-15 14:23:30 +01:00
SomberNight
3771553a2c crash reporter: if disabled via config, make sure EEQueue is flushed
If the user had `config.get("show_crash_reporter")==False`, they would
never get to see excs collected via `send_exception_to_crash_reporter(exc)`.

E.g.:
```
E | gui.qt.ElectrumGui | error loading wallet (or creating window for it)
Traceback (most recent call last):
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 433, in main
    if not self.start_new_window(path, self.config.get('url'), app_is_starting=True):
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 307, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 332, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
  File "/opt/electrum/electrum/gui/qt/__init__.py", line 377, in _start_wizard_to_select_or_create_wallet
    db = WalletDB(storage.read(), manual_upgrades=False)
  File "/opt/electrum/electrum/wallet_db.py", line 73, in __init__
    self.load_data(raw)
  File "/opt/electrum/electrum/wallet_db.py", line 104, in load_data
    self._after_upgrade_tasks()
  File "/opt/electrum/electrum/wallet_db.py", line 202, in _after_upgrade_tasks
    self._load_transactions()
  File "/opt/electrum/electrum/util.py", line 439, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/opt/electrum/electrum/util.py", line 435, in do_profile
    o = func(*args, **kw_args)
  File "/opt/electrum/electrum/wallet_db.py", line 1310, in _load_transactions
    self.data = StoredDict(self.data, self, [])
  File "/opt/electrum/electrum/json_db.py", line 79, in __init__
    self.__setitem__(k, v)
  File "/opt/electrum/electrum/json_db.py", line 44, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/electrum/electrum/json_db.py", line 97, in __setitem__
    v = self.db._convert_dict(self.path, key, v)
  File "/opt/electrum/electrum/wallet_db.py", line 1361, in _convert_dict
    v = dict((k, SwapData(**x)) for k, x in v.items())
```
2022-03-15 13:39:33 +01:00
ThomasV
05119b0d2c lnpeer: fix shutdown: do not broadcast dummy tx 2022-03-15 09:15:48 +01:00
SomberNight
1c297d6049 android build: add Qt/QML build-time dependencies
related 78b51b3f43 (r826140909)
2022-03-14 21:36:27 +01:00
SomberNight
338637973f frozen deps: update bitbox02 and coldcard libs 2022-03-14 17:32:04 +01:00
SomberNight
b1b17029f1 android build: bump targetSdkVersion to 30
This is the new minimum the google play store requires.

note: the newer android command-line tools use a tiny bit different paths,
hence the `mv "${ANDROID_SDK_HOME}/cmdline-tools" "${ANDROID_SDK_HOME}/tools"` rename
see https://github.com/kivy/python-for-android/issues/2540
2022-03-14 16:50:10 +01:00
SomberNight
841a701acf kivy: show error when failing to save wallet file backup
related: https://github.com/spesmilo/electrum/issues/6774#issuecomment-856098099
2022-03-14 16:45:07 +01:00
nvk
12832a3199 Improved COLDCARD icons PNG+SVG (#7709) 2022-03-11 19:30:44 +00:00
SomberNight
c8dd68bd63 DeviceMgr.select_device: add some log lines
related https://github.com/spesmilo/electrum/issues/5759#issuecomment-1060093399
2022-03-11 15:49:30 +01:00
SomberNight
d7c02c4f7f network.switch_to_interface: catch 'task group terminated'
closes https://github.com/spesmilo/electrum/issues/7677
see https://github.com/spesmilo/electrum/issues/7677#issuecomment-1065170369
2022-03-11 15:39:03 +01:00
scgbckbone
67c386c39a change coldcard icons to be more consistent with the other vendors (#7708)
Co-authored-by: avirgovi <avirgovi@cisco.com>
2022-03-11 13:20:46 +00:00
SomberNight
e454a06e80 electrum-env script: don't pull in "pip install --user" pkgs
apt-get/pacman installed stuff such as PyQt5 are nice to detect
(instead of installing it via pip inside the venv), however
it is probably better to isolate the venv from the ~global pip.
2022-03-11 14:17:38 +01:00
ThomasV
a65b97d25c lnpeer: raise GracefulDisconnect in wait_for_message 2022-03-10 14:56:46 +01:00
ThomasV
b4a3622bc3 Merge pull request #7703 from spesmilo/buildozer_qml
Add Qt5/QML building framework to contrib/android:
2022-03-10 14:43:27 +01:00
ThomasV
00902a40d7 lnpeer: favor schedule_force_closing wrapper 2022-03-09 15:53:53 +01:00
ThomasV
da16b11159 minor: simplification 2022-03-09 15:46:42 +01:00
ThomasV
61eebb2b77 lnpeer: no need to raise GracefulDisconnect twice 2022-03-09 13:48:11 +01:00
ThomasV
47917d9e6c lnpeer: factorize on_warning/on_error code 2022-03-09 13:40:44 +01:00
bitromortac
3915045067 lnpeer: warnings for shutdown and open_channel 2022-03-09 13:40:44 +01:00
bitromortac
e2b1f6c6d5 lnutil: exceptions for LN protocol errors/warnings
The exceptions are meant to be raised in places where the BOLTs require
the sending of warning or error messages. They are necessary to handle
protocol failures occuring helper functions that check constraints.
2022-03-09 13:40:44 +01:00
bitromortac
9e800172ec lnpeer: send/handle error and warning messages
* adds methods for sending protocol errors/warnings
* handling of warning messages
2022-03-09 13:40:44 +01:00
bitromortac
7d8f943150 lnwire: understand warning messages 2022-03-09 13:40:44 +01:00
ThomasV
78b51b3f43 update cirrus make_apk command 2022-03-09 10:45:51 +01:00
ThomasV
d91a4da557 Add Qt5/QML building framework to contrib/android:
- update requirements file for building PyQt5
 - use separate .buildozer directories for qml and Kivy
 - add GUI and ARCH parameters to android/build.sh
2022-03-08 17:21:31 +01:00
ThomasV
6667a79f10 modern shutdown:
- clarify TODOs
 - add tests for shutdown with modern negotiation
2022-03-08 11:57:19 +01:00
ThomasV
0b203f0b94 lnpeer: refactor fee negotiation in _shutdown
- the fee negotiation is split into smaller functions, reducing the scope of variables.
  - the while loop logic is condensed in a few lines, so it is easier to understand termination conditions.
  - removed code that was never executed
2022-03-08 11:55:40 +01:00
bitromortac
ec740d45f1 lnpeer: modern fee negotiation
Updates the closing fee negotiation to comply with most recent spec
changes, see https://github.com/lightning/bolts/pull/847
The closing negotiation is backwards compatible with the old
negotiation.
2022-03-07 10:36:20 +01:00
bitromortac
95f42df0ac lnwire: add fee_range tlv 2022-03-07 10:36:20 +01:00
gruve-p
2c006f269b Update udev rules for Nano S Plus (#7698) 2022-03-04 15:51:18 +00:00
ghost43
cc8587aec2 Merge pull request #7697 from SomberNight/202203_build_nosudo
build: rm need for sudo in most places; and do not run as root
2022-03-04 12:28:37 +00:00
Federico
fcf54432f7 network: make request timeout configurable (#7696) 2022-03-04 12:25:56 +00:00
SomberNight
b726fe85e1 contrib: add docker_notes.md 2022-03-03 19:24:22 +01:00
SomberNight
0df8392c86 build: rm need for sudo in most places; and do not run as root
This includes two logically separate changes:
- on the host, try not to require sudo when running the build scripts
    - namely when interacting with the docker daemon, this requires
      the unix user on the host to be part of the `docker` group
    - this solves part of https://github.com/spesmilo/electrum/issues/7602
- while running inside the docker containers, do not run as root
    - this means that e.g. files created in mounted folders should
      no longer be owned by root on the host
    - there is some code duplication involved here - not sure
      how it could be deduped.
2022-03-03 19:24:18 +01:00
SomberNight
cdfc75ff2b appimage: update package (libc) in dockerfile
Ubuntu no longer serves old version
2022-03-03 19:22:52 +01:00
scgbckbone
122c09cc04 BUGFIX: invalid client loaded for identical wallet with different HW type (#7689)
* typecheck client selected by keystore - check if plugin types match

* add log msg + refactor if branching

* moved type check to own function; moved from 'client_for_keystore' to 'force_pair_xpub' and 'client_by_xpub'

* refactor

Co-authored-by: avirgovi <avirgovi@cisco.com>
2022-03-03 12:24:28 +00:00
ThomasV
c862dbf9d9 Merge pull request #7694 from benma/README-unit-tests
README: docs on how to run unit tests
2022-03-03 10:41:51 +01:00
ghost43
2b17cb1eb7 Merge pull request #7695 from benma/unit-test-payload
tests: unit test address_to_payload
2022-03-02 14:38:43 +00:00
Marko Bencun
1d652a2a04 tests: unit test address_to_payload 2022-03-02 14:54:11 +01:00
Marko Bencun
d18b05043d README: docs on how to run unit tests
It is helpful for contributors to discover how to run unit tests easily.
2022-03-02 14:51:37 +01:00
ghost43
8acda5f48d Merge pull request #7693 from benma/bb02
bitbox02: bump dependency to v6.0.0, support sending to taproot
2022-03-02 13:29:24 +00:00