Commit graph

3068 commits

Author SHA1 Message Date
ThomasV
6307e13549 do not print the entire payment log again, this is redundant 2020-04-08 09:46:16 +02:00
SomberNight
caefea19dd
trezor pin dialog: only show PIN "strength" when creating/changing
fixes #4832
2020-04-07 18:58:45 +02:00
SomberNight
5259fcb6fd
qt PasswordLineEdit: try to clear password from memory
If an attacker has access to the process' memory, it's probably already game over,
still we can make their life a bit harder.

I really tried but failed to encapsulate this logic inside PasswordLineEdit.
The destroyed signal arrives too late.
deleteLater is not called.
__del__ gets called too late.
2020-04-07 18:58:42 +02:00
SomberNight
c798e5d9a1
qt: introduce PasswordLineEdit(QLineEdit) 2020-04-07 18:58:37 +02:00
ghost43
4d980cd4bd
Merge pull request #6064 from matejcik/trezor-0.12-passphrase
trezor: bump lib version, implement new passphrase-on-device UI
2020-04-06 17:53:59 +00:00
SomberNight
fb5382f75f
follow-up prev (typo) 2020-04-06 19:49:56 +02:00
ThomasV
d2a58a2ec3 lnpeer: do not assume our privkey is the same as lnworker's privkey. 2020-04-06 19:06:27 +02:00
ThomasV
55d0a9587e move maybe_save_short_chan_id to lnchannel 2020-04-06 18:35:12 +02:00
ThomasV
f3995350e8 localconfig: rename seed to channel_seed 2020-04-06 16:53:48 +02:00
SomberNight
08bc8617ad
change derivation of ln channel keys: use hardened paths 2020-04-06 12:53:57 +02:00
ThomasV
0ea21c59d2 Save channel seed in localconfig 2020-04-04 13:28:19 +02:00
SomberNight
1dc3100ba3
android build: use "cryptography" instead of "pycryptodomex" fork
Electrum needs either "cryptography" or "pycrytodomex" (since #6014).
Previously we have been using a custom fork (of ours) of pycryptodomex,
now let's just use upstream "cryptography".
2020-04-04 01:43:00 +02:00
SomberNight
f777c9ee13
android build: update buildozer/p4a/NDK
- updated p4a pulls in newer openssl (old one is no longer available from openssl.org)
- old NDK no longer available (new one is what updated p4a recommends)
2020-04-04 01:42:57 +02:00
SomberNight
f412420892
include lnwire csv files in binaries (follow-up #6050) 2020-04-04 01:40:05 +02:00
SomberNight
f13f46c555
qt wizard: make "GoBack" unroll the call stack to avoid stack overflow
fixes #6069
2020-04-03 18:58:51 +02:00
ThomasV
aa32e31a3d follow-up previous commit 2020-04-03 18:54:02 +02:00
ThomasV
06dfe1699c LNWatcher: Distinguish between blockchain-triggered channel state
transitions, and actions taken as a result.
- state transitions are performed in lnchannel.update_onchain_state()
- peer actions are in LNWorker.on_channel_update()
2020-04-03 17:34:11 +02:00
ThomasV
9ca445bd5d save_short_chan_id: remove unneeded ćalls to lnwatcher 2020-04-03 12:59:56 +02:00
ThomasV
c8f602c9d7 pw_decode, pw_encode: separate bytes functions 2020-04-03 12:29:55 +02:00
ThomasV
764c18b3c8 follow-up prev commit 2020-04-02 17:36:18 +02:00
ThomasV
5067166e1e move should_channel_be_closed_due_to_expiring_htlcs into Channel class 2020-04-02 17:18:50 +02:00
SomberNight
1cdff09ead
follow-up 371f55a0f9 2020-04-02 14:39:01 +02:00
SomberNight
eecdd056b3
lnmsg: small speed-up: read first, check length after
this saves around ~13% wall clock time in ChannelDB.load_data
2020-04-01 21:49:23 +02:00
SomberNight
71635216df
ln feature bits: validate transitive feature deps everywhere 2020-04-01 21:49:19 +02:00
SomberNight
94e3c078f8
lnaddr: small clean-up 2020-04-01 21:49:16 +02:00
SomberNight
1be0a710c3
ln: implement option payment_secret 2020-04-01 21:49:12 +02:00
SomberNight
d424487814
lnpeer: better error handling when processing onion packets 2020-04-01 21:47:45 +02:00
SomberNight
30bf32b34b
use option varonion: actually use TLV payloads, and signal support 2020-04-01 21:47:42 +02:00
SomberNight
4b78bf94d4
lnaddr: add feature bit support to invoices
see https://github.com/lightningnetwork/lightning-rfc/pull/656
2020-04-01 21:42:52 +02:00
SomberNight
a66437f399
lnonion: implement basis of varonion support 2020-04-01 21:42:48 +02:00
SomberNight
6ba08cc8d4
ln feature bits: flatten namespaces, and impl feature deps and ctxs
This implements:
- flat feature bits https://github.com/lightningnetwork/lightning-rfc/pull/666
- feature bit dependencies https://github.com/lightningnetwork/lightning-rfc/pull/719
2020-04-01 21:41:24 +02:00
SomberNight
c69937395e
lnmsg: add more tests (for encode_msg, decode_msg) 2020-04-01 21:40:13 +02:00
SomberNight
71a4302ec0
lnpeer: send and handle "networks" param in "init" msg 2020-04-01 21:40:09 +02:00
SomberNight
85d7a13360
lnmsg: implement tests from BOLT-01 2020-04-01 21:40:06 +02:00
SomberNight
f353e6d55c
lnmsg: encode/decode TLVs as part of messages 2020-04-01 21:40:03 +02:00
SomberNight
542e33fd86
lnmsg: handle "..." as field count 2020-04-01 21:39:59 +02:00
SomberNight
6949752263
lnmsg: initial TLV implementation 2020-04-01 21:39:56 +02:00
SomberNight
3a73f6ee5c
lnmsg.decode_msg: dict values for numbers are int, instead of BE bytes
Will be useful for TLVs where it makes sense to do the conversion in lnmsg,
as it might be more complicated than just int.from_bytes().
2020-04-01 21:39:52 +02:00
SomberNight
4c10a830f3
lnmsg: rewrite LN msg encoding/decoding 2020-04-01 21:39:48 +02:00
SomberNight
371f55a0f9
hww: fix some threading issues in wizard
fixes #3377
related: #6064  (passphrase dialog not rendered correctly)
2020-04-01 21:09:17 +02:00
SomberNight
81fc3fcce2
hww: rm some code duplication: add "scan_and_create_client_for_device" 2020-04-01 21:09:14 +02:00
SomberNight
18c98483ac
wizard: (trivial) add some type hints 2020-04-01 21:09:10 +02:00
SomberNight
e6d43b60fa
qt hww show_settings_dialog: don't scan devices in GUI thread
Just makes sense in general.
Also, previously, the GUI would freeze if right after startup the user
clicked the hww status bar icon (especially with multiple hww connected).
2020-04-01 21:09:06 +02:00
SomberNight
276631fab7
digitalbitbox: (trivial) user handler instead of handler.win 2020-04-01 21:09:03 +02:00
SomberNight
7f1c7955dc
DeviceMgr: clean-up locks a bit 2020-04-01 21:09:00 +02:00
SomberNight
c0b170acb7
hww wizard: better handle UserFacingException in one case
E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 340, in on_device
    self.plugin.setup_device(device_info, self, purpose)
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 719, in setup_device
    client.get_xpub("m/44'/0'", 'standard')
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 120, in get_xpub
    reply = self._get_xpub(bip32_path)
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 114, in _get_xpub
    if self.check_device_dialog():
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 223, in check_device_dialog
    self.recover_or_erase_dialog() # Already seeded
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 244, in recover_or_erase_dialog
    if not self.dbb_load_backup():
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 340, in dbb_load_backup
    raise UserFacingException(backups['error']['message'])
electrum.util.UserFacingException: Please insert SD card.
2020-04-01 21:08:56 +02:00
SomberNight
e68b6447cc
hww: catch exceptions when user clicks on hww qt status bar icon
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 167, in perform_hw1_preflight
    firmwareInfo = self.dongleObject.getFirmwareVersion()
  File "...\Python38\site-packages\btchip\btchip.py", line 561, in getFirmwareVersion
    response = self.dongle.exchange(bytearray(apdu))
  File "...\Python38\site-packages\btchip\btchipComm.py", line 127, in exchange
    raise BTChipException("Invalid status %04x" % sw, sw)
btchip.btchipException.BTChipException: Exception : Invalid status 6faa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 120, in onPress
    self.func()
  File "...\electrum\electrum\plugins\hw_wallet\qt.py", line 260, in show_settings_dialog
    device_id = self.choose_device(window, keystore)
  File "...\electrum\electrum\plugins\hw_wallet\qt.py", line 253, in choose_device
    info = self.device_manager().select_device(self, keystore.handler, keystore)
  File "...\electrum\electrum\plugin.py", line 554, in select_device
    infos = self.unpaired_device_infos(handler, plugin, devices)
  File "...\electrum\electrum\plugin.py", line 545, in unpaired_device_infos
    soft_device_id=client.get_soft_device_id()))
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 88, in get_soft_device_id
    self._soft_device_id = self.request_root_fingerprint_from_device()
  File "...\electrum\electrum\plugins\hw_wallet\plugin.py", line 197, in request_root_fingerprint_from_device
    child_of_root_xpub = self.get_xpub("m/0'", xtype='standard')
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 55, in catch_exception
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 103, in get_xpub
    self.checkDevice()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 210, in checkDevice
    self.perform_hw1_preflight()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 198, in perform_hw1_preflight
    raise UserFacingException("Dongle is temporarily locked - please unplug it and replug it again")
electrum.util.UserFacingException: Dongle is temporarily locked - please unplug it and replug it again
2020-04-01 21:08:50 +02:00
SomberNight
2d3c2eeea9
keystore: add workaround for StoredDict issue #6066
note: not a proper fix... but works for now
2020-04-01 13:33:38 +02:00
SomberNight
e53ce5dee0
(trivial) follow-up 570f7b7790 2020-03-31 18:57:03 +02:00
SomberNight
18d245ad5c
hw wallets: during wallet creation, make sure to save correct label
When initialising a Trezor as part of the wallet creation,
device_info.label is still the old (None) label in on_hw_derivation.
This is because device_info was created during the initial scan.

related: #6063
2020-03-31 15:56:54 +02:00