Commit graph

12939 commits

Author SHA1 Message Date
SomberNight
9204102663
binaries: pip install build requirements first
I no longer trust pip to install packages from a requirements.txt file in the correct order.
For reproducibility, let's install pip/setuptools/wheels/cython first.

see https://github.com/pypa/pip/issues/2362#issuecomment-418423458
see #5859 and #6382
2020-09-08 16:44:35 +02:00
SomberNight
829f7c7443
rerun freeze_packages 2020-09-08 16:44:31 +02:00
SomberNight
cb2f92f710
windows binaries: update pyinstaller to 4.0 2020-09-08 16:44:28 +02:00
SomberNight
4f46741c52
binaries: bump python version (3.7.7->3.7.9) 2020-09-08 16:44:24 +02:00
SomberNight
7e534f4865
dependencies: rm pyaes from requirements
Since #6014, pyaes is not really needed anymore.

As we currently require either one of pycryptodomex or cryptography,
even if pyaes is available, it will not be used.
We could strip it out completely from crypto.py...

In any case, pyaes is still pulled in by some hw wallet dependencies indirectly;
but the core library no longer depends on it.
2020-09-08 16:44:20 +02:00
SomberNight
1cc8c2c055
binaries: bundle 'cryptography' instead of 'pycryptodomex' in binaries
related: #6538

(this allows testing the binaries; to consider whether we can drop pycryptodomex)
2020-09-08 16:43:46 +02:00
SomberNight
53a5a21ee8
hardware: update device conn. status faster (through GUI indicator)
Qt status bar icon will now refresh to reflect disconnected device
during next scan
2020-09-07 17:16:06 +02:00
SomberNight
9bba65199e
Qt QR code: when saving QR code as image file, don't include stretch
The stretch to the right of the QR was included in the image previously.
This resolves the FIXME.
2020-09-06 17:55:11 +02:00
SomberNight
2d739981c2
lnhtlc: fix prev: too much copy-paste 2020-09-05 17:49:02 +02:00
SomberNight
aba2e0f55a
lnhtlc: add all_htlcs_ever, get_htlc_by_id, was_htlc_failed and use them
towards encapsulation of hm.log
2020-09-04 19:29:14 +02:00
SomberNight
51f42a25f9
lnhtlc: add lock to make methods thread-safe
many methods are accessed from both the asyncio thread and the GUI thread

fixes #6373
2020-09-04 19:29:11 +02:00
SomberNight
a7199696d3
json_db: exempt keystore from StoredDict conversion
The keystore logic would need to be significantly changed to nicely
interoperate with StoredDict/json_db logic.
(just see KeyStore.__init__() and KeyStore.dump())
For now we exempt the keystore from the recursive StoredDict conversion, as
it is a smaller change that is also easier to review for correctness.

fixes #6066
fixes #6401

also reverts 2d3c2eeea9 (which was an even hackier workaround for #6066)
2020-09-04 16:11:01 +02:00
SomberNight
8dc3fadd13
tests: add tests for #6066 and #6401. latter is failing atm.
see #6066
see #6401
2020-09-03 18:04:27 +02:00
ThomasV
5f7d8cc462 reverse swap: check that received amount is higher than dust threshold 2020-09-03 16:40:11 +02:00
ThomasV
6d67e77136
Merge pull request #6552 from verretor/console-constructs
Fix handling of constructs in console
2020-09-03 14:26:36 +02:00
Benoit Verret
9e35f1f8ac Fix handling of constructs in console
- Replace "...." by "... " in multiline constructs.
- Execute constructs after one empty line and not two or three. It
  was more or less random before.
2020-09-03 06:39:57 -04:00
MrNaif2018
ba649fa8ab
Added for_broadcast argument to payto/paytomany (#6532)
The payto command now takes a flag "addtransaction" whether the returned transaction should be added to the wallet history.
Previously payto did not have a side-effect, and as the flag is opt-in, that will stay the default.

closes #6529
2020-09-01 19:25:36 +00:00
Johannes Zweng
2c7da6afde
add missing wallet.save_db() after adding or rm'ing payment requests (#6435) 2020-09-01 17:24:51 +00:00
SomberNight
c9bf1d4c80
scripts: add script to showcase bruteforcing wallet file password 2020-09-01 18:15:37 +02:00
SomberNight
f265acd234
DeviceMgr.scan_devices: do all scanning on hidapi thread
e.g. the trezor custom enumerate function calls hid.enumerate() which is not thread safe (?).
see comment on line 330
2020-08-31 22:17:44 +02:00
SomberNight
6d86f4dc18
wallet set_tx_label_based_on_invoices: don't overwrite custom label
related: #6545
2020-08-31 22:00:52 +02:00
SomberNight
55eb62bb90
wallet.get_relevant_invoice_keys_for_tx: take lock in callee not caller 2020-08-31 21:58:47 +02:00
SomberNight
6b4edc650a
qt history: fixes for tx context-menu "View invoice" if more than one
fixes #6516

coalesce "View invoice" options into submenu if there are multiple;
also make sure lambda uses bound argument
2020-08-31 20:55:14 +02:00
SomberNight
72950bf379
sdist: bundle make_libsecp256k1.sh in tar.gz
closes #6323
2020-08-30 18:49:18 +02:00
SomberNight
f36cc5b6e0
trezor: cache whether TrezorBridge is available to speedup scan_devices
If the Bridge is unavailable, on my machine it takes 2 seconds to timeout.
i.e. call_bridge("enumerate") and BridgeTransport.enumerate() both take 2 seconds each.
With this change, if the Bridge is unavailable, DeviceMgr.scan_devices() takes 4 seconds less.
In below log, with 6 different hw devices connected, scan time was originally ~7.5 seconds;
with this change it became ~3.5 seconds.

Now the time is dominated by WebUsbTransport.enumerate(), called by Trezor,
KeepKey, SafeT, ~1.1 seconds each.

-----

I | plugin.DeviceMgr | scan_devices() entered. 1598666278.6756
I | plugin.DeviceMgr | scan_devices(). _scan_devices_with_hid() DONE. 1598666278.7583
I | plugin.DeviceMgr | scan_devices(). starting custom enumeration loop. 1598666278.7593
I | plugin.DeviceMgr | scan_devices(). custom enumeration iter DONE, for <bound method SafeTPlugin.enumerate of <electrum.plugins.safe_t.qt.Plugin object at 0x000001F60060A730>>. 1598666279.9345
I | plugins.trezor.qt.Plugin | trezor custom enumeration entered. 1598666279.9345
I | plugins.trezor.qt.Plugin | trezor custom enumeration. call_bridge('enumerate') DONE. 1598666281.9385
>> trezorlib enumerating <class 'trezorlib.transport.bridge.BridgeTransport'> DONE at 1598666283.9500.
>> trezorlib enumerating <class 'trezorlib.transport.webusb.WebUsbTransport'> DONE at 1598666285.0427.
>> trezorlib enumerating <class 'trezorlib.transport.hid.HidTransport'> DONE at 1598666285.1198.
>> trezorlib enumerating <class 'trezorlib.transport.udp.UdpTransport'> DONE at 1598666285.1237.
I | plugins.trezor.qt.Plugin | trezor custom enumeration. trezorlib.transport.enumerate_devices() DONE. 1598666285.1257
I | plugin.DeviceMgr | scan_devices(). custom enumeration iter DONE, for <bound method TrezorPlugin.enumerate of <electrum.plugins.trezor.qt.Plugin object at 0x000001F60C16F4C0>>. 1598666285.1257
I | plugin.DeviceMgr | scan_devices(). custom enumeration iter DONE, for <bound method KeepKeyPlugin.enumerate of <electrum.plugins.keepkey.qt.Plugin object at 0x000001F60BADF130>>. 1598666286.2251
I | plugin.DeviceMgr | scan_devices(). custom enumeration iter DONE, for <bound method ColdcardPlugin.detect_simulator of <electrum.plugins.coldcard.qt.Plugin object at 0x000001F60BAA5AC0>>. 1598666286.2251
I | plugin.DeviceMgr | scan_devices(). custom enumeration loop DONE. 1598666286.2251
I | plugin.DeviceMgr | scan_devices(). find out what was disconnected DONE. 1598666286.2251
I | plugin.DeviceMgr | scan_devices(). Unpair disconnected devices DONE. 1598666286.2251
2020-08-29 04:22:55 +02:00
SomberNight
c313c702fd
qt wallet>info: use QStackedWidget, one stack item for each keystore
Instead of single mpk_text widget for each ks and changing the contents
when switching, create an mpk_text widget for each ks and switch between those.
This allows putting the "show xpub on device" button inside mpk_text.
2020-08-28 20:10:58 +02:00
SomberNight
5215582b83
qt wallet>info: show derivation path prefix for keystore
closes #4700
2020-08-28 18:22:26 +02:00
SomberNight
64a94e9522
Qt Receive tab: hide "receive_tabs" widget when empty 2020-08-27 19:54:30 +02:00
SomberNight
5d723401f8
util.NetworkRetryManager: fix potential overflow
e.g. consider:
>>> 1.5 * 2 ** 2000
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float
2020-08-27 17:57:19 +02:00
ThomasV
fdaf6e775c
Merge pull request #6489 from verretor/console-remove-methods
Remove unused methods from Console
2020-08-27 10:00:35 +02:00
ThomasV
5313438140 fix display of Zpub in Kivy during multisig wallet creation (see #6456) 2020-08-26 20:26:59 +02:00
SomberNight
13fe8e466d
transaction: simply PartialTransaction constructor
rm footgun (see prev commit)
2020-08-26 19:55:05 +02:00
SomberNight
54d2fa0e7d
commands: fix signtransaction cmd
fixes #6502
2020-08-26 19:48:35 +02:00
ThomasV
b7c2820951 Qt: add Key_Enter wherever Key_Return is used 2020-08-26 19:37:52 +02:00
ThomasV
6cfe822caf
Merge pull request #6522 from wakiyamap/change_sourceforge_url
Change sourceforge URL
2020-08-26 17:58:33 +02:00
SomberNight
4acf884790
blockchain.py: maybe fix rare deadlock
Saw a deadlock near a swap_with_parent(), could not reproduce.
get_branch_size() and get_parent_heights() could have been the culprits as
they take locks in differing orders and are called from gui/network threads.
2020-08-25 20:29:08 +02:00
SomberNight
36178df875
sql: test read-write permissions for given path and raise early
maybe fix #6485
2020-08-25 18:18:07 +02:00
SomberNight
6802bcb960
windows dns hack: fix #6473 2020-08-25 16:57:10 +02:00
matejcik
a669c6b765
trezor: use init_device instead of ping to check connection (fixes #6457) (#6471) 2020-08-25 14:34:42 +00:00
SomberNight
42da407ee1
scripts: update quick_start.py to work with 4.0.x internals
fixes #6453
2020-08-25 16:22:59 +02:00
SomberNight
c64da9448f
wallet: get_full_history should populate acq_price/cap_gains if enabled
fixes #6370

qt history tab is calling get_full_history; so this is needed to populate cap_gains columns
2020-08-24 18:17:05 +02:00
ghost43
928e43fc53
Merge pull request #6219 from lukechilds/bip39-recovery
Automated BIP39 Recovery

see: #6155
2020-08-20 17:27:01 +00:00
SomberNight
df82d9c017
bip39 scan: follow-up prev
- use logger
- allow qt dialog to be GC-ed
- (trivial) add typing; minor formatting
2020-08-20 18:58:52 +02:00
Luke Childs
7b122d2679
Automated BIP39 Recovery, squashed 2020-08-20 17:50:39 +02:00
ghost43
ad7588ec57
Merge pull request #6517 from aaronisme/master
fix the coldcard multi-sig show address issue
2020-08-20 14:23:49 +00:00
wakiyamap
a48c94533f Change sourceforge URL 2020-08-19 16:22:15 +09:00
aaronisme
3ed5f32c6c fix the coldcard multi-sig show address issue 2020-08-18 15:42:39 +08:00
Benoit Verret
4b76541d4c Remove unused methods from Console
set_history(), get_history() and register_command() were never used.
2020-08-07 07:55:19 -04:00
ThomasV
9b416b577e
Merge pull request #6467 from verretor/console-startup-message
Remove empty startup message from console
2020-08-03 12:03:30 +02:00
Benoit Verret
822083d168 Remove empty startup message from console
Change >> to >>> as in a normal Python console.
Avoid printing an empty string which is why the console looked like:
>>
Network banner
>>

Instead of:
Network banner
>>>
2020-08-03 05:21:30 -04:00