1
0
Commit Graph

13901 Commits

Author SHA1 Message Date
SomberNight
4fd6282f51 mac build: download python from python.org instead of using pyenv 2021-07-16 01:19:56 +02:00
SomberNight
8c1380ca8b mac build: trivial clean-up 2021-07-15 19:43:15 +02:00
MrNaif2018
aafa74ed08 Improve _mythread checks (#7403)
* Improve _mythread checks

* Create get_running_loop util
2021-07-15 14:52:25 +00:00
SomberNight
c5129ee447 follow-up prev 2021-07-15 01:47:26 +02:00
SomberNight
8481afb286 lnchannel: introduce HTLCWithStatus NamedTuple 2021-07-15 01:35:24 +02:00
SomberNight
8a56c9eb66 invoices: explain status constants 2021-07-15 01:33:11 +02:00
ThomasV
ea24ab593f Merge pull request #7400 from SomberNight/202107_mac_build_pyc
mac build: don't create __pycache__ folders
2021-07-14 12:08:06 +02:00
ThomasV
ace113358a fix typo (follow-up prev) 2021-07-13 10:21:14 +02:00
ThomasV
0c17b49e2c compare_dmg: compare two files 2021-07-13 10:01:09 +02:00
ghost43
cf7f66e9e6 Merge pull request #7399 from SomberNight/202107_wallet_request_status_event
wallet: fire "request_status" event also when conf number changes
2021-07-12 21:05:09 +02:00
ghost43
7d91e8144a Merge pull request #7395 from MrNaif2018/feat/lightning-cmd-tag
Add lightning tag for commands
2021-07-12 19:41:13 +02:00
SomberNight
d0f0669e8f crash reporter: send traceback for full chain of exceptions
Previously if there was a chain of exceptions, we were only
sending the traceback for the final exception.

E.g.
try:
    raise ExcOne("asdasd")
except ExcOne() as e:
    raise ExcTwo("qweqwe") from e

^ we would lose all info about ExcOne, including potentially many lines of trace
2021-07-12 19:24:58 +02:00
MrNaif2018
299214835f Add lightning tag for commands 2021-07-12 19:16:34 +03:00
ghost43
ee391a4932 Merge pull request #7396 from MrNaif2018/fix/jsonrpc-lockfile-cleanup
Don't cleanup lockfile if listen_jsonrpc is False
2021-07-12 18:12:09 +02:00
SomberNight
659c00e06b mac build: don't create __pycache__ folders
The .pyc files would get created when a .py module is imported,
which is done during the build for some source files by pyinstaller
(when it analyses imports).

I considered setting PYTHONDONTWRITEBYTECODE=1 in build_tools_util.sh,
to apply to all builds, but am not sure how it would affect the Android build,
where we actually want .pyc files included in the apk.
2021-07-12 18:07:31 +02:00
ThomasV
b7cc5f329c osx: add script to compare dmg binaries 2021-07-12 15:58:36 +02:00
SomberNight
d94d443082 wallet: fire "request_status" event also when conf number changes 2021-07-11 16:57:01 +02:00
SomberNight
8945dcda7a qt init: on exc, let crash reporter appear instead of silently dying
related: https://github.com/spesmilo/electrum/issues/7390

```
20210706T091826.513398Z |    ERROR | __main__ | daemon.run_gui errored
Traceback (most recent call last):
  File "run_electrum", line 407, in handle_cmd
  File "electrum\daemon.py", line 584, in run_gui
  File "electrum\gui\qt\__init__.py", line 414, in main
  File "electrum\gui\qt\__init__.py", line 291, in wrapper
  File "electrum\gui\qt\__init__.py", line 316, in start_new_window
  File "electrum\gui\qt\__init__.py", line 361, in _start_wizard_to_select_or_create_wallet
  File "electrum\wallet_db.py", line 73, in __init__
  File "electrum\wallet_db.py", line 106, in load_data
  File "electrum\util.py", line 412, in <lambda>
  File "electrum\util.py", line 408, in do_profile
  File "electrum\wallet_db.py", line 175, in upgrade
  File "electrum\wallet_db.py", line 540, in _convert_version_24
ValueError: too many values to unpack (expected 2)
```
2021-07-07 19:19:43 +02:00
MrNaif2018
c35a46a727 Don't cleanup lockfile is listen_jsonrpc is False 2021-07-07 16:57:09 +03:00
SomberNight
5b627208f1 mac build: build libusb from source
fixes https://github.com/spesmilo/electrum/issues/7393
2021-07-06 19:38:49 +02:00
SomberNight
7236dae94b kivy wizard: add explicit warnings at seed creation 2021-07-05 19:40:02 +02:00
SomberNight
82bfe1ba9c kivy crash reporter: warn users not to share sensitive info
Previously only Qt had the warning.
2021-07-05 18:59:02 +02:00
SomberNight
6a049d9901 wallet: make sure payment requests are persisted
Fixes: after adding a payment request, if the process was killed,
the payreq might get lost. In case of using the GUI, neither the
callee nor the caller called wallet.save_db().

Unclear where wallet.save_db() should be called...
Now each method tries to persist their changes by default,
but as an optimisation, the caller can pass write_to_disk=False
e.g. when calling multiple such methods and then call wallet.save_db() itself.

If we had partial writes, which would either rm the need for wallet.save_db()
or at least make it cheaper, this code might get simpler...

related: https://github.com/spesmilo/electrum/pull/6435
related: https://github.com/spesmilo/electrum/issues/4823
2021-07-05 18:39:10 +02:00
ghost43
f49db86ea8 Merge pull request #7385 from BamaHodl/master
Friendlier minimum sizing for small screens for air-gapped signing
2021-07-05 17:44:20 +02:00
SomberNight
cfdadeda67 qt: some fixes for send/receive tabs when window is small 2021-07-05 17:26:29 +02:00
ThomasV
0b30cf80de macOS builds: remove zip file after notarization 2021-07-03 14:42:53 +02:00
SomberNight
a339338958 LN private route hints: don't include low receive capacity channels
see code comment.

While the balance in the channels might shift before the sender tries to
pay the invoice, as we are not a forwarding node, that seems unlikely to matter.
2021-07-02 19:52:36 +02:00
SomberNight
04bc7fd28f trampoline: fix "pay-to-legacy" workaround when using ACINQ node
It is the last Trampoline Forwarder that should be checked, not the
first one.

Consider route (of Trampolines only):
Alice-electrum -> T_ACINQ -> T_Hodlister -> Bob-electrum
Even if Bob has a transport open with ACINQ or even if Bob has a channel open with ACINQ,
Alice can safely use end-to-end trampoline for this route: ACINQ will not know who
the recipient is, so they will not try to do pay-to-open (and hold up the payment for minutes...).

related: https://github.com/ACINQ/lightning-kmp/pull/237
2021-07-02 19:42:58 +02:00
BamaHodl
ea19b665ff Friendlier minimum sizing for small screens for air-gapped signing functionalities, i.e. main window and transaction dialog 2021-07-02 12:04:41 -05:00
SomberNight
3a7f5373ac trampoline: improve payment success
- better error handling: previously we stopped all attempts on any of
  TRAMPOLINE_EXPIRY_TOO_SOON, UNKNOWN_NEXT_PEER, TEMPORARY_NODE_FAILURE.
  Instead we should retry (but see code comments).
- previously payments failed if ALL of the following criteria applied:
  - sender is paying via trampoline, but not via the ACINQ node (which is
    special cased)
  - receiver only has private channels and has put r_tags into invoice, along
    with setting the trampoline feature bit in the invoice, however the receiver
    is not connected to any trampoline forwarders directly
  The sender would then assume that the private routing hints in the invoice
  correspond to trampoline forwarders.
- also, previously if both the sender and the recipient used trampoline and
  they shared a trampoline forwarder (that they were both connected to), the
  private channels the recipient had (with nodes other than the shared TF)
  would never be attempted.
2021-07-02 18:44:39 +02:00
ghost43
3bc8ef6651 Merge pull request #7365 from SomberNight/202106_qrreader
Qt: new qrreader using QtMultimedia; drop CalinsQRReader(mac)
2021-06-25 17:50:34 +02:00
SomberNight
215734c3de qr scanning: add comments to distinguish qrscanner.py and qrreader/ 2021-06-25 17:40:23 +02:00
SomberNight
013cf869f1 qt: qrreader: keep both old and new toolchain; try to abstract it away 2021-06-25 16:52:02 +02:00
SomberNight
c1dbcab9bb qt: new qrreader using QtMultimedia; drop CalinsQRReader(mac)
This commit ports the work of EchterAgo and cculianu from Electron-Cash,
to implement a new toolchain to scan qr codes.

Previously, on Linux and Win, we have been using zbar to access the camera
and read qrcodes; and on macOS we used CalinsQRReader (an objective-C
project by cculianu).

The new toolchain added here can use QtMultimedia to access the camera,
and then feed that image into zbar. When used this way, zbar needs
fewer dependencies and is easier to compile, in particular it can be
compiled for macOS.

The new toolchain works on all three platforms, with some caveats
(see code comments in related commits) -- so we also keep the end-to-end
zbar toolchain; but at least we can drop CalinsQRReader.

The related changes in Electron-Cash are spread over 50+ commits (several PRs and direct
pushes to master), but see in particular:
https://github.com/Electron-Cash/Electron-Cash/pull/1376

some other interesting links:
b2b737001c
163224cf1f
3b31e0fcb1
eda015908e
https://github.com/Electron-Cash/Electron-Cash/pull/1545
052aa06c23
2021-06-25 16:51:58 +02:00
SomberNight
129d5ba417 qt: (fix) make ScanQRTextEdit inherit Logger
the error handling in `qr_input()`, around line 81,
references `self.logger`, which would raise
2021-06-25 16:50:52 +02:00
SomberNight
bc5ec96387 kivy: scan_qr_non_android: handle user closing window
handle user closing window without scanning a qr code
(i.e. cancelling scan)
2021-06-25 16:44:39 +02:00
SomberNight
f1e77b6e43 build: update zbar to fix build issue with autoconf 2.70
see https://github.com/Electron-Cash/Electron-Cash/pull/2143
see https://github.com/mchehab/zbar/issues/132
2021-06-25 16:44:35 +02:00
ThomasV
4380f68564 contrib/osx/package.sh: fix paths, add link to issue regarding GCC 10.1 2021-06-24 11:45:29 +02:00
ThomasV
a99e0d9e17 build tools: set ZERO_AR_DATE to have deterministic timestamps on macOS 2021-06-23 15:46:45 +02:00
ghost43
b828627dc6 Merge pull request #6917 from andrewkozlik/slip39
SLIP-0039 wallet recovery
2021-06-22 19:44:02 +02:00
SomberNight
60e0cd65cf slip39: follow-ups
- fix kivy wizard restore-from-seed
- qt seed dialog: disable "next share" if current share is invalid
- fix tests: file paths should not depend on $PWD (working dir)
2021-06-22 19:24:16 +02:00
SomberNight
57e52da77f lnaddr: clean-up SEGWIT_HRP vs BOLT11_HRP confusion
With signet, SEGWIT_HRP != BOLT11_HRP, so the previous "currency" string
became a flawed concept. Instead we pass around net objects now.
2021-06-22 16:16:21 +02:00
ghost43
5dff461aaa Merge pull request #7282 from wakiyamap/add_signet
add signet support
2021-06-22 16:15:38 +02:00
SomberNight
e54e6e4e09 build: extend release.sh so that all builders can use it 2021-06-21 19:29:56 +02:00
SomberNight
0e2d147afd windows build: fix build.sh "cp" cmd
was exiting with non-zero error code due to trying to copy directory

```
9cf9cdda331b565dd95b105d3fe987beefa113ac2c594d83783998017ad52d70  dist/electrum-4.1.4-16-g648fac709-portable.exe
020ceacb3a6fc5986d3ec271985c22c8646d2bb534536b8e2ab774924b21d58f  dist/electrum-4.1.4-16-g648fac709-setup.exe
e65dbbe24fe01e8635d4def088667e65d4e9763e2ab74cbc1aec616b3f2834bc  dist/electrum-4.1.4-16-g648fac709.exe
💬 INFO:  Done.
cp: -r not specified; omitting directory '/home/user/wspace/electrum/contrib/build-wine/../../contrib/build-wine/fresh_clone/electrum/contrib/build-wine/dist/electrum'
```
2021-06-21 19:29:52 +02:00
tiagotrs
f9734f5611 rephrasing, removal of revealer website links (#7359)
* rephrasing, removal of website links

* don't open pdf automatically
2021-06-21 17:26:52 +00:00
SomberNight
c3e7516dd5 gitignore: exclude appimage fresh_clone 2021-06-21 17:41:31 +02:00
ThomasV
d520471c8a Merge pull request #7354 from SomberNight/202106_readme
readme: add a "contributing" section, mentioning new irc
2021-06-21 10:26:55 +02:00
ghost43
2aee7721ff Merge pull request #5823 from Chris-777/master
Qt address list: add "funded or unused" filter option
2021-06-19 14:25:15 +00:00
SomberNight
ba8af9310f kivy addresses list: add "funded or unused" filter option
note: "Funded or Unused" shortened to "Funded|Unused" to save horizontal space
2021-06-19 16:19:24 +02:00