SomberNight
931d961721
lnpeer/lnwatcher: include channel id in log lines
2020-02-24 16:32:18 +01:00
SomberNight
3966b51a94
fix undefined name 'CHANNEL_INIT_TIMEOUT'
2020-02-24 15:12:27 +01:00
SomberNight
a78583e5d4
travis: fix regtest
2020-02-24 14:52:19 +01:00
ThomasV
8ff1921c0d
(minor) fix log
2020-02-24 13:23:11 +01:00
ThomasV
7908f4b203
follow-up previous commit
2020-02-24 13:02:11 +01:00
ThomasV
5785c2fa2f
Fix #5975 : Forget or redeem channels that are never funded.
...
- initiator: wait until double spent
- non-initiator: wait until timeout
2020-02-24 12:45:10 +01:00
ThomasV
ed29a45d50
Qt: disable preview button in open_channel
2020-02-24 12:29:56 +01:00
ThomasV
20d8da7e24
db upgrade: store channel tx height and timestamps in 'channels'
2020-02-24 10:07:55 +01:00
ThomasV
e8ee4250d9
Do not save new channels before they are added to lnworker
2020-02-24 09:44:35 +01:00
SomberNight
8d02c2027c
travis: use more recent Ubuntu, get libsecp from Ubuntu apt (rm ppa)
2020-02-23 21:39:28 +01:00
SomberNight
84797f90d0
qt request_list: clear receive addr/req when hiding list
2020-02-23 21:23:56 +01:00
SomberNight
4c2e1970f2
qt receive tab: better "Clear" behaviour
...
Previously, the selection would not get cleared, and if the user clicked
again on the already selected item, the click would get ignored
(request would not get populated).
2020-02-23 21:18:46 +01:00
ThomasV
947211fe4e
follow-up 54ef6db762: set channel state to OPENING if funding tx was broadcast later (e.g. cold storage)
2020-02-23 20:43:23 +01:00
SomberNight
36629f0957
cosigner_pool plugin: don't show button in tx dialog before finalizing
...
(previously button would be shown for a watch-only multisig wallet)
2020-02-23 20:38:57 +01:00
SomberNight
45a309ff25
qt channels_list: early exit if lightning is disabled
...
(note: signal is coming from a different wallet/window)
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\channels_list.py", line 142, in do_update_single_row
self.update_can_send(self.parent.wallet.lnworker)
File "...\electrum\electrum\gui\qt\channels_list.py", line 164, in update_can_send
msg = _('Can send') + ' ' + self.parent.format_amount(lnworker.can_send())\
AttributeError: 'NoneType' object has no attribute 'can_send'
2020-02-23 20:30:14 +01:00
SomberNight
614a38ae5c
qt coin control status bar: don't defer 'Coins' tab updates
...
otherwise the cc sb only gets updated if tab when that tab is visible
2020-02-23 20:20:00 +01:00
SomberNight
cc5624fb20
don't raise BaseException
2020-02-23 19:55:09 +01:00
SomberNight
2409782975
qt open channel: early return if fields are left empty
...
closes #5934
2020-02-23 19:53:41 +01:00
ThomasV
ac884eb3c3
lnpeer: Use a single queue per channel for messages that are ordered.
...
Forward error messages with 'temporary_channel_id' to the correct channel_id
2020-02-23 18:06:47 +01:00
ThomasV
28c5825f41
follow-up previous commit
2020-02-23 17:56:01 +01:00
ThomasV
54ef6db762
do not try to reestablish channels in PREOPENING state (per BOLT2).
2020-02-23 14:54:04 +01:00
ThomasV
8730fa3f75
return preimage in lnpay. fixes #5794
2020-02-23 12:40:40 +01:00
ThomasV
67d0e780b3
remove double definition of lightning_history. fixes #5984
2020-02-23 11:59:34 +01:00
ThomasV
9616333b39
add_future_tx should return success
2020-02-22 17:20:05 +01:00
ThomasV
64a8de8bae
Qt: show amounts sent to channels in show_transaction
2020-02-22 16:02:02 +01:00
ThomasV
d319680d16
lnpeer: do not dump exceptions raised in initialize
2020-02-22 16:00:38 +01:00
ThomasV
874efc125d
(minor) trigger 'wallet_updated' callback when adding future tx
2020-02-22 12:59:48 +01:00
ThomasV
7771daf94e
qt: add menu item to view closing transaction of channel
2020-02-22 12:28:07 +01:00
ThomasV
b12c913d47
do not show channel balances if channel is closed
2020-02-22 12:10:41 +01:00
ThomasV
4e73318fad
Qt: ask confirmation before closing channel.
2020-02-22 10:40:39 +01:00
ThomasV
938d918e55
sweep_ctx: do not log if channel was not force closed
2020-02-22 09:27:34 +01:00
ThomasV
3264d19c6b
Qt open channel dialog: suggest and clear buttons
2020-02-22 09:25:12 +01:00
ThomasV
fa62d03c2a
require option static_remotekey in lnwallet
2020-02-22 09:04:42 +01:00
ThomasV
bda23ef73d
Use a Future for lnpeer.initialized, so that exceptions are passed to the GUI
2020-02-22 09:04:24 +01:00
SomberNight
56cb45df70
android build: fix accepting licenses
2020-02-21 20:08:32 +01:00
SomberNight
1ac3a66d49
win binaries: bump python version (3.6.8->3.7.6)
...
finally possible, after bb94712a14
2020-02-21 19:02:38 +01:00
SomberNight
7e3d50a641
README: rm "Compile the protobuf description file" section
...
The generated file "paymentrequest_pb2.py" is already committed into the repository,
so users don't need to run this command.
Further, the command itself is preserved in "paymentrequest.py"
(it gets printed if we cannot find the generated file).
2020-02-21 18:50:52 +01:00
SomberNight
7f8d667e85
Revert "qt/hww: temporarily bundle our own version of safetlib.qt.pinmatrix"
...
This reverts commit 7f3de8241c .
(can finally undo this due to bb94712a14 )
2020-02-21 18:32:58 +01:00
ThomasV
a1b8c8e54e
add comment about minor issue with closing_signed
2020-02-21 18:30:59 +01:00
SomberNight
bb94712a14
requirements: bump min archos safet version
...
related: #5968
2020-02-21 18:23:33 +01:00
ThomasV
1b586faec9
disable peer filtering in lnworker
2020-02-21 17:41:20 +01:00
ThomasV
3329d9dd0e
lnwatcher: fix keep_watching if the wallet was not force-closed
2020-02-21 16:35:27 +01:00
SomberNight
d8a992e400
libsecp: log exception if failed to load
2020-02-21 15:59:18 +01:00
ThomasV
6e5abc049b
follow-up previous commit (backward compatibility)
2020-02-21 15:33:15 +01:00
ThomasV
55e0e1a72e
Generate channel keys from random seed
2020-02-21 12:38:12 +01:00
ThomasV
c2432aa125
kivy: set pin_code timeout to 5 minutes
2020-02-21 11:33:07 +01:00
ThomasV
86d1e50469
select peers with desired features before connecting
2020-02-21 10:57:13 +01:00
ThomasV
a96aa68a4c
lnpeer:
...
- print parent classname in diagnostic name,
- fix error message when requested feature is not supported
2020-02-21 09:48:36 +01:00
ThomasV
570167a2c4
restrict lightning to p2wpkh wallets
2020-02-20 21:17:25 +01:00
ThomasV
2255b07157
support option_static_remotekey
2020-02-20 21:02:01 +01:00
ThomasV
47d14c579b
minor fix: can_send, can_receive
2020-02-20 21:01:42 +01:00
ThomasV
9a462ac9b5
trustedcoin: fix wallet constructor
2020-02-20 20:59:18 +01:00
ThomasV
704c3ae07f
do not allow channel creation from backup file
2020-02-20 19:09:05 +01:00
ThomasV
9d0a862a43
revert prrevious commit (used in tests)
2020-02-20 11:26:19 +01:00
ThomasV
9680e7836c
remove ChannelDB.add_channel_update (no longer needed after 46d8080c76)
2020-02-20 11:20:05 +01:00
ThomasV
9451ca9568
move list_channels to commands.py
2020-02-20 10:30:30 +01:00
ThomasV
238fb46d87
Lightning: Show sending and receiving capacity. Fixes #5967
2020-02-19 16:11:55 +01:00
SomberNight
3d42fca86e
daemon.run_gui: make sure to exit process on exception
...
previously, if GUI-related imports raised, the GUI would not start
but the process would not exit (e.g. asyncio event loop would go on)
Traceback (most recent call last):
File "...\electrum\electrum\daemon.py", line 517, in run_gui
gui = __import__('electrum.gui.' + gui_name, fromlist=['electrum'])
File "...\electrum\electrum\gui\qt\__init__.py", line 39, in <module>
from PyQt5.QtGui import QGuiApplication
ImportError: DLL load failed while importing QtGui: The specified module could not be found.
2020-02-19 15:45:36 +01:00
ThomasV
300888f21c
fix path for payserver static files
2020-02-19 11:47:43 +01:00
ThomasV
317d405432
follow-up previous commit
2020-02-19 11:39:52 +01:00
ThomasV
cc6e461d3e
storage upgrade for invoices and requests. fixes #5959
2020-02-19 11:26:03 +01:00
ThomasV
21fffeb7ad
do not store 'outputs' field in requests (it is unused)
2020-02-19 11:24:44 +01:00
SomberNight
9c5e49f432
ecc.ECPubkey: also accept bytearray in __init__
...
regression since #5947
Traceback (most recent call last):
File "...\electrum\electrum\base_wizard.py", line 339, in on_device
self.plugin.setup_device(device_info, self, purpose)
File "...\electrum\electrum\plugins\ledger\ledger.py", line 598, in setup_device
client.get_xpub("m/44'/0'", 'standard') # TODO replace by direct derivation once Nano S > 1.1
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 124, in get_xpub
eckey=ecc.ECPubkey(publicKey),
File "...\electrum\electrum\ecc.py", line 145, in __init__
self._x, self._y = _x_and_y_from_pubkey_bytes(b)
File "...\electrum\electrum\ecc.py", line 119, in _x_and_y_from_pubkey_bytes
ret = _libsecp256k1.secp256k1_ec_pubkey_parse(
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type
2020-02-19 00:40:33 +01:00
SomberNight
0845300150
qt InstallWizard: turn some instance variables to locals
2020-02-18 21:12:46 +01:00
ThomasV
fe4ca4c466
follow-up previous commit
2020-02-18 20:06:35 +01:00
ThomasV
c9e39d3a79
remove channel from channel_timestamps if funding_tx has been dropped from mempool
2020-02-18 18:04:23 +01:00
ThomasV
e05cd2006a
fix get_payments
2020-02-18 17:40:13 +01:00
SomberNight
d1fc4399e6
lnwatcher: use is_mine(addr) instead of (addr in get_addresses())
...
small performance gain
2020-02-18 17:16:46 +01:00
ThomasV
72f4e83333
fix race in check_onchain_situation
2020-02-18 17:06:54 +01:00
ThomasV
b90cbeb0ba
fix flake8 test
2020-02-18 14:05:28 +01:00
ThomasV
6696f40e36
follow-up previous commit: show onchain tx dialog for channel open/close transactions
2020-02-18 13:58:17 +01:00
ThomasV
feb47b0a6f
Add lightning tx dialog (qt and kivy)
2020-02-18 13:02:18 +01:00
ThomasV
b3a3267ede
follow-up a6302b3a12
2020-02-18 12:39:18 +01:00
SomberNight
46d8080c76
ln gossip: don't put own channels into db; always pass them to fn calls
...
Previously we would put fake chan announcement and fake outgoing chan upd
for own channels into db (to make path finding work). See Peer.add_own_channel().
Now, instead of above, we pass a "my_channels" param to the relevant ChannelDB methods.
2020-02-17 20:38:41 +01:00
SomberNight
7d65fe1ba3
Qt ChannelsList: cosmetics (set font, enable sorting)
2020-02-17 19:45:27 +01:00
SomberNight
b50c47c5ce
qt exc reporter: add FIXME re HTML tags in traceback
2020-02-17 19:44:12 +01:00
SomberNight
16626a3386
lnutil.split_host_port: fix for IPv6 connection string
2020-02-17 19:43:21 +01:00
SomberNight
0723355a0f
util.Satoshis: note that sometimes this actually has 'msat' precision
2020-02-17 16:52:25 +01:00
SomberNight
a6302b3a12
fix wallet history order: incl both on-chain and LN, sorted by time
...
GUIs now respect order of wallet.get_full_history(), which is probably the sane
thing to do, given that is the order the "balance" column is calculated in.
fixes #5958
2020-02-17 16:33:54 +01:00
ThomasV
0869e09275
Qt: fix balance column
2020-02-17 14:55:10 +01:00
ThomasV
4dc74870e1
Catch exceptions raised in LNWorker._pay_to_route
...
Reset payment status if an exception is caught.
Also, do not pass status to the 'invoice_status' network callback.
This fixes #5869 , #5870 , #5964 .
2020-02-17 12:33:43 +01:00
ThomasV
472c0defee
fix lnchannel.get_payments: unsettled htlcs may have overwritten the returned results.
2020-02-17 12:19:18 +01:00
ThomasV
6e6e829ef7
breach remedy: get spender transaction from LNWatcher's db
2020-02-17 09:19:23 +01:00
ThomasV
098af02789
kivy: pass message to password_dialog (follow-up d9172ade71)
2020-02-17 09:16:29 +01:00
ThomasV
58a0a9b160
kivy send screen: always show field separators. fix on_clear.
2020-02-16 23:48:23 +01:00
ThomasV
eb28f57051
(minor) kivy: initialize invoice_popup
2020-02-16 19:32:18 +01:00
ThomasV
938fab86d1
detect redeemed channels ( fix #5963 )
2020-02-16 19:07:20 +01:00
ThomasV
f8da0f87a7
follow-up previous commit
2020-02-16 14:45:04 +01:00
ThomasV
3a35f90aa0
Do not use network callback to update channel states; call LNWorker methods directly instead.
...
A callback was used because a single LNWnwatcher object used to be shared for all wallets.
Since wallet now have their own LNWatcher instance, this can be simplified.
2020-02-16 14:26:18 +01:00
ThomasV
36f32651cc
Define network.try_broadcasting() method.
...
Use it when rebroadcasting a force-close tx,
because the channel state is already set.
2020-02-16 12:59:09 +01:00
ThomasV
dba6cb8a96
lnwatcher: use height == TX_HEIGHT_LOCAL to determine channel onchain state
2020-02-16 12:57:25 +01:00
ThomasV
e7c02f1935
switch menus: status <-> wallets
2020-02-15 18:36:55 +01:00
ThomasV
bb739f4de9
Merge pull request #5951 from spesmilo/ln_backups
...
save wallet backups on channel creation
2020-02-15 17:31:14 +01:00
ThomasV
5ae6e43323
message formatting
2020-02-15 17:27:33 +01:00
ThomasV
e3ccfe6449
kivy: make backups optional
2020-02-15 17:26:03 +01:00
ThomasV
d9172ade71
kivy: use password + pin_code
...
- password is per wallet, is retained in memory
- pin code is saved in config
2020-02-15 17:09:09 +01:00
SomberNight
497d6019e1
kivy/android: ask for STORAGE permission at runtime
2020-02-15 16:28:15 +01:00
ThomasV
d5dc8d1ab2
kivy: save pin code in memory
2020-02-15 16:28:15 +01:00
ThomasV
2dad87cbb4
Automate backups:
...
- backup wallet file on each channel creation
- on android, a backup password is entered in settings
- on desktop, the backup path is in settings
2020-02-15 16:28:15 +01:00
ThomasV
cee8607218
save_backup: use db.dump() to clone the db
2020-02-15 16:28:15 +01:00
ThomasV
88d5cdf87c
fix test_lnpeer
2020-02-15 16:28:15 +01:00
ThomasV
87b7d2c0c0
wallet backup function for kivy/android
2020-02-15 16:28:15 +01:00
SomberNight
d6b4b19824
kivy: allow generic passwords for wallets
2020-02-15 16:28:15 +01:00
ThomasV
2f10bc2f4d
reestablish: force_close if we are a recent backup
2020-02-15 16:28:15 +01:00
ThomasV
62eceeb573
Save and read lighting backups (Qt)
2020-02-15 16:28:15 +01:00
SomberNight
edc00b448f
fix lightning "init" msg assertion error
...
closes #5962
2020-02-15 15:25:41 +01:00
SomberNight
a6e3a244e8
add comment re lnchannel channel_states
2020-02-14 16:15:25 +01:00
ThomasV
bb21e01823
(minor) call lnwatcher.add_channel from lnworker.add_channel
2020-02-14 14:15:15 +01:00
ThomasV
471fdd1d97
follow-up previous commit
2020-02-14 13:37:45 +01:00
ThomasV
2a7b5081c9
channel states: make sure that closing_txid is saved if channel is closed
2020-02-14 13:25:04 +01:00
SomberNight
111ef9ebb1
follow-up fixes to storage-db separation
...
e1ce3aace7
2020-02-13 20:00:12 +01:00
SomberNight
5d8d8f743a
kivy: more reliable saving of "last wallet"
...
The intended behaviour is that when the user launches the app,
the wallet we try to open is the wallet most recently opened by the user.
The old code in 'on_stop' in practice only got called if the user exited via
repeatedly pressing the system 'back' button.
related #5952
2020-02-13 03:12:32 +01:00
SomberNight
091f6ced58
android build: update buildozer and p4a versions
...
also update NDK version (new p4a demands it)
2020-02-13 02:25:04 +01:00
SomberNight
ab4e2dd9f0
wallet: fix is_mine/can_sign. don't just rely on ks, also check script
...
Previously a standard (single-sig) wallet would consider a multisig txin as is_mine
(if the keystore found its pubkey in the txin).
fixes #5948
2020-02-12 18:14:07 +01:00
SomberNight
0d33da2f95
wallet: (sanity) is_mine now guaranteed to handle 'None' input
2020-02-12 18:14:04 +01:00
SomberNight
07f5d6b745
keystore: 'get_tx_derivations' no longer public
2020-02-12 18:14:00 +01:00
ThomasV
beee880dba
fix data_loss_protect (missing return, json conversion)
2020-02-12 14:19:31 +01:00
ThomasV
9734546fe9
test_lnpeer: use less side-effects
2020-02-12 10:32:55 +01:00
ThomasV
e3630d87b2
test_lnpeer: test_reestablish_with_old_state
2020-02-12 10:22:22 +01:00
ThomasV
3377627070
reestablish_channel: shorter varnames
2020-02-12 06:18:22 +01:00
ThomasV
69ef9aa3d7
channel_reestablish: assume that DLP is enabled, because we require it
2020-02-11 21:39:23 +01:00
SomberNight
e42e17779d
windows: dll-load 'hack' needs to be applied not only from main script
...
but also when running tests, or just importing electrum from an interpreter
2020-02-11 20:57:37 +01:00
SomberNight
23a93ef7ad
windows: when running from source, load DLLs from main dir
...
Load DLLs from inner 'electrum' dir instead of '.dlls'.
To make it consistent with where we expect libsecp256k1 (.dll/.so) be.
(note that while in case of libsecp we specifically already search the main dir,
without this change, other DLLs such as libusb or libzbar would not be found there)
2020-02-11 20:57:34 +01:00
SomberNight
e8118e1845
gitignore: add .so/.dll in inner 'electrum' folder
2020-02-11 20:57:30 +01:00
ThomasV
9ccfa318f8
add new peer_state for the case where we are waiting for the remote party to force close a channel
2020-02-11 20:55:52 +01:00
ThomasV
8688a6530a
reestablish_channel: do not send second channel_reestablish message if they are ahead (they should know it)
2020-02-11 20:42:16 +01:00
ThomasV
ece75c3244
test_lnpeer: simple test of channel_reestablish
2020-02-11 19:53:21 +01:00
ThomasV
28dc1928a0
Merge pull request #5947 from SomberNight/202002_ecdsa
...
make libsecp256k1 a mandatory dependency
2020-02-11 19:05:12 +01:00
SomberNight
f78589ec77
update README to mention libsecp
2020-02-11 17:33:06 +01:00
SomberNight
5b84e714f2
build: workaround for 'realpath' missing on macOS
2020-02-11 16:48:28 +01:00
SomberNight
4cec098d2d
build: create a standalone build script for libsecp256k1
...
heavily based on Electron-Cash/Electron-Cash@eda015908e
2020-02-11 16:48:24 +01:00
SomberNight
1d72585b7d
ecc: hard fail if libsecp256k1 is not found/usable
2020-02-11 16:46:35 +01:00
SomberNight
de1ca27d63
tests: rm "needs_test_with_all_ecc_implementations" decorator
...
now libsecp256k1 is the only implementation
2020-02-11 16:46:31 +01:00
SomberNight
0a5ad9fda4
ecc: small API clean-up
2020-02-11 16:42:02 +01:00
SomberNight
288d793893
ecc: use libsecp256k1 for pubkey recovery (from sig and msg)
2020-02-11 16:41:59 +01:00
SomberNight
ab0c70e291
ecc: use libsecp256k1 for signature conversions
...
(instead of python-ecdsa)
2020-02-11 16:41:56 +01:00
SomberNight
ad408ea832
ecc: use libsecp256k1 for sign/verify/mul/add
2020-02-11 16:41:52 +01:00
SomberNight
2cf2135528
ecc: abstract away some usage of python-ecdsa: bytes<->int conversions
2020-02-11 16:41:49 +01:00
SomberNight
004acb906d
ecc: abstract away some usage of python-ecdsa: randrange
2020-02-11 16:41:45 +01:00
ThomasV
a600873cf9
move wrapper definition outside of main_window class
2020-02-11 11:08:33 +01:00
ThomasV
e1ce3aace7
Separate db from storage
...
- storage is content-agnostic
- db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
ThomasV
c61e5db6a9
fixes for text interface
2020-02-08 12:35:07 +01:00
SomberNight
f9960a5fe2
qt: don't clear send tab in broadcast_done
...
no longer needed as fields are already cleared when user clicks Save/Pay
2020-02-07 20:11:08 +01:00
SomberNight
34392e82b9
cosigner pool: easy fix (works but with worse than previous behaviour)
...
got broken as part of PSBT changes in #5721
2020-02-07 20:09:40 +01:00
Jin Eguchi
4313bde4c2
appimage: update libudev-dev ( #5936 )
2020-02-07 11:41:04 +00:00
ThomasV
7bd29ed8fc
regtest: wait_for_balance
2020-02-05 08:56:58 +01:00
SomberNight
9d2629c5c3
blockchain.fork: better exception if datadir was deleted while running
2020-02-04 19:04:38 +01:00
SomberNight
f545d2b716
qt update checker: use longer timeout
...
closes #5899
2020-02-04 18:34:24 +01:00
SomberNight
3835157f41
cli: history commands: only json-encode once
...
closes #5868
closes #5931
2020-02-04 17:56:52 +01:00
ThomasV
dbceed2647
Restructure wallet storage:
...
- Perform json deserializations in wallet_db
- use StoredDict class that keeps tracks of its modifications
2020-02-04 13:35:58 +01:00
ThomasV
0a9e7cb04e
(minor) rename class: StoredAttr -> StoredObject
2020-02-04 13:34:57 +01:00
ThomasV
7507942b7a
(minor) json_db: add file header, fix formatting
2020-02-04 12:43:04 +01:00
ThomasV
b08947a506
storage upgrade: convert lists to dict (txi, txo, revocation_store channels)
2020-02-04 12:11:18 +01:00
ThomasV
63963323be
storage: take the DB lock when writing to disk.
2020-02-03 17:08:34 +01:00
ThomasV
73e656522e
regests: organize tests in two classes
2020-02-03 15:16:15 +01:00
ThomasV
149cd9598a
Separate JsonDB and WalletDB
2020-02-03 12:36:07 +01:00
ThomasV
8118bd1d72
use setEnabled() for Qt menu items: Network, Lightning, Watchtower
2020-02-02 22:40:23 +01:00
ThomasV
4ec86d36a8
faster and improved regtests
...
- print the test name before each test
- start only needed agents (alice, bob, carol)
- set settle_delay using setconfig instead of restarting daemon
- test the watchtower ctn in test_watchtower
2020-02-02 15:07:28 +01:00
ThomasV
cded582fe9
Start watchtower if run_watchtower is set, even if lightning is not activated ( fix #5896 ).
...
Fix parameters of sweepstore.add_sweep_tx, rm dead code.
2020-02-02 12:10:10 +01:00
ThomasV
e876cb0d93
Merge pull request #5913 from roth-a/master
...
Kivy: Adding address coloring to AddressPopup (Address Details)
2020-02-01 19:38:22 +01:00
Alexander Roth
b6a5f6f2fc
Added coloring to the AddressPopup dialog:
...
- Moved the coloring logic (address_colors) from tx_dialog.py to a new file electrum/gui/kivy/util.py
- Added background_color to <RefLabel> in main.kv
- Calling address_colors in the initialization of AddressPopup and setting the foreground and background color
Code cleanup spaces
Code cleanup spaces
Fixed typo
2020-02-01 18:16:26 +01:00
ThomasV
aa51df0a1a
Use attr.s for Feeupdates and Outpoints
...
Storage upgrade to version 23
2020-02-01 16:45:19 +01:00
ThomasV
7472eba78c
lnpeer: code factorization
2020-01-31 13:33:38 +01:00
ThomasV
757467782a
Use attr.s instead of namedtuples for channel config
2020-01-31 12:19:26 +01:00
ThomasV
9bd633fb0b
Merge pull request #5917 from wakiyamap/fix_travis_appimage
...
Fix travis appimage
2020-01-29 13:47:46 +01:00
ThomasV
a9463cb245
Merge pull request #5918 from wakiyamap/fix_travis_regtest
...
Fix travis regtest
2020-01-29 13:46:32 +01:00
wakiyamap
3314591192
Fix travis regtest
2020-01-29 12:57:15 +09:00
wakiyamap
1237134339
Fix travis appimage
2020-01-29 12:55:23 +09:00
SomberNight
11452722af
network dns hacks: split from network.py into its own file
2020-01-22 18:32:57 +00:00
SomberNight
cb88a3b6e4
dns hacks on windows: resolve A and AAAA records in parallel
2020-01-22 18:32:57 +00:00
SomberNight
a5cd34dc08
follow-up prev (oops, only committed part of the changes)
2020-01-22 18:26:29 +01:00
Axel Gembe
d3385e49bb
Build: Install libxkbcommon-x11 in AppImage
...
Newer distributions do not install libxkbcommon-x11 by default
anymore and Qt depends on it.
-----
taken from ca3e4501cd
2020-01-22 18:16:53 +01:00
SomberNight
b560bc92cc
windows build: maybe fix reproducibility (jsonschema-*.dist-info)
2020-01-22 16:28:51 +01:00
Axel Gembe
4406eebbfe
Build: Uninstall Cython from AppImage
...
Cython is not needed at runtime.
-----
taken from c64910055d
related #5859
2020-01-22 12:27:17 +01:00
SomberNight
80025a3af4
requirements-hw: re-add Cython
...
this reverts ec496a8222
Cython must be pinned down for reproducible builds
related #5859
2020-01-22 12:08:30 +01:00
SomberNight
c7a21220d5
mac build: bump pyinstaller version
2020-01-21 20:21:14 +01:00
SomberNight
0edd291efe
mac build: bump python version (3.6.4->3.7.6)
2020-01-21 20:20:40 +01:00
SomberNight
a041a0c075
wallet: log when saving already paid invoice
...
(maybe it should not be allowed?)
2020-01-21 16:50:45 +01:00
SomberNight
34612c671e
fix incorrect type hint
2020-01-21 15:39:34 +01:00
SomberNight
2880c26d87
qt broadcast tx: don't complain about being "offline" for partial tx
2020-01-21 15:12:25 +01:00
SomberNight
cb41a0fe89
qt send tab paytoedit: use monospace font
2020-01-21 14:32:18 +01:00
SomberNight
2e654c9440
qt main_window: trivial clean-up re is_onchain
2020-01-21 14:22:25 +01:00
SomberNight
e9645db182
qt send tab: show "Pay" button even in watch-only wallets
2020-01-21 14:16:23 +01:00
SomberNight
5fd790dec9
follow-up prev
...
These lists are only visible when non-empty. This interacts badly with
the internals of maybe_defer_update().
2020-01-21 11:51:02 +01:00
SomberNight
1d0fc6665b
qt: defer refreshing tabs until they are visible
...
very loosely based on Electron-Cash/Electron-Cash@522e7ca59e
2020-01-19 07:31:50 +01:00
SomberNight
356a0a2865
qt: clean-up in some MyTreeView children (mv code from update to init)
2020-01-19 07:02:48 +01:00
SomberNight
18c6451518
json_db: only deserialize transactions on-demand
2020-01-19 05:49:12 +01:00
SomberNight
0fdbf49f08
tests: also run unit tests with python 3.8 on Travis
2020-01-18 05:52:46 +01:00
SomberNight
6d270364c6
qt paytoedit: properly handle multiple max ('!') outputs
2020-01-18 04:15:44 +01:00
SomberNight
5cfafff55d
qt main_window: rm require_fee_update (dead code)
2020-01-18 04:15:40 +01:00
SomberNight
b16164da4f
qt paytoedit: fixes for pay-to-many (when including "!")
2020-01-18 04:15:26 +01:00
rbrooklyn
3658f87035
Add block explorer support for mynode.local ( #5892 )
2020-01-17 22:06:34 +00:00
SomberNight
1c4728ecc6
appimage binary: bump python version (3.6.8->3.7.6)
2020-01-16 19:12:24 +01:00
SomberNight
e65ce96f9d
interface: better error msg for main server re SSL cert issues
...
(logger.warning is shown even without -v, if there is a terminal)
closes #5884
2020-01-12 04:29:39 +01:00
SomberNight
a6dd17bfef
fix daemon (don't close instantly)
...
follow-up 37747d7469
2020-01-11 00:04:00 +01:00
SomberNight
4fd2745332
windows binaries: update nsis
2020-01-10 23:27:34 +01:00
SomberNight
bab9f68736
windows binaries: update wine
2020-01-10 23:26:47 +01:00
SomberNight
547906d1c0
windows binaries: update pyinstaller to 3.6
2020-01-10 20:37:43 +01:00
SomberNight
bc77091539
requirements: rm pycryptodomex from "binary"-specific list
...
it's already listed now in the "core" requirements.txt file
2020-01-10 19:04:16 +01:00
SomberNight
7c090f92ce
binaries: use "--no-dependencies" option for pip install
...
All (incl indirect) dependencies are already listed in deterministic-build/requirements*.txt.
This option makes it easier to manually rm a dependency from that list for e.g. testing.
2020-01-10 19:01:32 +01:00
SomberNight
0b0139c676
network.get_transaction: move some response validation logic from Synchronizer
2020-01-09 19:23:28 +01:00
SomberNight
94888739d3
try to fix "--offline" mode
2020-01-09 19:23:24 +01:00
SomberNight
37747d7469
split network main_taskgroup: create daemon.taskgroup
...
network.main_taskgroup restarts every time the proxy settings are changed,
many long-running tasks (some introduced with lightning) are not prepared for and do not want this.
2020-01-09 19:23:21 +01:00
Nelson Perez
7968531065
Restoring old behavior of the outpoint copy to clipboard feature ( #5879 )
...
* Restoring old behavior of the outpoint copy to clipboard feature
* Small code style adjustments
2020-01-09 01:14:18 +00:00
SomberNight
b14747ecfe
ecc.ECPubkey: add custom __deepcopy__ implementation
...
With python-ecdsa 0.15, copy.deepcopy(ecdsa.ecdsa.Public_key) started to raise.
This fixes the Travis test failures.
Also rm unused ECPrivkey._privkey attribute.
2020-01-08 20:09:45 +01:00
SomberNight
29cf01524a
qt CPFP: handle empty fee field
...
fixes #5875
2020-01-07 17:59:17 +01:00
SomberNight
1059191ebc
qt installwizard: fix empty filename crash
...
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\installwizard.py", line 256, in on_filename
widget_create_new.setVisible(temp_storage and temp_storage.file_exists())
TypeError: setVisible(self, bool): argument 1 has unexpected type 'NoneType'
2020-01-07 16:53:37 +01:00
SomberNight
d2f132738a
wallet: only select mature coins by default
...
this is a regression from #5721
Removed the `TxInput.is_coinbase` method as I think it is a confusing API,
instead we now have `TxInput.is_coinbase_input` and `TxInput.is_coinbase_output`.
related #5872
2020-01-02 00:43:49 +01:00
SomberNight
6709ec4117
dns hacks on windows: cache dns when using dnspython
...
related #4421
related #5337
2020-01-01 06:23:51 +01:00
SomberNight
2d57a689d9
network/util: increase default timeout of make_aiohttp_session (30->45s)
...
related: #5337
2020-01-01 06:21:20 +01:00
SomberNight
96fa03c11b
fix paying bip70 payment request with Kivy GUI
2019-12-31 03:37:50 +01:00
SomberNight
1d0aa4042a
fix paying bip70 payment request with Qt GUI
2019-12-31 03:08:47 +01:00
SomberNight
787ac5fe99
interface: make changing max incoming msg size (1 MB) easier
2019-12-27 17:43:12 +01:00
ghost43
c19f9ee755
Merge pull request #5865 from shyrwall/master
...
Remove phishing server icarus.tetradrachm.net
2019-12-26 17:14:36 +00:00
Sebastian Hyrwall
967f4d7236
Remove phishing server
2019-12-26 23:47:32 +07:00
SomberNight
b3c0231b2b
appimage build: add notes re investigating reproducibility failure
2019-12-24 03:30:26 +01:00
SomberNight
5f4162deaa
requirements: bump min python-keepkey to 6.3.1
...
as 6.3.0 had basic functionality (restore from seed) broken
see https://github.com/keepkey/python-keepkey/pull/85
2019-12-21 07:33:36 +01:00
SomberNight
ad5c6284c4
commands/jsonrpc: fix specifying "wallet" to commands that need it
2019-12-21 07:00:30 +01:00
SomberNight
2ca535225d
util.standardize_path: properly handle "~" (user's home directory)
...
notably this is needed when the shell itself does not get a chance to expand "~",
e.g. when a path is passed via JSON-RPC
>>> os.path.normcase(os.path.realpath(os.path.abspath("~/.electrum/testnet/wallets/delete_me2")))
'/home/user/wspace/electrum/~/.electrum/testnet/wallets/delete_me2'
>>> os.path.normcase(os.path.realpath(os.path.abspath(os.path.expanduser("~/.electrum/testnet/wallets/delete_me2"))))
'/home/user/.electrum/testnet/wallets/delete_me2'
2019-12-21 06:53:10 +01:00
ghost43
3716594331
Merge pull request #5460 from SomberNight/keepkey_enum_20190626
...
keepkey: use libusb to enumerate devices instead of hid
2019-12-20 00:51:19 +00:00
SomberNight
c8d7075758
requirements: bump min python-keepkey to 6.3.0
2019-12-20 01:49:56 +01:00
SomberNight
a8e81c0bd2
keepkey: use libusb to enumerate devices instead of hid
2019-12-20 01:30:10 +01:00
ghost43
ace61d2d20
Merge pull request #5692 from matejcik/trezor-shamir
...
Trezor: support for Shamir backup and recovery
2019-12-19 15:54:41 +00:00
SomberNight
18209fc782
trezor: when restoring, hide Shamir options by default
...
They become visible once user clicks "Show expert settings"
2019-12-19 16:50:35 +01:00
SomberNight
9b28f6df7b
wallet: encrypt storage by default
...
notably, now also in kivy
2019-12-19 14:22:47 +01:00
SomberNight
9834d6cd94
windows binaries: skip building libusb if already done
2019-12-18 18:23:00 +01:00
SomberNight
eca769c4ca
windows binaries: build libusb ourselves
...
Latest libusb does not have official binaries, and it contains some bugfixes we want.
related: #5460
based on EchterAgo's work in ee4bdaf9c0
2019-12-18 17:32:02 +01:00
matejcik
006c6c1a58
trezor: use BIP39 backup by default even if Shamir is available
2019-12-18 12:36:13 +01:00
matejcik
da41e4c289
trezor: bump library requirement
2019-12-18 12:36:13 +01:00
matejcik
3fc70bd97a
trezor: implement support for Shamir recovery
2019-12-18 12:36:13 +01:00
matejcik
f4e2781786
trezor: link button messages to enum names
2019-12-18 12:36:13 +01:00
SomberNight
79681c90e0
wallet._is_onchain_invoice_paid: support "zero amount" invoice
2019-12-17 22:12:51 +01:00
Axel Gembe
880bd16883
AppImage: Improve binary stripping
...
Slightly reduces file size, improves build speed and makes build more
reproducible.
The .comment section contained GCC version information which could cause
different build output from just a minor update in GCC. The information is not
needed so we strip this.
The strip command was invoked using xargs, spawning a new process for each file.
This is inefficient as xargs can correctly run the strip command with multiple
file names.
-----
taken from 43aaf9572f
2019-12-17 21:41:17 +01:00
SomberNight
33facd151d
ledger.sign_transaction: always do certain output checks
2019-12-17 21:33:07 +01:00
SomberNight
ee63e84bcf
ledger: faster sign_transaction startup
...
Only call Ledger_KeyStore.get_client_electrum() once,
as it runs DeviceMgr.scan_devices(), which is slow.
2019-12-17 21:19:57 +01:00
SomberNight
6b8c447eb9
ledger: support sending to OP_RETURN outputs
...
closes #5849
based on:
ca9b432ff0
7bb27eff84
2019-12-17 21:10:14 +01:00
SomberNight
02baae10d7
kivy: implement opening storage-encrypted wallet files
2019-12-17 18:39:52 +01:00
SomberNight
72491bdf18
synchronizer: request tx from server if we only have partial local tx
...
Note that there is a slight distinction between
`not tx.is_complete()` and `isinstance(tx, PartialTransaction)`,
which is that technically you can have a PSBT that is already complete
but was not yet converted to a standard bitcoin tx.
2019-12-16 21:15:20 +01:00
SomberNight
7b49832a3f
payment requests: fix explicit "None" expiration
...
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\main_window.py", line 994, in <lambda>
self.create_invoice_button.clicked.connect(lambda: self.create_invoice(False))
File "...\electrum\electrum\gui\qt\main_window.py", line 1123, in create_invoice
key = self.create_bitcoin_request(amount, message, expiry)
File "...\electrum\electrum\gui\qt\main_window.py", line 1132, in create_bitcoin_request
addr = self.wallet.get_unused_address()
File "...\electrum\electrum\wallet.py", line 1452, in wrapper
addr = func(self, *args, **kwargs)
File "...\electrum\electrum\wallet.py", line 1465, in get_unused_address
addrs = self.get_unused_addresses()
File "...\electrum\electrum\wallet.py", line 1459, in get_unused_addresses
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1459, in <listcomp>
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1535, in get_request_status
if exp > 0 and time.time() > timestamp + exp:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
2019-12-16 21:03:34 +01:00
SomberNight
01fc048484
CLI: properly auto-upgrade storage when needed even if storage-encrypted
...
previously commands would error if user had an encrypted storage that needed upgrading
2019-12-15 20:12:51 +01:00
ThomasV
2c6a1f55fb
Merge pull request #5825 from SomberNight/201912_local_tx_can_be_partial
...
wallet: allow saving partial tx as local (if it has a txid)
2019-12-15 16:40:46 +01:00
ThomasV
61fc00fb9e
Merge pull request #5840 from SomberNight/201912_py38_win_dlls_source
...
windows: when running from source, with py3.8+, load DLLs from '.dlls'
2019-12-14 10:51:13 +01:00
SomberNight
93cee1ba4d
windows: when running from source, with py3.8+, load DLLs from '.dlls'
...
Python 3.8 changed where DLLs are searched for.
see https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
This potentially affect our binaries when we start shipping python 3.8+, however that is not being addressed here. This commit simply addresses the usecase of running from source, on Windows, using python 3.8.
On older Python, a user could build/obtain DLLs and place them anywhere on the system %PATH%, however this no longer works with py3.8, as %PATH% is no longer checked.
With py3.8, instead, we now check if there is a folder named '.dlls' in the top-level project directory, and if so, register that as an additional search path.
A user who wants to run Electrum from source on Windows using python 3.8 or later, with their custom DLLs, should manually create the '.dlls' folder and put their DLLs there. If they also want to switch between e.g. python 3.7 and 3.8, they should also include '.dlls' in the system %PATH%.
When using Electrum, interesting DLLs include at least libsecp256k1.dll, libusb-1.0.dll, libzbar-0.dll.
2019-12-14 06:44:17 +01:00
ThomasV
34d652b0f6
follow-up previous commit
2019-12-13 11:09:18 +01:00
ThomasV
11f1541cdd
lnworker: save timestamp regardless of channel state
2019-12-13 11:08:25 +01:00
SomberNight
3a2fe80675
qt: also use BlockWaitingDialog in PreviewTxDialog
...
as when 'advanced_preview' is set, ConfirmTxDialog is skipped
follow-up 1088cf4444
2019-12-12 21:39:46 +01:00
SomberNight
dbd1c8cf71
qt TxDialog: visibility of widgets should be set after parenting
...
widget.show() and widget.setVisible(True) results in a blink of an ephemeral window containing the widget;
that is, unless the widget has a parent explicitly set or it can be determined via which layout the widget is placed in.
2019-12-12 21:31:30 +01:00
SomberNight
c9ede07462
wizard: (qt) add dedicated button to create new wallet
2019-12-12 17:54:46 +01:00
ThomasV
7324817ff3
Merge pull request #5833 from SomberNight/201912_qt_blocking_waiting_dialog
...
Qt: introduce BlockingWaitingDialog
2019-12-12 17:53:03 +01:00
SomberNight
308517d473
python 3.8: adapt to breaking changes re asyncio.CancelledError
...
(and TimeoutError)
closes #5798
2019-12-11 23:07:47 +01:00
ThomasV
fa9b997c70
Merge pull request #5834 from Electronic-Gulden-Foundation/fix/aiohttp
...
Aiohttp must be lower than 4.0.0
2019-12-11 09:14:36 +01:00
SomberNight
255bf7caf4
build: update some packages in dockerfiles
...
Ubuntu no longer serves old version
2019-12-10 23:54:45 +01:00
SomberNight
a5a7c205e3
trivial: add a few log lines for startup
2019-12-10 23:31:58 +01:00
SomberNight
d08ed6410a
python3.8: fix DeprecationWarning in qt/paytoedit
...
.../electrum/electrum/gui/qt/paytoedit.py:221: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
self.setMinimumHeight(h)
2019-12-10 23:01:01 +01:00
SomberNight
9d0ae2f95b
adapt to aiohttp 4.0
...
related: #5753
2019-12-10 22:55:11 +01:00
Dennis Ruhe
252f0960fc
Aiohttp must be lower than 4.0.0
2019-12-10 22:03:17 +01:00
SomberNight
fcd9752f19
keystore: change derive_pubkey API to return bytes
2019-12-10 20:41:47 +01:00
SomberNight
ea62027599
wallet: faster decrypt_message for Imported_Wallet
2019-12-10 20:08:41 +01:00
SomberNight
869a728317
wallet: use abstract base classes
2019-12-10 19:34:44 +01:00
ThomasV
f08796fe68
Allow requests that never expire
2019-12-10 14:45:29 +01:00
SomberNight
1088cf4444
qt: introduce BlockingWaitingDialog
...
A variant of WaitingDialog that runs the task in the GUI thread,
blocking the GUI. It is probably a code smell to actually use this,
as operations should not block the GUI... still it provides a middle-ground
between blocking the GUI without giving user-feedback and having to refactor
existing code (to avoid blocking).
2019-12-10 03:34:41 +01:00
SomberNight
daef1a8359
lnworker: don't log InvoiceError
...
lnworker._pay does not need log_exceptions decorator,
as we properly await the coroutine
2019-12-10 03:19:56 +01:00
SomberNight
b99add59c3
lnworker: introduce PaymentAttemptLog NamedTuple
2019-12-10 03:17:57 +01:00
SomberNight
24ebc77d76
ln chan verifier: fix code rot
2019-12-10 01:14:38 +01:00
SomberNight
0ab88b821c
keystore: use abstract base classes, introduce MPKMixin
2019-12-10 00:31:01 +01:00
SomberNight
f2d42d79ba
qt: rm redundant line: ConfirmTxDialog.update_tx()
...
already called in ConfirmTxDialog.__init__
2019-12-09 19:14:15 +01:00
SomberNight
d641dfe964
follow-up prev: add comment
2019-12-09 17:43:08 +01:00
ThomasV
0828454ef1
Merge pull request #5830 from SomberNight/20191209_wallet_perf
...
wallet perf: significant speedup for make_unsigned_transaction and rel.
2019-12-09 17:30:10 +01:00
ThomasV
9d83dea0dc
Merge pull request #5822 from SomberNight/201912_qt_receive_tab_address
...
qt receive tab: show plain bitcoin address
2019-12-09 10:57:14 +01:00
SomberNight
59c5efb090
keystore: cache BIP32Node.from_xkey(self.xpub)
...
This results in significant performance improvements for
keystore.can_sign() and wallet._add_txinout_derivation_info()
2019-12-09 03:43:47 +01:00
SomberNight
f73b6b5d23
keystore: cache derive_pubkey
2019-12-09 03:35:20 +01:00
SomberNight
5f6f7da2a1
bitcoin.py: base58 address: make sure all public methods test checksum
...
Note: the checksum was already being checked in practically all cases, by the caller.
Moved the check here, to the lower level (but still public) method for sanity.
2019-12-08 06:56:19 +01:00
SomberNight
8cf3587aeb
base_encode/base_decode: change to saner API
2019-12-08 06:19:51 +01:00
SomberNight
01f94fcf58
base_encode/base_decode: performance improvement
...
For example, for 50 KB of random data, and base 43,
previously,
- base_encode took ~38 seconds
- base_decode took ~270 seconds
now,
- base_encode takes ~7.5 seconds
- base_decode takes ~6 seconds
2019-12-08 06:07:01 +01:00
SomberNight
5c9bd2d2b4
ln channel open: save funding tx as local tx into wallet
2019-12-08 04:33:36 +01:00
SomberNight
30dcab0877
wallet: allow saving partial txns as local (but require txid)
2019-12-08 04:32:44 +01:00
SomberNight
369d972aed
qt: handle exceptions when pressing "Max" button
...
fixes #5783
2019-12-08 03:21:02 +01:00
SomberNight
d2a8028cde
qt receive tab: show plain bitcoin address
2019-12-07 06:06:36 +01:00
SomberNight
20bbe85bce
receive requests: encode lightning invoices as uppercase -> smaller QRs
...
By encoding bolt11 invoices as uppercase text in QR codes,
we can use the alphanumeric mode, which results in non-negligibly smaller QR codes.
2019-12-07 05:58:58 +01:00
SomberNight
8e89c0c971
wallet: some clean-up re get_address_history vs db.get_addr_history
...
note: tests needed changing due to behavioural change in wallet.get_receiving_address()
Previously wallet.get_receiving_address used wallet.db.get_addr_history,
now it (indirectly) uses wallet.get_address_history, which now also considers local txns.
2019-12-07 05:42:28 +01:00
SomberNight
d81110014e
qt requests/invoices: use TreeView.sortByColumn instead of model.sort
...
sort the view, not the model
This way, qt will display the icon indicating the sort order on the relevant column header.
2019-12-07 04:28:08 +01:00
SomberNight
9f9b0954e2
appimage: update package in dockerfile
...
Ubuntu no longer serves old version
2019-12-06 22:02:17 +01:00
SomberNight
f24dea0277
add SECURITY.md
2019-12-06 21:47:28 +01:00
SomberNight
e0eb3c18eb
qt ConfirmTxDialog: don't catch BaseException for make_tx
...
not sure what it is supposed to catch...
The examples I could come up with would all be actual bugs;
in which case we should let the exception propagate out to the crash reporter.
2019-12-06 20:41:51 +01:00
ThomasV
a6aa97c3e3
Merge pull request #5820 from SomberNight/201912_ecdsa_sig_r_grinding
...
ECDSA signatures: grind low R to match with Bitcoin Core (take 2)
2019-12-06 20:38:46 +01:00
ThomasV
2e4cfd0744
fix race in NetworkJobOnDefaultServer constructors
2019-12-06 20:17:52 +01:00
SomberNight
61aebd0f2d
(fix) qt coin selection: signatures for coins would persist in memory
...
Scenario: select some UTXOs in the 'Coins' tab. Create a tx and sign it.
Close the tx dialog without broadcasting/etc (cancel tx).
Signatures would remain for selected UTXOs.
Create new tx -> invalid sigs.
2019-12-06 19:45:55 +01:00
SomberNight
5b88b8667e
also grind ecdsa low R when using libsecp256k1, and fix tests
...
note: low R grinding would not have to be duplicated if we trusted the caller
to have done it already (as is the case with the classes in ecc.py), and if
we propagated the choice of "random_k" as part of the nonce_function passed
to libsecp256k1 (which is not currently done)
2019-12-05 20:27:55 +01:00
junderw
d16fd2783c
Add signature Low R grinding to match with Bitcoin Core
...
Ref: https://github.com/bitcoin/bitcoin/pull/13666
Depends on python-ecdsa pull request to allow for extra_entropy
Ref: https://github.com/warner/python-ecdsa/pull/92
2019-12-05 18:11:11 +01:00
SomberNight
428b63822b
trezor: rm obsolete gui text
2019-12-04 20:54:53 +01:00
SomberNight
69720946c1
appimage: update package in dockerfile
...
Ubuntu no longer serves old version
2019-12-04 20:53:48 +01:00
Janus Troelsen
3ac8f461a9
Tests: Remove on_channels_updated ( #5819 )
2019-12-04 19:40:52 +00:00
SomberNight
00a7df13bf
rerun freeze_packages
2019-12-04 20:04:18 +01:00
ThomasV
065e98ad35
on_open_channel: rm call to non-existing method on_channels_updated
2019-12-04 18:35:04 +01:00
SomberNight
d3fd87ebd0
hardware wallets: wizard no longer requests xpub at path "m"
...
This was done to calculate the bip32 root fingerprint but it broke
the digitalbitbox. The keystore already had a different way to get
the root fingerprint for existing wallets, specifically handling this
case; the code in base_wizard used when creating new wallets was
duplicating that code originally and was then forgotten to be updated.
Now these codepaths are unified.
closes #5816
2019-12-02 19:31:17 +01:00
SomberNight
68dad21fb4
network: make best_effort_reliable smarter and a bit more lenient
...
related: #5815
2019-12-01 23:24:43 +01:00
ThomasV
dfdc1e1d25
require ecdsa version >= 0.13.3
2019-11-29 18:38:53 +01:00
ThomasV
6659f5c2c0
Merge pull request #5740 from spesmilo/dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
...
build(deps): bump ecdsa from 0.13.2 to 0.13.3 in /contrib/deterministic-build
2019-11-29 18:35:37 +01:00
ThomasV
7a080352f8
Merge pull request #5809 from SomberNight/201911_invoice_paid_detection
...
wallet: better (outgoing) invoice "paid" detection
2019-11-29 18:24:08 +01:00
SomberNight
8dbbc21aff
wallet: better (outgoing) invoice "paid" detection
...
- no more passing around "invoice" in GUIs, invoice "paid" detection is now handled by wallet logic
- a tx can now pay for multiple invoices
- an invoice can now be paid by multiple txs (through partial payments)
- new data structure in storage: prevouts_by_scripthash
- type: scripthash -> set of (outpoint, value)
- also, storage upgrade to build this for existing wallets
2019-11-29 15:06:16 +01:00
SomberNight
cfbd83c432
wallet: minor clean-up
2019-11-29 13:12:23 +01:00
SomberNight
c0b5ebcc5d
tests: fix testcase test_restoring_wallet_with_manual_delete
2019-11-29 13:09:21 +01:00
SomberNight
adaa016e78
LNPeerAddr: fix equality tests and hence lnworker._last_tried_peer
...
follow-up 13d6997355
2019-11-29 00:53:18 +01:00
roth
2ce8dd460b
Color-Code Addresses in Kivy UI ( #5774 )
...
* Added static coloring of the TX output dialog.
Coloring was suggested in #5750
2019-11-28 20:40:28 +00:00
SomberNight
4007720b34
qt history list: rm and fix magic number
2019-11-27 20:29:49 +01:00
ThomasV
f7fb14a538
Merge pull request #5806 from RCasatta/remove_greenaddress
...
Remove GreenAddress instant plugin
2019-11-27 18:37:50 +01:00
Riccardo Casatta
8c30ae78be
remove GreenAddress instant plugin
...
GreenAddress instant feature has been removed from the service, thus
there is no reason anymore to keep the plugin
2019-11-27 17:51:25 +01:00
SomberNight
a13344938f
interface: fix connecting to raw IPv6 (as hostname) on Windows
...
Changed cert pinning filename as on Windows paths cannot contain a colon ':'.
2019-11-27 13:08:22 +01:00
SomberNight
cee2083134
qt history list: fix UnboundLocalError when searching
...
closes #5801
2019-11-27 04:30:38 +01:00
SomberNight
d430ec4bfc
interface.deserialize_server: better ipv6 handling
2019-11-26 00:17:00 +01:00
SomberNight
13d6997355
LNPeerAddr: validate arguments
...
no longer subclassing NamedTuple (as it is difficult to do validation then...)
2019-11-26 00:15:33 +01:00
SomberNight
edba59ef54
LNPeerAddr: nicer str formatting for IPv6 hosts
2019-11-25 21:10:53 +01:00
SomberNight
ddeb176b3d
kivy: fix open_channel (API was changed)
2019-11-23 20:50:30 +01:00
SomberNight
557987d4eb
add/fix some open_channel related type hints
2019-11-23 20:28:46 +01:00
ThomasV
038036f350
minor follow-up prev commit
2019-11-23 19:56:40 +01:00
ThomasV
fd8236538a
Open lightning channels with partially signed tx.
...
Fixes #5379 .
2019-11-23 19:49:12 +01:00
ThomasV
9c9ceb702a
fix #5729
2019-11-23 15:12:16 +01:00
ThomasV
b9e5edd704
fix #5728
2019-11-23 14:51:39 +01:00
ThomasV
06589df812
simplify add_transaction
2019-11-23 12:46:43 +01:00
ThomasV
fc85dcead6
follow-up previous commit
2019-11-23 11:37:01 +01:00
ThomasV
6c62fb03ac
fix #5733
2019-11-23 11:02:31 +01:00
SomberNight
88307357ec
add some type hints
...
mostly related to hw wallets
2019-11-22 22:59:33 +01:00
SomberNight
770ae6d878
fix tests
2019-11-22 22:11:56 +01:00
SomberNight
bda9a407d9
trivial: don't print frequent-case log line in lnpeer.mark_open
2019-11-22 21:37:15 +01:00
SomberNight
268e245322
lnpeer: only set initialized after both sent AND received "init"
...
had a trace where we tried to send "funding_locked" before being initialized:
D | lnpeer.Peer.[iq7zhmhck54vcax2vlrdcavq2m32wao7ekh6jyeglmnuuvv3js57r4id.onion:9735] | Sending FUNDING_LOCKED
E | lnworker.LNWallet | Exception in on_update_open_channel: AttributeError("'LNTransport' object has no attribute 'sk'")
Traceback (most recent call last):
File "...\electrum\electrum\util.py", line 999, in wrapper
return await func(*args, **kwargs)
File "...\electrum\electrum\lnworker.py", line 674, in on_update_open_channel
peer.send_funding_locked(chan)
File "...\electrum\electrum\lnpeer.py", line 876, in send_funding_locked
self.send_message("funding_locked", channel_id=channel_id, next_per_commitment_point=per_commitment_point_second)
File "...\electrum\electrum\lnpeer.py", line 102, in send_message
self.transport.send_bytes(raw_msg)
File "...\electrum\electrum\lntransport.py", line 93, in send_bytes
lc = aead_encrypt(self.sk, self.sn(), b'', l)
AttributeError: 'LNTransport' object has no attribute 'sk'
2019-11-22 21:33:56 +01:00
ThomasV
61dfcba092
Refactor channel states:
...
- persisted states are saved
- state transitions are checked
- transient states are stored in channel.peer_state
- new channel states: 'PREOPENING', 'FUNDED' and 'REDEEMED'
- upgrade storage to version 21
2019-11-22 20:14:54 +01:00
SomberNight
c31fa059fe
cli: clear up "rbf" arg for "payto" cmd in help text; and use eval_bool
...
related: #5791
(previously rbf was a str, and it was casted to a bool directly, i.e. only
the empty string "" evaluated as False)
2019-11-22 16:09:42 +01:00
SomberNight
420b1a6636
cli: load_wallet now auto-upgrades the WalletStorage when needed
...
previously it would bail out and just return False
2019-11-22 15:54:34 +01:00
SomberNight
3d88d6870c
cli: fix load_wallet for storage-encrypted wallets
2019-11-22 15:48:22 +01:00
ThomasV
8e08ca7cb1
simplify network callbacks in lnworker
2019-11-22 15:06:37 +01:00
ThomasV
b469df5283
check channel funding_tx amount and script in save_short_channel_id
2019-11-21 20:16:04 +01:00
SomberNight
c2b0039935
bitcoin.py: remove some remnants of TYPE_ADDRESS, TYPE_SCRIPT
2019-11-21 18:51:38 +01:00
SomberNight
03cc63205f
trivial: use logger.exception instead of traceback.print_exc
2019-11-21 17:55:00 +01:00
SomberNight
6f246a83b3
qt coin selection: allow selecting an empty set
...
Using this, the user can force "bump fee" not to add new inputs.
closes #5719
2019-11-21 17:46:00 +01:00
SomberNight
11f54aee60
qt utxo list: spend_list is now a set (and renamed)
...
this is a small performance improvement ("if x in spend_list" was linear)
and the "order" of selected coins does not matter anyway
2019-11-21 17:21:54 +01:00
SomberNight
216d9e3c4d
lnpeer: (fix) force_close_channel was not awaited in some cases
2019-11-21 16:37:43 +01:00
ghost43
d5b27e5be1
Merge pull request #5787 from xaya/http-request-auth
...
Return 401 from RPC server for missing auth
2019-11-21 15:21:17 +00:00
Daniel Kraft
423c4b0695
Return 401 from RPC server for missing auth.
...
When no (supported) authentication is passed to the JSON-RPC server,
return a 401 HTTP error code instead of 403. This indicates to the
client that authentication is required, and also requests that to be
sent using the "basic" method. The previously-returned code 403 is now
only returned if authentication is passed but not valid.
There are some JSON-RPC clients out there that only send authentication
after a 401 code requested it. Those fail to connect to the Electrum
RPC interface even if the correct password is configured. Those same
clients can e.g. connect to Bitcoin Core successfully, which already
implements logic matching this change.
See also https://stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses .
2019-11-21 15:16:37 +01:00
SomberNight
6b195437ed
wallet: "future" txns num conf is now negative
...
flipped the sign so that TxMinedInfo.conf can be consistently used in inequalities
2019-11-21 05:01:59 +01:00
SomberNight
1526bc9ccf
qt: consistently show tooltip when copying to clipboard
2019-11-21 03:01:55 +01:00
Johann Bauer
9fe7917118
Qt: Remove unused color from color scheme
2019-11-20 21:11:41 +01:00
SomberNight
06de2660cf
kivy: support invoices with "max" amount
...
closes #5781
2019-11-20 19:29:29 +01:00
SomberNight
49284f716b
wallet: bump fee now supports coin selection
...
related: #5719
2019-11-20 18:43:05 +01:00
SomberNight
fec9677508
qt open channel: minor dialog fixes
2019-11-20 18:00:45 +01:00
SomberNight
cd9477c0da
ln: qt channel open: fix max channel size
2019-11-20 17:45:28 +01:00
SomberNight
ae04434206
ln: update list of fallback nodes
...
with some popular nodes from 1ml.com
2019-11-20 17:14:14 +01:00
SomberNight
4057140e6a
lightning qr codes: more robust parsing
...
kivy qr code handling did not accept "lightning:" prefix or uppercase
2019-11-20 03:21:59 +01:00
SomberNight
d1c262def0
qt tx dialog: small clean-up in constructors
2019-11-19 22:17:52 +01:00
SomberNight
97056ae44d
qt send tab: subtract 2fa fee when clicking "spend max"
2019-11-19 21:22:49 +01:00
SomberNight
ca6654c102
qt send tab: don't allow paying multiple invoices that spend max '!'
2019-11-19 20:26:50 +01:00
SomberNight
710e9621b5
qt tx dialog: allow blanking feerate
...
Previously it was impossible to rm the last character in feerate_edit.
e.g. if you held down "backspace", we would keep refilling the field as soon
as it became empty.
2019-11-19 20:13:16 +01:00
SomberNight
13b858ab26
qt tx dialog: disable "Finalize" btn if tx is None
...
e.g. NotEnoughFunds due to too high fee
2019-11-19 19:35:57 +01:00
SomberNight
66ddedb97e
qt tx dialog: small fee edit fix
...
scenario: enter extremely high feerate (which we cannot satisfy) then click into fee_edit.
At that moment, fee_edit is empty and both feerate_edit and fee_edit are considered frozen.
As fee_edit has priority, we would construct a tx with default fee.
Now, instead, we won't construct this default fee tx ~as if the click to fee_edit did not happen.
2019-11-19 19:29:10 +01:00
SomberNight
8bd27851a4
qt tx dialog: only allow "save as local" for complete txns
2019-11-19 18:41:44 +01:00
SomberNight
aa3d817ef2
qt: clean-up imports
2019-11-18 20:56:49 +01:00
SomberNight
b8e4ce9ba1
hardware wallets: handle when label is None
...
follow-up 56c3de0e1e
2019-11-18 18:13:26 +01:00
ThomasV
aa37979100
fix #5761
2019-11-18 10:22:20 +01:00
ThomasV
b9cf095e1a
fix #5761
2019-11-18 05:48:21 +01:00
ThomasV
ade47e331a
Merge branch 'master' of github.com:spesmilo/electrum
2019-11-18 05:12:25 +01:00
ThomasV
47e0b4cd02
fix #5765
2019-11-18 05:12:13 +01:00
ghost43
f2ca651dc4
Merge pull request #5775 from JeremyRand/resolver-wallet
...
Fix missing wallet argument to _resolver
2019-11-18 02:11:06 +00:00
JeremyRand
643bc9d802
Fix missing wallet argument to _resolver
2019-11-18 01:31:33 +00:00
ThomasV
6b9971a466
fix #5767
2019-11-17 19:29:48 +01:00
ThomasV
0a8f511340
fix #5772
2019-11-17 19:25:11 +01:00
ThomasV
a453189d37
fix #5766
2019-11-17 17:08:09 +01:00
ThomasV
af21a4a8d6
fix #5770
2019-11-17 16:58:35 +01:00
ThomasV
3083237363
Merge pull request #5768 from lukechilds/ln-negative-red
...
Show outgoing Lightning payments with red description
2019-11-17 13:58:16 +01:00
ThomasV
e74f7e7b42
fix #5764
2019-11-17 13:48:19 +01:00
Luke Childs
bcae8ed1ad
Show outgoing Lightning paymenst with red description
2019-11-17 15:28:17 +07:00
SomberNight
cbd146ad15
hardware wallets: detect if label changed and update it in wallet file
2019-11-17 01:17:38 +01:00
SomberNight
56c3de0e1e
hardware wallets: better handle label collision when selecting device
...
related: #5759
2019-11-17 01:15:44 +01:00
SomberNight
6e3875ceab
fix qt seed dialog (follow-up af86c7e3fd)
2019-11-15 23:50:05 +01:00
SomberNight
600b26eed6
hardware wallets: pull udev rules into our repository
...
README.md heavily based on 060c7fc618/hwilib/udev/README.md
2019-11-15 23:43:43 +01:00
SomberNight
6ebbaa60ef
old_mnemonic: speed up mn_decode
...
mn_decode is used by mnemonic.make_seed which now takes around 25% less time
2019-11-15 12:08:06 +01:00
ghost43
bc4f22503f
Merge pull request #5758 from mbarkhau/master
...
Mnemonic performance improvements
2019-11-15 09:59:40 +00:00
Manuel Barkhau
af86c7e3fd
fix: cache wordlists
2019-11-14 18:57:18 +00:00
Manuel Barkhau
b3f913340c
make Mnemonic.mnemonic_decode faster
...
list.index(word) is O(n)
dict[word] is O(log(n))
This makes a difference for Mnemonic.make_seed which
calls self.mnemonic_decode repeatedly.
2019-11-14 18:54:14 +00:00
ThomasV
c2c291dd3a
fix #5757
2019-11-14 10:30:06 +01:00
ThomasV
78813dcb7d
Pass make_tx function to ConfirmTxDialog
...
- allow 'spend max' when opening a channel (fixes #5698 )
- display amount minus fee when 'max' buttons are pressed
- estimate fee of channel funding using a template with dummy address
2019-11-14 10:20:19 +01:00
SomberNight
970bd4e95f
qt coin control: introduce second status bar
2019-11-13 19:09:07 +01:00
SomberNight
800c05b32f
qt addresses tab: fix "Spend from"
2019-11-13 05:46:45 +01:00
SomberNight
0c0a6b2145
TxDialog: fix hooks. only show psbt widgets when applicable.
...
users of 'transaction_dialog' were assuming that dialog.tx is already set
2019-11-12 23:05:01 +01:00
SomberNight
05c496edd1
PreviewTxDialog: small UI changes
2019-11-12 23:04:57 +01:00
SomberNight
9627f32e08
qt utxo list fixes
2019-11-12 23:04:54 +01:00
SomberNight
74790c16f9
PreviewTxDialog: fix RBF checkbox
2019-11-12 23:04:50 +01:00
SomberNight
e7efc3657b
fix Qt tx dialog randomly disappearing (due to gc)
2019-11-12 23:04:47 +01:00
SomberNight
1e77562bcb
qt/confirm_tx_dialog: fix qt warning
...
QLayout::addChildLayout: layout "" already has a parent
2019-11-12 23:04:42 +01:00
ThomasV
8c3af39a9b
add option to pay multiple invoices
2019-11-12 18:37:35 +01:00
ThomasV
dd6cb2caf7
GUI: Separate output selection and transaction finalization.
...
- Output selection belongs in the Send tab.
- Tx finalization is performed in a confirmation dialog
(ConfirmTxDialog or PreviewTxDialog)
- the fee slider is shown in the confirmation dialog
- coin control works by selecting items in the coins tab
- user can save invoices and pay them later
- ConfirmTxDialog is used when opening channels and sweeping keys
2019-11-12 14:42:06 +01:00
SomberNight
f8c84fbb1e
hardware wallets: create base class for HW Clients. add some type hints
2019-11-11 17:04:12 +01:00
SomberNight
2fec17760d
qt address list: check internal address corruption when copying address
...
regressing following c721e880d0
note that place_text_on_clipboard is overridden in AddressList
2019-11-11 15:51:23 +01:00
SomberNight
5549f3adbe
CoinChooser: avoid NotEnoughFunds if zero buckets are sufficient
...
closes #5752
Adapted from @JeremyRand's fix
2019-11-11 15:15:04 +01:00
ThomasV
5773097b08
rename 'copy column' to 'copy'
2019-11-10 07:55:37 +01:00
SomberNight
bf8a58c0b4
tx_from_any: strip whitespaces
...
see https://github.com/spesmilo/electrum/pull/5721#issuecomment-551876236
2019-11-08 17:51:48 +01:00
SomberNight
365aa189f2
qt FileDialogs for transactions: better file extension filter
2019-11-08 15:22:11 +01:00
SomberNight
9ff7d2c5a7
transactions (qt): fix opening raw bytes files
...
(both when trying to "load tx from file", and "load tx from text" > "browse file")
2019-11-08 15:10:54 +01:00
SomberNight
85a4811742
transaction.tx_from_any: recognise even more types, and add tests
2019-11-08 15:01:18 +01:00
SomberNight
fef1ddd416
wallet: fix #5748
2019-11-08 13:43:12 +01:00
SomberNight
7b18c91b74
psbt follow-up: fix ln cooperative close, and minor type clean up
2019-11-07 18:28:27 +01:00
ThomasV
707b74d22b
Merge pull request #5721 from SomberNight/201910_psbt
...
integrate PSBT support natively. WIP
2019-11-07 17:10:20 +01:00
SomberNight
cd49839bc0
transaction: helpful error msg if user tries to load old partial tx
2019-11-07 07:07:02 +01:00
SomberNight
27df235c26
transactions: reading QR codes: clean-up and accept all encodings
2019-11-07 06:33:15 +01:00
SomberNight
29a6e3c019
psbt: implement PSBT_GLOBAL_VERSION field
...
based on latest BIP-0174 update: bitcoin/bips#849
2019-11-07 03:43:00 +01:00
SomberNight
83740c1a78
psbt: implement CompactSize key types (previously single-byte types)
...
based on latest BIP-0174 update: bitcoin/bips#849
2019-11-07 03:27:38 +01:00
SomberNight
aa518c0ea5
psbt: allow insecure signing of legacy UTXOs without full previous tx
...
When "importing" a psbt, we accept witness utxos even for legacy inputs
(warning shown to user in gui).
When "exporting" a psbt, we follow the spec; except when exporting as a QR code,
in which case we include witness utxos for all inputs.
This makes QR codes for psbts with legacy inputs feasible, just like they
were before, with our custom tx serialization format (with the same risk,
of burning coins as miner fees).
2019-11-07 02:40:10 +01:00
SomberNight
74a46689d8
kivy tx dialog: was missing tx.add_input_from_wallet() call
...
resulted in e.g. incorrect "tx unrelated to wallet" detection for beyond-gap-limit stuff
2019-11-07 02:26:58 +01:00
SomberNight
8a7c3447b3
tx dialog: try harder to show fee
2019-11-07 02:24:16 +01:00
SomberNight
6573e7f1f3
test_wallet_vertical: add test for manual coinjoin
2019-11-06 18:40:16 +01:00
SomberNight
8e09d429c0
psbt: "updater" must swap NON_WITNESS_UTXO for WITNESS_UTXO if txin is segwit
2019-11-06 03:46:00 +01:00
SomberNight
c077d77316
psbt: test_wallet_vertical: add asserts to avoid silent breakage of psbts we create
2019-11-06 03:42:14 +01:00
SomberNight
955caa7292
transaction: to_json() debug methods display bip32 str (not int) paths
2019-11-05 23:39:50 +01:00
SomberNight
46db33df75
psbt: follow-ups: BCDataStream.read_bytes() should return bytes
...
This fixes keepkey, as in particular the code in the plugin expected
TxOutpoint.txid to be bytes not a bytearray (and the TxOutpoint named tuple
itself claims txid to be bytes).
2019-11-05 23:35:32 +01:00
SomberNight
cc4f6804b0
psbt: follow-ups: fix trezor
2019-11-05 23:32:00 +01:00
SomberNight
dd14a3fde5
psbt: follow-ups: fix digital bitbox
2019-11-05 22:06:46 +01:00
SomberNight
9e86352022
psbt: follow-ups: fix ledger
2019-11-05 21:34:54 +01:00
SomberNight
26a5f212cb
psbt: cleaner API for serialize* methods
2019-11-04 22:25:16 +01:00
SomberNight
1017fefdc9
psbt: only include xpubs for multisig wallets
2019-11-04 22:25:13 +01:00
SomberNight
90b190bbcd
psbt: fix bug re witness_utxo serialization
2019-11-04 22:25:09 +01:00
SomberNight
c8c1ea9c86
qt tx dialog: add export options for coinjoins and for coldcard
2019-11-04 22:25:06 +01:00
SomberNight
d872be7f6b
psbt: don't put xpubs and full paths into tx by def; only while signing
2019-11-04 22:25:02 +01:00
SomberNight
e6c841d05f
psbt: put fake xpubs into globals. keystores handle xfp/der_prefix missing
2019-11-04 22:24:59 +01:00
SomberNight
7eb7eb8674
add support for manual coinjoins
2019-11-04 22:24:55 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
2019-11-04 22:24:36 +01:00
ghost43
6d12ebabbb
qt tx dialog: show dropdown for "export", instead of separate buttons ( #5739 )
2019-11-04 16:24:55 +00:00
ghost43
53dea824a4
Merge pull request #5742 from Coldcard/master
...
plugins/coldcard/qt.py: bugfix for API change on main_window.show_transaction
2019-11-04 14:25:51 +00:00
Peter D. Gray
ec2bdbd02d
plugins/coldcard/qt.py: bugfix for API change on main_window.show_transaction
2019-11-04 09:21:41 -05:00
dependabot[bot]
ed5300ba1d
build(deps): bump ecdsa in /contrib/deterministic-build
...
Bumps [ecdsa](https://github.com/warner/python-ecdsa ) from 0.13.2 to 0.13.3.
- [Release notes](https://github.com/warner/python-ecdsa/releases )
- [Changelog](https://github.com/warner/python-ecdsa/blob/master/NEWS )
- [Commits](https://github.com/warner/python-ecdsa/compare/python-ecdsa-0.13.2...python-ecdsa-0.13.3 )
Signed-off-by: dependabot[bot] <support@github.com>
2019-11-02 09:23:39 +00:00
SomberNight
3e98123b17
qt settings dialog: small fixes
2019-11-02 06:13:11 +01:00
SomberNight
f72bb03af6
commands: gettransaction cmd now tests txid before returning tx
...
thanks for @JeremyRand
ref #5660
2019-11-02 05:46:52 +01:00
SomberNight
3bfcfb49c3
fix qt invoices list: handle lightning disabled
...
closes #5738
2019-11-02 03:44:22 +01:00
SomberNight
ccccaf099f
(trivial) logging "verbosity_filter" was renamed to "LOGGING_SHORTCUT"
2019-10-30 03:24:26 +01:00
SomberNight
75902f8e35
fix logic error in lnworker.on_channel_closed
2019-10-29 20:39:58 +01:00
ThomasV
427f7f8eeb
fix #5731
2019-10-29 08:06:53 +01:00
SomberNight
a20317fe2a
fix #5726
2019-10-28 21:17:20 +01:00
ThomasV
7b5869c7bc
kivy:
...
- simplify menu
- add lightning network dialog
2019-10-25 16:46:52 +02:00
ThomasV
2dd368e76e
minor fix: show_transaction params
2019-10-24 18:45:51 +02:00
ThomasV
5c1340b7bd
pass both invoice and description to show_transaction
2019-10-24 17:27:14 +02:00
ThomasV
76c22f3e06
follow-up a0ec2690cf
2019-10-24 16:27:54 +02:00
ThomasV
24221584e2
fix clear_requests button
2019-10-24 09:32:40 +02:00
ThomasV
a0ec2690cf
Call wallet.set_paid after onchain broadcast. Check if invoices are expired in util.get_request_status
2019-10-23 17:33:46 +02:00
ThomasV
e35bddcc09
kivy: fix can_pay in invoice_dialog
2019-10-23 08:33:16 +02:00
ThomasV
a4944cdcb2
delete channel from db in remove_channel, becaose it is called from lnworker
2019-10-23 08:20:15 +02:00
ThomasV
9fbac40d56
filter out None in wallet.get_invoices
2019-10-23 05:30:16 +02:00
ThomasV
9ff1bd4110
fix test following aac0fe9ae6
2019-10-22 18:54:00 +02:00
ThomasV
2234f93d8b
fix fee in lnworker.get_history (sign error)
2019-10-22 18:27:41 +02:00
SomberNight
d9b5ab3086
wallet: fix bump_fee when there are only change outputs
...
closes #5718
closes #5603
2019-10-22 17:12:23 +02:00
ThomasV
aac0fe9ae6
kivy: show status with color. show inflight attempts.
2019-10-22 15:41:45 +02:00
ThomasV
cd86bec894
kivy: add 'delete channel' button
2019-10-22 12:27:55 +02:00
ThomasV
576fbbd074
kivy: minor fixes
2019-10-22 11:59:16 +02:00
Janus Troelsen
b86b3ec1d1
segwit_addr: Use normal comparison for tuple literal ( #5712 )
2019-10-16 23:50:17 +00:00
ThomasV
6992e33ecb
folllow-up c721e880d0
2019-10-16 16:04:17 +02:00
ThomasV
c721e880d0
Qt: generic add_copy_menu method for MyTreeView lists
2019-10-16 15:50:18 +02:00
ThomasV
0a6ac7c61a
fix #5702
2019-10-16 12:01:52 +02:00
ThomasV
d1f4804962
misc Qt fixes
...
- improve layout of send tab
- use tabs to show receive widgets
- add menu item to copy address from request
- show copied content in copy dialog
2019-10-16 11:46:23 +02:00
ThomasV
d35791ff65
fix #5704
2019-10-16 11:35:50 +02:00
ThomasV
8c22be87b0
fix #5701
2019-10-16 11:13:44 +02:00
ghost43
d480d0b265
Merge pull request #5700 from fiatjaf/bugfixopenchannel
...
fix expected returned peer address values when opening channel.
2019-10-15 13:43:17 +00:00
SomberNight
106bc6d2b2
follow-up prev
2019-10-15 15:41:18 +02:00
fiatjaf
b476681af7
fix typo: wallet.requests -> wallet.receive_requests ( #5706 )
2019-10-15 13:22:05 +00:00
fiatjaf
38622c0a99
fix expected returned peer address values when opening channel.
2019-10-15 01:05:37 -03:00
ThomasV
3af7920b63
fix typo
2019-10-14 12:02:04 +02:00
ThomasV
1b0521cabd
kivy: toggle lightning dialog
2019-10-14 11:59:04 +02:00
ThomasV
a13cea6f8a
add remove_lightning command
2019-10-14 11:18:57 +02:00
ThomasV
db833e1ba3
lnworker: less verbose
2019-10-14 10:42:41 +02:00
ThomasV
c9d403cb7b
minor: callback unknown_channels (follow-up 0966edc637)
2019-10-14 10:39:52 +02:00
ThomasV
90ce9f195b
Allow user to enable lightning in the GUI. Make it a per-wallet setting.
2019-10-13 20:34:38 +02:00
ThomasV
a201ed44df
Qt: add lightning button to status bar
2019-10-12 19:27:14 +02:00
ThomasV
0966edc637
fine-grained callbacks for lightning network dialog
2019-10-12 19:15:51 +02:00
ThomasV
fe550c6c73
payment log: show whether channel have been blacklisted
2019-10-12 18:36:25 +02:00
ThomasV
3897cf725d
move handle_error_code_from_failed_htlc to lnworker because it requires access to the network object
2019-10-12 18:22:19 +02:00
ThomasV
af4a3328f7
Qt: separate lightning and watchtower dialogs
2019-10-12 14:30:52 +02:00
ThomasV
f985c53f2f
fix #5695
2019-10-12 14:05:17 +02:00
ThomasV
16644ae00f
follow-up previous commit
2019-10-12 13:57:54 +02:00
ThomasV
8f86a15f92
improve payment log dialog
2019-10-12 13:47:10 +02:00
ThomasV
5377eb907c
follow-up dd0be1541e
2019-10-12 12:59:38 +02:00
SomberNight
2a604b1676
lnonion: get_failure_msg_from_onion_error might raise in python 3.7
...
this used to work in py3.6 but raises in py3.7 :(
(see https://bugs.python.org/issue34536 )
2019-10-12 00:05:38 +02:00
ThomasV
c37d08cec9
bump version number to 4.0.0a0 (alpha version)
2019-10-11 18:13:48 +02:00
ThomasV
dd0be1541e
Improve handling of lightning payment status:
...
- Move 'handle_error_code_from_failed_htlc' to channel_db,
and call it from pay_to_route, because it should not be
called when HTLCs are forwarded.
- Replace 'payment_received' and 'payment_status'
callbacks with 'invoice_status' and 'request_status'.
- Show payment error logs in the Qt GUI
- In the invoices list, show paid invoices for which
we still have the log.
2019-10-11 17:51:33 +02:00
ThomasV
d6d644190e
lnworker: return error reason in await_payment
2019-10-11 13:37:54 +02:00
ThomasV
0557738a6b
follow-up previous commit
2019-10-11 12:54:00 +02:00
ThomasV
c4ab1e6fad
Encapsulate lightning payment events:
...
- make LNWorker.pending_payments private
- public methods: payment_sent, payment_received, await_payment
2019-10-11 10:18:28 +02:00
ThomasV
638de63f13
lnworker: rename 'invoices' to 'payments' when they can be in both directions
2019-10-09 20:16:11 +02:00
ThomasV
788d54f9a6
remove another instance of lnworker accessed in lnchannel
2019-10-09 19:54:43 +02:00
ThomasV
8331f0049c
Remove lnpeer.payment_preimages:
...
- we can await lnworker.pending_payments instead, because the preimage is saved
- also, remove one instance of lnworker being accessed from lnchannel
2019-10-09 19:40:25 +02:00
ThomasV
b08cfac643
fix #5681
2019-10-07 17:24:49 +02:00
SomberNight
a51a2a7f8f
wallet: minor invoices fix
...
handle "lightning disabled & there are LN invoices in wallet" case
2019-10-07 05:29:34 +02:00
ThomasV
0dc90491b2
do not decode LN invoices in channel_details. fixes #5676
2019-10-05 19:26:26 +02:00
ThomasV
bcb10e6e53
remove redundant test from lnworker._pay, rename pay_to_route parameter to lnaddr
2019-10-04 18:06:53 +02:00
SomberNight
7c283f9cd2
fix tests: follow-up prev
2019-10-01 20:42:34 +02:00
SomberNight
8dabdf8bfb
qt send tab: handle invalid ln invoice; and ln invoice with ln disabled
...
fixes #5639
fixes #5662
2019-10-01 19:15:26 +02:00
ThomasV
1773bd6cd6
Merge pull request #5658 from vesellov/master
...
bug fix in electrum/wallet.py
2019-09-26 13:11:34 +02:00
Veselin Penev
4f82bf9269
bug fix in electrum/wallet.py
2019-09-25 18:56:17 +02:00
ThomasV
f3eeb8817e
Merge pull request #5652 from SomberNight/20190922_config_no_longer_singleton
...
config: no longer singleton. it is passed to Wallet.__init__
2019-09-22 23:56:08 +02:00
SomberNight
ec372adbb9
tests: fix test_find_path_for_payment. need to close sqlite connection
...
test was sometimes randomly failing
(always on Windows, as it's illegal to rm open files there)
2019-09-22 21:21:24 +02:00
SomberNight
04edad9984
config: no longer singleton. it is passed to Wallet.__init__
...
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
ThomasV
d6c7dee547
follow-up previous commit
2019-09-22 17:32:22 +02:00
ThomasV
a35421ab71
qt settings: create services tab for both watchtower and payserver
2019-09-22 17:12:48 +02:00
ThomasV
f08e5541ae
Refactor invoices in lnworker.
...
- use InvoiceInfo (NamedTuple) for normal operations,
because lndecode operations can be very slow.
- all invoices/requests are stored in wallet
- invoice expiration detection is performed in wallet
- CLI commands: list_invoices, add_request, add_lightning_request
- revert 0062c6d695 because it forbids self-payments
2019-09-22 16:06:53 +02:00
SomberNight
0a395fefbc
qt send tab: use monospace font in "from" UTXO-selection section
2019-09-22 06:20:57 +02:00
ghost43
f0d69d1dba
Merge pull request #5432 from JeremyRand/rpc-from-coins
...
Add from_coins arg to payto/paytomany
2019-09-21 20:50:19 +00:00
JeremyRand
7b91cd9cf4
Add from_coins arg to payto/paytomany
...
Fixes https://github.com/spesmilo/electrum/issues/5430
2019-09-21 20:07:16 +00:00
SomberNight
cbc3e13e28
qt: fix export history
2019-09-21 18:56:13 +02:00
SomberNight
6a32187f01
qt: fix address dialog
...
(was showing full history, not just for addr)
2019-09-21 18:48:44 +02:00
SomberNight
a1d7d39f68
commands: add type hints for "wallet" param, and fix code rot found via
2019-09-21 02:14:22 +02:00
SomberNight
1bc73b3475
lnworker.sync_with_remote_watchtower: use proxy
2019-09-19 18:50:57 +02:00
SomberNight
c63209fa9a
lnworker: accessing self.channels needs lock
2019-09-19 18:17:03 +02:00
ThomasV
6c055e80ed
qt: show_info -> show_error
2019-09-19 12:01:23 +02:00
ThomasV
0062c6d695
lnworker: fix detection of already paid invoices
2019-09-19 11:57:47 +02:00
ThomasV
d6d5b99944
lnworker: fee_msat is expected for all entries in history
2019-09-19 11:06:44 +02:00
ThomasV
46346eacd7
settings: add vbox with stretch
2019-09-19 10:02:25 +02:00
ThomasV
d1a70bf1df
settings: move block explorer to 'Transactions' tab
2019-09-19 09:11:46 +02:00
SomberNight
e9a1c05d23
bitcoin.relayfee: minor clean-up
2019-09-18 22:08:19 +02:00
SomberNight
8c1adc2f50
fix dns issue on Windows
...
closes #5638
2019-09-18 19:11:40 +02:00
SomberNight
c81f5395af
Merge pull request #5440 from Coldcard/multisig
...
Add multisig support for Coldcard plugin
2019-09-18 18:35:05 +02:00
SomberNight
26ff7a6265
coldcard tx dialog: "export PSBT" button should not raise on foreign ks
...
tested trezor/coldcard mixed multisig and it worked; no reason to enforce
that the first keystore must be coldcard (order should not matter)
2019-09-18 18:29:33 +02:00
SomberNight
1236b07abf
coldcard: show multisig address: more intuitive error msg
...
cause of error is probably almost always what msg says
2019-09-18 18:29:32 +02:00
SomberNight
9c83bc1008
coldcard qt: change receive_menu to be similar to other hw plugins
...
you should not interact with the hw device in the GUI thread if possible...
right-click was lagging
2019-09-18 18:29:32 +02:00
SomberNight
4e6cc93746
coldcard: do link_wallet in load_wallet hook instead
...
make_unsigned_transaction might not run in some code paths
(e.g. when user uses "Load transaction" UI function)
2019-09-18 18:29:31 +02:00
SomberNight
47c3ac6f1b
coldcard: follow-up prev
2019-09-18 18:29:31 +02:00
Peter D. Gray
c77fe6aafd
build_psbt.py: provide witness vs redeem or both scripts
2019-09-18 18:29:30 +02:00
Peter D. Gray
1692584ae0
coldcard/build_psbt.py: bugfix: dont assume all keystores implement get_derivation, see BIP32Keystore
2019-09-18 18:29:30 +02:00
Peter D. Gray
4baab751a4
Add multisig support for Coldcard plugin
...
-----
Squashed commit of the following:
commit 69c0d48108
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Aug 2 14:51:33 2019 -0400
deterministic-build/requirements-hw.txt: update to version 0.7.9 of ckcc-protocol for Coldcard
commit 5cd2c52869
Merge: 5e2a36a3e 537b35586
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Aug 2 14:41:59 2019 -0400
Merge branch 'multisig' of github.com:Coldcard/electrum into multisig
commit 5e2a36a3ee
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Aug 2 14:41:49 2019 -0400
Some fixes for p2wsh-p2sh and p2wsh cases
commit 537b35586e
Merge: a9e3ca47e 2a80f6a3a
Author: nvk <rodolfo@rnvk.org>
Date: Tue Jul 23 11:40:39 2019 -0400
Merge branch 'master' into multisig
commit a9e3ca47e1
Author: Peter D. Gray <peter@conalgo.com>
Date: Mon Jun 24 13:36:41 2019 -0400
Bugfix: not all keystores have labels
commit 57783ec158
Author: Peter D. Gray <peter@conalgo.com>
Date: Mon Jun 24 13:36:04 2019 -0400
Add address format to export data, and bugfix: use xfp_for_keystore()
commit 6f1f7673ea
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Jun 21 09:06:49 2019 -0400
Revert "bugfix: P2SH inputs can be signed with extra signatures, more than required"
This reverts commit 75b6b663ec .
commit c322fb6dd2
Author: Peter D. Gray <peter@conalgo.com>
Date: Thu Jun 20 12:57:19 2019 -0400
Require latest CKCC protocol
commit 69a5b781eb
Author: Peter D. Gray <peter@conalgo.com>
Date: Thu Jun 20 12:40:27 2019 -0400
gui/qt/main_window.py: add co-signer keystore label to wallet info display, and a hook for different buttons
commit 55d506d264
Author: Peter D. Gray <peter@conalgo.com>
Date: Thu Jun 20 12:36:10 2019 -0400
PSBT Combining/cleanup
commit 75b6b663ec
Author: Peter D. Gray <peter@conalgo.com>
Date: Thu Jun 20 10:18:02 2019 -0400
bugfix: P2SH inputs can be signed with extra signatures, more than required
commit 1bde362ddb
Author: Peter D. Gray <peter@conalgo.com>
Date: Wed Jun 19 09:47:26 2019 -0400
Combines signed PSBT files
commit cc5c0532e5
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Jun 14 13:04:32 2019 -0400
Working towards multisig
commit cb20da5428
Author: Peter D. Gray <peter@conalgo.com>
Date: Fri Jun 14 13:04:18 2019 -0400
Refactor/import PSBT handling code into own files
commit 558ef82bb0
Author: Peter D. Gray <peter@conalgo.com>
Date: Tue May 28 13:26:10 2019 -0400
plugins/hw_wallet/qt.py: show keystore label in tooltip
commit 269299df4a
Author: Peter D. Gray <peter@conalgo.com>
Date: Mon May 27 09:32:43 2019 -0400
Swap endian of xpub fingprint values, so they are shown as BE32 in capitalized hex, rather than 0x%08x (LE32)
2019-09-18 18:29:29 +02:00
SomberNight
bd83ca0286
qt: (trivial) some type hints
2019-09-18 02:10:53 +02:00
SomberNight
30bb7dd6f4
ecc: small clean-up
2019-09-18 02:09:15 +02:00
SomberNight
1669dd9782
simplify prev
...
following @markblundeberg's suggestion
https://github.com/Electron-Cash/Electron-Cash/pull/1621#issuecomment-532070318
2019-09-17 19:27:28 +02:00
SomberNight
65d896be5a
ecc: also use libsecp256k1 for point addition
...
time taken to add points changes to around 35% of what it was with python-ecdsa
-----
# benchmark runs before:
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 3.7693 seconds
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 3.8123 seconds
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 3.7937 seconds
# benchmark runs after:
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 1.3127 seconds
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 1.3000 seconds
> python3.7-64 ..\wspace\201909_libsecp256k1_point_addition\bench.py
time taken: 1.3128 seconds
-----
# benchmark script:
import os
import time
from electrum.ecc import generator
from electrum.crypto import sha256
rand_bytes = os.urandom(32)
#rand_bytes = bytes.fromhex('d3d88983b91ee6dfd546ccf89b9a1ffb23b01bf2eef322c2808cb3d951a3c116')
point_pairs = []
for i in range(30000):
rand_bytes = sha256(rand_bytes)
rand_int = int.from_bytes(rand_bytes, "big")
a = generator() * rand_int
rand_bytes = sha256(rand_bytes)
rand_int = int.from_bytes(rand_bytes, "big")
b = generator() * rand_int
point_pairs.append((a,b))
t0 = time.time()
for a, b in point_pairs:
c = a + b
t = time.time() - t0
print(f"time taken: {t:.4f} seconds")
2019-09-16 20:43:13 +02:00
SomberNight
49a2dbb021
kivy: receive to ln invoice should be disabled if lightning is disabled
2019-09-16 16:19:19 +02:00
SomberNight
ff9cc4d292
kivy: fix "use change addresses" setting (previously ignored, always on)
...
this config setting is stored in the WalletStorage unlike most others
closes #5643
2019-09-16 16:01:52 +02:00
SomberNight
0b87ce426f
minor qt send tab fixes. notably 'send max' was broken
...
follow-up aaed594772
2019-09-16 02:54:32 +02:00
SomberNight
5e04f084b7
qt wizard: follow-up prev; simplify
2019-09-14 16:25:35 +02:00
SomberNight
f44f7d60ab
qt wizard: still show selector window if storage.__init__ raises WFE
...
(WalletFileException; e.g. if storage version is from the future)
2019-09-14 16:22:06 +02:00
SomberNight
c7346c1eb8
kivy: fix paying onchain invoices
...
when pasting a new invoice and paying it
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 358, in _do_send_onchain
tx = self.app.wallet.make_unsigned_transaction(coins, outputs, None)
File "/home/user/wspace/electrum/electrum/wallet.py", line 849, in make_unsigned_transaction
if o.type == TYPE_ADDRESS:
AttributeError: 'tuple' object has no attribute 'type'
when loading back a saved invoice
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 358, in _do_send_onchain
tx = self.app.wallet.make_unsigned_transaction(coins, outputs, None)
File "/home/user/wspace/electrum/electrum/wallet.py", line 849, in make_unsigned_transaction
if o.type == TYPE_ADDRESS:
AttributeError: 'list' object has no attribute 'type'
2019-09-13 15:00:34 +02:00
SomberNight
1f305bba39
qt history tab txn drag and drop: fix #5635
2019-09-13 14:12:40 +02:00
ThomasV
1ecbafb920
add SSL context to watchtower server
2019-09-13 12:26:27 +02:00
ThomasV
26efef9e06
move lightning settings to settings dialog
2019-09-13 11:55:05 +02:00
ThomasV
aaed594772
Simplify invoices and requests.
...
- We need only two types: PR_TYPE_ONCHAIN and PR_TYPE_LN
- BIP70 is no longer a type, but an optional field in the dict
- Invoices in the wallet are indexed by a hash of their serialized list of outputs.
- Requests are still indexed by address, because we never generate Paytomany requests.
- Add 'clear_invoices' command to CLI
- Add 'save invoice' button to Qt
2019-09-12 20:11:20 +02:00
SomberNight
1b332748c3
qt console: fix commands that do not expect a 'wallet' arg
2019-09-12 19:22:55 +02:00
SomberNight
b9af8bf60a
get_tx_fee: further follow-up 7b828359c6
2019-09-12 17:22:35 +02:00
ThomasV
3d04399581
follow-up 7b828359c6
2019-09-12 13:12:48 +02:00
ThomasV
79de0489e3
kivy: do not remove fee from tx value in history (minor)
2019-09-12 12:32:38 +02:00
ThomasV
7b828359c6
simplify get_tx_fee
2019-09-12 12:26:49 +02:00
SomberNight
482605edbb
wallet: organise get_tx_fee. store calculated fees. storage version 19.
2019-09-12 08:59:27 +02:00
ThomasV
5c83e8bd1c
follow-up 241873f0a4
2019-09-12 08:58:58 +02:00
SomberNight
b138fff9a5
wallet: txi/txo small clean-up
2019-09-12 04:07:17 +02:00
SomberNight
241873f0a4
address_synchronizer.get_history now returns HistoryItem(NamedTuple)s
2019-09-12 04:06:51 +02:00
ThomasV
65b88dca86
return fees in history, show them in kivy GUI
2019-09-11 17:49:40 +02:00
ThomasV
a47a2c1b72
follow-up prev
2019-09-11 17:08:03 +02:00
ThomasV
1d82093ca1
fix bug in lightning get_history: filter settled htlcs first
2019-09-11 17:06:07 +02:00
ThomasV
30092cd68c
kivy: request PIN to load_wallet only on android
2019-09-11 16:36:04 +02:00
ThomasV
215dc96de7
define LNWatcher.do_breach_remedy
2019-09-11 11:58:28 +02:00
ThomasV
7370910fee
fix simple_config.estimate_fee
2019-09-11 11:49:32 +02:00
SomberNight
c531c72940
kivy: attempt at handling (some) exceptions on startup
2019-09-10 21:29:13 +02:00
SomberNight
a05dab2c4d
storage: read/write sanity checks
...
related: #4110
supersedes: #4528
2019-09-10 21:17:15 +02:00
SomberNight
4dda162336
qt wizard: turn 'temp_storage' into local variable
2019-09-10 20:19:41 +02:00
SomberNight
9eee36fe00
follow-up prev
2019-09-10 20:18:53 +02:00
SomberNight
098636c69a
fix tests
2019-09-10 19:39:52 +02:00
SomberNight
9c31c1f970
wallet: address_is_old is now checked using SPV (during sync)
2019-09-10 18:26:09 +02:00
SomberNight
b2920db8b8
config: enforce that SimpleConfig is singleton
...
related: #5629
2019-09-10 18:01:10 +02:00
ThomasV
a43be6657d
follow-up on SingleConfig
2019-09-10 17:14:25 +02:00
SomberNight
1a08063928
config: remove 'open_last_wallet' side-effecting
...
related: #5629
2019-09-10 17:10:52 +02:00
SomberNight
d1026b5afe
follow-up: SimpleConfig is supposed to be singleton
...
see cefa4762ba
and #5629
2019-09-10 16:38:10 +02:00
ThomasV
16e293c289
follow-up cefa4762ba
2019-09-10 16:24:21 +02:00
ThomasV
8e4fe051d3
add comment in storage._write
2019-09-10 09:26:07 +02:00
ThomasV
cefa4762ba
do not create multiple instances of SimpleConfig ( fix #5629 ). Add config field to wallet
2019-09-10 08:57:40 +02:00
SomberNight
bcdb72ae93
qt: add some type hints
2019-09-09 22:19:36 +02:00
SomberNight
ef5a5151e3
daemon: make 'wallets' dict private
...
especially as keys (paths) need to be standardized, this should not be exposed
2019-09-09 22:15:11 +02:00
SomberNight
befa8ea771
transaction: kill "name", "csv_delay", "cltv_expiry" fields
2019-09-09 19:38:35 +02:00
ThomasV
e5502a58ba
uncomment breach_remedy in watchtower
2019-09-09 18:49:14 +02:00
ghost43
ddcd77ab36
Merge pull request #5628 from TheCharlatan/fixMultisigDigitalBitBox
...
Digital BitBox: Fix sending to self
2019-09-09 14:37:17 +00:00
TheCharlatan
e7079f1bea
Digital BitBox: Fix sending to self
...
Make sure that a pubkey is only appended to the checkpub array if it
corresponds to a change address. Signing will fail otherwise, if a
non-change pubkey is sent as part of the checkpub list to the Digital
BitBox.
2019-09-09 15:07:51 +02:00
ThomasV
64deb87ade
fix #5513
2019-09-09 11:58:32 +02:00
ThomasV
103a37b0ca
add wallet_path to kwargs in run_cmdline
2019-09-09 09:58:16 +02:00
ThomasV
46ffab0b55
remove --wallet option for daemon. fixes #3752
2019-09-09 06:28:54 +02:00
SomberNight
d1dea9343e
wallet: address_is_old minor clean-up
...
also, synchronize was defined twice in AddressSynchronizer
2019-09-09 01:34:29 +02:00
SomberNight
ccc1897f36
qt addresses list: use IntEnum for dropdown filters
2019-09-09 00:24:22 +02:00
ThomasV
86bd3839df
follo-up 35761d1241
2019-09-08 19:25:35 +02:00
ThomasV
35761d1241
Save remote policy of chanel in wallet file (for private channels)
2019-09-08 19:14:28 +02:00
SomberNight
1612bca4c8
wine build: add --build to ./configure: prevents cross-comp. misdetect
...
from Electron-Cash/Electron-Cash/commit/e87021a78dbdeb50e9cfa51ddf0c1ef60c7688e0
2019-09-08 18:55:31 +02:00
SomberNight
b381fd84fb
build: when building libsecp256k1, patch Makefile.am before autogen.sh
...
apparently this could have caused issues on MacOS
based on Electron-Cash/Electron-Cash@69f6cd0aa0
2019-09-08 18:47:30 +02:00
SomberNight
abde8ff169
wallet: fix maturity off-by-one
...
based on Electron-Cash/Electron-Cash@c70957eb13
2019-09-08 18:26:04 +02:00
SomberNight
e3d5475f03
kivy: commit png icons (for svg resources) into repo
2019-09-08 17:05:06 +02:00
SomberNight
b1dc281cba
kivy amount_dialog: truncate btc amounts to max precision
...
closes #5624
2019-09-08 15:41:10 +02:00
ThomasV
d5d9f5b46c
fix #5618
2019-09-08 12:06:21 +02:00
SomberNight
83fcdbd561
lnchannel: handle htlc-address collisions
...
We were previously generating an incorrect commitment_signed msg if there were
multiple htlcs sharing the same scriptPubKey.
2019-09-07 08:54:41 +02:00
SomberNight
00f15d491b
lnpeer: somewhat nicer log messages
2019-09-07 07:29:22 +02:00
SomberNight
d4da4aa56c
lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH
2019-09-06 18:36:21 +02:00
SomberNight
25c372a3e0
lnworker.invoices access now uses lock
...
(qt gui thread vs asyncio thread race)
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1685, in do_send
self.pay_lightning_invoice(self.payto_e.lightning_invoice)
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1667, in pay_lightning_invoice
self.invoice_list.update()
File "/home/user/wspace/electrum/electrum/gui/qt/invoice_list.py", line 73, in update
_list = self.parent.wallet.get_invoices()
File "/home/user/wspace/electrum/electrum/wallet.py", line 525, in get_invoices
out += self.lnworker.get_invoices()
File "/home/user/wspace/electrum/electrum/util.py", line 401, in
return lambda *args, **kw_args: do_profile(args, kw_args)
File "/home/user/wspace/electrum/electrum/util.py", line 397, in do_profile
o = func(*args, **kw_args)
File "/home/user/wspace/electrum/electrum/lnworker.py", line 1007, in get_invoices
for key, (invoice, direction, status) in self.invoices.items():
RuntimeError: dictionary changed size during iteration
2019-09-06 18:27:47 +02:00
SomberNight
509df9ddaf
create class for ShortChannelID and use it
2019-09-06 18:09:05 +02:00
SomberNight
251db638af
only require libsecp256k1 if lightning is enabled
...
related: #5606
2019-09-06 15:08:15 +02:00
ThomasV
e5ff4fc7cd
fix #5605
2019-09-06 13:43:00 +02:00
ThomasV
5e92f637a6
fix CLI exception handling
2019-09-06 12:38:13 +02:00
ThomasV
35b0b3a43c
Fix CLI. Some commands require wallet_path. Return error on exception.
2019-09-06 11:06:08 +02:00
ThomasV
5faa0ade3d
ignore exceptions in payserver
2019-09-06 08:06:26 +02:00
SomberNight
712c3f1248
commands: try to fix tests
2019-09-05 23:22:11 +02:00
SomberNight
edf186da0d
channeldb.load_data: attempt at fixing race
...
closes #5525
2019-09-05 18:32:45 +02:00
SomberNight
4f741cfccc
lnpeer: longer timeouts
2019-09-05 18:31:51 +02:00
SomberNight
58681e4d07
follow-up prev (commands)
2019-09-05 18:30:04 +02:00
ThomasV
9ec9e1760a
CLI: always use the daemon's cmd_runner, and pass the 'wallet'
...
parameter explicitly to each command that requires it.
Previous code was relying on side effects to set the wallet.
This should fix #5614
2019-09-05 17:57:51 +02:00
SomberNight
0deb12cb2b
kivy: fix ln channel open via scan_qr
2019-09-05 17:06:42 +02:00
ThomasV
45f3e28d38
qt: minor fixes
2019-09-05 15:00:45 +02:00
ThomasV
28da62f51b
add PayServer settings to settings_dialog
2019-09-05 14:43:27 +02:00
ThomasV
96d3c36e4a
Qt: move settings dialog to a separate module
2019-09-05 13:21:18 +02:00
ThomasV
9d595f1fe1
fix websocket messages
2019-09-05 11:45:28 +02:00
ThomasV
94e7e94e2f
fix ssl config names, add new config tab
2019-09-05 11:36:50 +02:00
ThomasV
466c2bd293
for now, use PR_PAID for onchain unconfirmed
2019-09-05 11:33:09 +02:00
ThomasV
128285a050
http server: add ssl and bip70 signed requests
2019-09-05 10:57:50 +02:00
SomberNight
9d65120e59
commands: fix "close_wallet"
2019-09-04 20:16:47 +02:00
SomberNight
1bd9b3a66a
commands: fix "restore" cmd
...
Previously commands did not run on the asyncio thread but now they do.
"restore" was polling like "while 1: time.sleep()", blocking the event loop.
Now "restore" does not sync the wallet; which is actually cleaner
as previously this wallet would never get unloaded from the daemon (syncing forever).
This is also symmetric with the "create" cmd which also does not try to sync with the network.
However now it became difficult to write a script that restores a wallet and wants to wait
until it gets synced. Workaround for now is to poll with "list_wallets" whether it's synced.
We could create a new command that blocks until the loaded wallet gets synced.
2019-09-04 20:15:54 +02:00
SomberNight
de83ab6d4a
CLI: remove timeout for offline commands
...
e.g. when interacting with hw wallets (e.g. signmessage)
it does not make sense to time out
also, str(e) of some exceptions such as TimeoutError is ""...
2019-09-04 14:35:04 +02:00
SomberNight
b0902940b5
README: mention submodule init
2019-09-04 14:03:39 +02:00
SomberNight
99b83f7527
fix #5617
2019-09-04 13:53:38 +02:00
SomberNight
a42a773d19
storage: replace STO_EV_* ints with IntEnum
2019-09-04 13:31:49 +02:00
ThomasV
54776ca1d9
disable http server by default
2019-09-04 13:07:44 +02:00
ThomasV
deb97567fb
Qt: fix request menu
2019-09-04 12:52:32 +02:00
ThomasV
0d1ffe5642
fix submodule
2019-09-04 12:39:02 +02:00
ThomasV
747ab7a0a2
Integrate http_server (previously in electrum-merchant)
...
Use submodule to fetch HTML and CSS files
2019-09-04 12:20:05 +02:00
ThomasV
bd57880799
do not raise exception when add_own_channel adds channel update from the cache
2019-09-04 08:01:08 +02:00
ThomasV
e286ed1c13
add_own_channel does not need to be async
2019-09-03 21:01:45 +02:00
SomberNight
9372eacc29
hw wallets: show DeviceUnpairableError nicely in qt gui
...
need to subclass UserFacingException for main_window.on_error
2019-09-03 19:19:58 +02:00
SomberNight
bb2c3475cc
qt main_window: fix receive_at, rm dead code
2019-09-03 18:56:09 +02:00
SomberNight
8cd8c6612d
hw wallets: fix "show address" functionality in qt receive tab
2019-09-03 18:37:48 +02:00
SomberNight
ff94240139
qt receive tab: fix on-chain pay.requests without amount
2019-09-03 18:33:49 +02:00
SomberNight
c3504cec94
follow-up a4b24df4bb
2019-09-03 17:53:11 +02:00
SomberNight
073a09f926
wallet/keystore: small inheritance clean-up
2019-09-03 16:24:05 +02:00
ThomasV
a4b24df4bb
fix json error in listrequests
2019-09-03 14:51:07 +02:00
ThomasV
2801539087
fix create_menu error #5609
2019-09-03 14:50:34 +02:00
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
...
as it seems every consumer wants to know this and has its own hacks to
figure it out
2019-09-03 14:34:10 +02:00
SomberNight
ac329797e0
wallet.add_hw_info: minor clean-up
2019-09-03 14:20:00 +02:00
SomberNight
fd70b806de
(trivial) wine build: rm keys in Dockerfile
2019-09-03 14:18:56 +02:00
SomberNight
3d7cb935ff
appimage: don't rm jsonschema-*.dist-info as pkg needs it
2019-09-02 19:21:53 +02:00
ThomasV
7f870f5e09
replace daemon 'start' subdommand with -d
2019-09-02 19:04:08 +02:00
ThomasV
241a37d12d
Merge pull request #5253 from AbdussamadA/update-utxo-list-label
...
Update utxo list when label is changed on history list
2019-09-02 18:38:45 +02:00
ThomasV
d5691129bb
Merge pull request #5604 from MrNaif2018/master
...
Fix for onchain_history summary building
2019-09-02 18:35:23 +02:00
SomberNight
74366f5cce
android build: persist gradle datadir
...
avoids re-downloading hundreds of MB of data on every run
2019-09-02 17:32:48 +02:00
SomberNight
dfa345defc
only build one android apk on Travis (take 3...)
...
follow-up 8404e07061
2019-09-02 17:03:29 +02:00
ThomasV
a50f935aec
Restructure invoices and requests (WIP)
...
- Terminology: use 'invoices' for outgoing payments, 'requests' for incoming payments
- At the GUI level, try to handle invoices in a generic way.
- Display ongoing payments in send tab.
2019-09-02 15:35:44 +02:00
MrNaif2018
1dab0aa719
Fix for onchain_history summary building
2019-09-02 16:24:08 +03:00
SomberNight
3902d774f7
(trivial) travis: move flake8 tests to first stage
2019-09-01 20:18:09 +02:00
SomberNight
8404e07061
only build one android apk on Travis
...
follow-up 0333632eb0
2019-09-01 20:05:40 +02:00
SomberNight
0534f937ab
local jsonrpc: log exceptions daemon-side
2019-09-01 18:23:01 +02:00
SomberNight
eb5033dfc6
commands: add feerate param to payto/paytomany
2019-09-01 17:52:02 +02:00
SomberNight
0333632eb0
follow-up prev: only build one apk on Travis
2019-09-01 15:49:50 +02:00
SomberNight
54d468f457
android apk: build two apks. ARMv7 and ARMv8
2019-09-01 15:38:26 +02:00
SomberNight
75afd06ca3
android build: don't download Apache ANT on every build
2019-08-31 19:08:41 +02:00
SomberNight
98c8c2127c
android build: update kivy, p4a, buildozer
...
- also merge https://github.com/kivy/buildozer/pull/957 as prereq for
building multiple apks (one per arch)
- and custom buildozer commit to put target arch into apk name
2019-08-31 17:06:02 +02:00
ThomasV
b99a71d1b3
kivy: call register_callback only from main_window. Display CTN in channel details.
2019-08-31 10:13:20 +02:00
ThomasV
e79253b5e0
Syntax change: Require --offline to run commands without a daemon.
...
That makes the syntax less ambiguous. It also makes it possible to
implement a CLI that does not import all the electrum modules.
2019-08-31 09:24:00 +02:00
ThomasV
c67fb88e58
remove redundant 'stop' in regtest setUp (should run a bit faster)
2019-08-31 08:49:31 +02:00
ThomasV
0702338912
main script: rm init_daemon (dead code), call sys_exit in init_cmdline
2019-08-31 08:32:06 +02:00
SomberNight
936d1e0a24
pyinstaller binaries: include files needed by new jsonrpc libs
...
fixes #5599
2019-08-30 21:15:47 +02:00
SomberNight
956bd3baaf
lnpeer: make per-peer TaskGroup a field (as for interfaces), and use it
...
lnpeer (and interface) response-handling-code should not run in the
network main_taskgroup as the remote could force an exception
to be raised and that would kill the whole network instead of just the peer
2019-08-30 19:51:17 +02:00
SomberNight
9e57a59615
network: handle main_taskgroup dying better. passthrough CancelledError
...
Previously if a task running in the main_taskgroup raised,
main_taskgroup might have never finished as fx.run (another task running
in main_taskgroup) could not be cancelled (it was swallowing the CancelledError).
Need to be careful with catching all Exceptions or BaseExceptions,
as that might result in a coroutine not being cancellable.
Note that from python 3.8 onwards, CancelledError will inherit from BaseException
instead of Exception, so catching all Exceptions is somewhat less horrible
but this will only really matter if we raise the min py version to 3.8...
Really, all "except BaseException" lines are suspect and at least should be
considered for replacement with "except Exception".
-----
regarding fx.run not being cancellable before, and relevant lines, see:
6197cfbb3b/electrum/network.py (L1171)
0decdffce2/aiorpcx/curio.py (L242)
0decdffce2/aiorpcx/curio.py (L199)
0decdffce2/aiorpcx/curio.py (L208)
0decdffce2/aiorpcx/curio.py (L218)
0decdffce2/aiorpcx/curio.py (L221)
6197cfbb3b/electrum/daemon.py (L194)
6197cfbb3b/electrum/daemon.py (L203)
6197cfbb3b/electrum/exchange_rate.py (L507)
6197cfbb3b/electrum/exchange_rate.py (L79)
2019-08-30 19:46:25 +02:00
ThomasV
6197cfbb3b
Revert "Remove early return in create_sweeptxs_for_our_ctx."
...
This reverts commit d0cfb3ae12 .
2019-08-30 17:40:46 +02:00
ThomasV
3e8080b669
test_breach_with_spent_htlc: do not overwrite default_wallet, load toxic_wallet instead
2019-08-30 17:40:09 +02:00
ThomasV
10e186c1d3
revert ed086934e5
...
(this does not work well with travis)
2019-08-30 15:58:38 +02:00
ThomasV
6f333bd86d
make regtests more robust
2019-08-30 15:18:04 +02:00
ThomasV
ed086934e5
In 'daemon start', do not return until the daemon can be reached
2019-08-30 15:15:30 +02:00
ThomasV
5ec1db4d51
Ignore exceptions raised in lnworker.on_network_update.
...
Exception raised there may cancel the network's main taskgroup.
2019-08-30 12:37:34 +02:00
ThomasV
d0cfb3ae12
Remove early return in create_sweeptxs_for_our_ctx.
...
- This was added because we did not store the complete htlc history.
- It makes the result dependent on the current channel state
- That creates a race condition in sweep_info, because the result is cached.
- As a result, test_breach_with_spent_htlc was randomly failing.
2019-08-30 09:11:54 +02:00
SomberNight
5f817770af
android build: make sure to use correct pycryptodomex
...
note: buildozer casts all actual paths to lowercase but not the list of excluded paths...
see 182d13f102/buildozer/__init__.py (L775)
2019-08-29 18:07:37 +02:00
EagleTM
01f582cc14
Remove electrumx.ml because of phishing ( #5596 )
2019-08-29 12:37:33 +00:00
SomberNight
f403735191
lnpeer: reestablish_channel - don't replay unacked msgs they alrdy have
...
e.g. Alice sends upd1, upd2, upd3, commitment_signed, upd4, upd5.
Bob receives all of these; and sends a revoke_and_ack but there is
a disconnect before Alice receives the revoke_and_ack.
During reestablish, if Bob claims to have received the commitment_signed,
Alice must not replay the msgs before that; but she should replay upd4 and upd5.
2019-08-29 12:37:25 +02:00
ThomasV
2583decc64
Merge pull request #5593 from wakiyamap/patch-1
...
Fix travis error
2019-08-29 10:20:34 +02:00
Jin Eguchi
523de5782b
Fix travis error
2019-08-29 04:32:32 +09:00
SomberNight
2ee881f40a
qt channels list: fields should not be editable
2019-08-28 16:54:51 +02:00
SomberNight
db8e6cabb4
bip70 payreq: catch TimeoutError to avoid hanging "please wait" dialog
...
related #5337
2019-08-27 18:03:01 +02:00
ThomasV
3076eb75ea
make parsing lightning qr codes more robust
2019-08-27 17:12:43 +02:00
ThomasV
31a18f83f1
(trivial) fix variable name
2019-08-27 13:35:03 +02:00
ThomasV
7866caf2a7
minor fix: ensure request amount is not None
2019-08-26 16:59:38 +02:00
ThomasV
cf02e32f20
Merge pull request #5537 from xaya/test-verify-header
...
Unit tests for Blockchain.verify_header
2019-08-26 15:42:15 +02:00
ThomasV
58177c5bf3
Travis: run regtests in separate job
2019-08-26 13:52:55 +02:00
ThomasV
fcfbc937bc
buildozer: use log_level=1
2019-08-26 11:35:17 +02:00
ThomasV
d766ded8d4
Merge pull request #5584 from JeremyRand/lnaddr-bech32
...
lnaddr: Pull in Bech32 and Base58 prefixes from constants
2019-08-25 18:58:47 +02:00
JeremyRand
8be94a9919
lnaddr: Pull in Bech32 and Base58 prefixes from constants
...
Fixes https://github.com/spesmilo/electrum/issues/5581
2019-08-25 13:15:13 +00:00
ThomasV
2b52ee26e6
store qt-console-history in wallet file ( fix #5563 )
2019-08-25 11:39:11 +02:00
ThomasV
95383a5820
Merge pull request #5582 from JeremyRand/test-lnchannel-outputs
...
Use NamedTuple notation for TxOutput in test_lnchannel
2019-08-25 10:17:54 +02:00
ThomasV
2944ae1b2f
Merge pull request #5583 from JeremyRand/test-lnrouter-rev-genesis-bytes
...
test_lnrouter: Pull in chain_hash from constants
2019-08-25 10:17:06 +02:00
JeremyRand
032810dace
test_lnrouter: Pull in chain_hash from constants
2019-08-25 07:19:36 +00:00
JeremyRand
334d3f2818
Use NamedTuple notation for TxOutput in test_lnchannel
...
This makes the code more resilient in case additional members are added
to TxOutput later.
2019-08-25 06:51:31 +00:00
ThomasV
ab5a02ba50
kivy: remove hidden state in RefLabel, use it for seed and private keys
2019-08-23 15:46:58 +02:00
ThomasV
e9c32bad19
kivy: remove context menus, cleanup unused files
2019-08-23 12:15:42 +02:00
ThomasV
587f8aa487
Kivy GUI improvements:
...
- create unique instances of channels_dialog and addresses_dialog
- display and refresh balances in channels_dialog
- improve formatting of tx history
- repurpose left button in receive_tab
2019-08-22 19:04:32 +02:00
ThomasV
8010123c08
Display and refresh the status of incoming payment requests:
...
- All requests have an expiration date
- Paid requests are automatically removed from the list
- Unpaid, unconfirmed and expired requests are displayed
- Fix a bug in get_payment_status, conf was off by one
2019-08-22 06:00:45 +02:00
ThomasV
336cf81a6d
kivy: add expiration button to receive screen
2019-08-20 18:20:54 +02:00
ThomasV
27a9d02b8c
kivy: update receive screen after adding request
2019-08-20 16:07:40 +02:00
ThomasV
65cf0ebce8
lnpeer, minor fixes:
...
- pass orphaned_ids to lnworker.add_new_ids
- fix enumeration of get_unacked_local_updates()
2019-08-20 13:27:09 +02:00
ThomasV
dd22cb6dff
kivy: minor fixes
2019-08-20 09:03:12 +02:00
ThomasV
246cda2928
fix Flake8 tests
2019-08-20 09:03:12 +02:00
ThomasV
a3bff7476c
run freeze_packages
2019-08-20 09:03:12 +02:00
ThomasV
9cfeadea70
Turn daemon subcommands into RPCs
2019-08-20 09:03:12 +02:00
ThomasV
4397767a5e
minor fix
2019-08-20 09:03:12 +02:00
ThomasV
2e1829bc24
remove jsonrpclib dependency
2019-08-20 09:03:12 +02:00
ThomasV
54257cbcca
Rewrite JsonRPC requests using asyncio.
...
- commands are async
- the asyncio loop is started and stopped from the main script
- the daemon's main loop runs in the main thread
- use jsonrpcserver and jsonrpcclient instead of jsonrpclib
2019-08-20 09:03:12 +02:00
SomberNight
fa5302bcfb
(trivial) fix type annotation
2019-08-20 09:03:12 +02:00
SomberNight
bce74717a6
lnpeer: in onion errors, handle channel updates both with and w/o type
2019-08-20 09:03:12 +02:00
SomberNight
beeb81e179
lnpeer: use correct failure codes in _maybe_forward_htlc
2019-08-20 09:03:12 +02:00
SomberNight
e54f0fbafa
do not raise BaseException
2019-08-20 09:03:12 +02:00
SomberNight
d955285808
lnrouter/channeldb: small import clean-up
2019-08-20 09:03:12 +02:00
SomberNight
47ee02569a
lnpeer: send own outgoing channel updates to remote peer
2019-08-20 09:03:12 +02:00
SomberNight
f0588846d5
channeldb: also store "message_flags" field for channel updates
...
this is a breaking change for the db format.
As in comment in diff,
"It would make more sense to store the raw gossip messages in the db."
2019-08-20 09:03:12 +02:00
SomberNight
d229bb4e4d
lnpeer: restore "temp save orphan channel updates" functionality
...
needed to handle race where remote might send chan_upd too soon
(before we save the short channel id for the channel after it reaches funding locked)
2019-08-20 09:03:12 +02:00
SomberNight
ba431495db
lnworker: fix silent TypeError in _calc_routing_hints_for_invoice
2019-08-20 09:03:12 +02:00
SomberNight
02681c6664
tests: some regtest tests need to mine more blocks to expire CLTVs
...
as lnutil.MIN_FINAL_CLTV_EXPIRY_FOR_INVOICE was recently bumped
2019-08-20 09:03:12 +02:00
SomberNight
a9295e495c
tests: regtest.sh now uses consistent indentation
2019-08-20 09:03:12 +02:00
SomberNight
6b1810f8dc
commands.py: fix type of "timeout" arg
...
was str by default
2019-08-20 09:03:12 +02:00
SomberNight
159fe04daf
lnpeer: on_channel_open should not fail on server error
2019-08-20 09:03:12 +02:00
ThomasV
e5286f7598
minor fix: always initialize Commands.lnworker
2019-08-20 09:03:12 +02:00
ThomasV
5e0427392f
Daemon: Replace get_server with request.
...
This function performs a single RPC, and may raise a DaemonNotRunning exception.
2019-08-20 09:03:12 +02:00
ThomasV
28b1569f28
(trivial) fix getbalance
2019-08-20 09:03:12 +02:00
ThomasV
b81feb6550
daemon: simplify get_fd_or_server
2019-08-20 09:03:12 +02:00
SomberNight
a9239bd40f
lnpeer: shutdown should wait until no HTLCs remain
...
in either ctx
2019-08-20 09:03:12 +02:00
SomberNight
2e38bcf416
lnpeer: failed htlc error handling ignored length of channel_update
2019-08-20 09:03:12 +02:00
SomberNight
d2d4d19fcb
lnpeer: add a few sanity checks to payment-forwarding (and related)
2019-08-20 09:03:12 +02:00
SomberNight
0973b86925
lnworker: rework "is_dangerous"
...
"Should channel be closed due to expiring htlcs?"
2019-08-20 09:03:12 +02:00
SomberNight
ce54b5411e
lnhtlc: htlcs_by_direction now returns dict keyed by htlc_id
2019-08-20 09:03:12 +02:00
ThomasV
8e2ebddc0b
add jsonrpcserver/jsonrpcclient to requirements
2019-08-20 09:03:12 +02:00
ThomasV
b2f61bdc06
use aiohttp + jsonrpcserver in watchtower
2019-08-20 09:03:12 +02:00
ThomasV
de29fe6930
remove unused import
2019-08-20 09:03:12 +02:00
SomberNight
8ad25b3a52
lnpeer: make sure forwarding is disabled by default
2019-08-20 09:03:12 +02:00
SomberNight
a27b03be6d
lnhtlc: local update raw messages must not be deleted before acked
...
In recv_rev() previously all unacked_local_updates were deleted
as it was assumed that all of them have been acked at that point by
the revoke_and_ack itself. However this is not necessarily the case:
see new test case.
renamed log['unacked_local_updates'] to log['unacked_local_updates2']
to avoid breaking existing wallet files
2019-08-20 09:03:12 +02:00
SomberNight
4fc9f243f7
lnpeer: reestablish_channel - always replay unacked local updates
...
Even if we haven't signed them yet (did not send commitment_signed).
Alternatively, if they are not yet signed, we could discard them here,
like we do already for remote updates above (chan.hm.discard_unsigned_remote_updates).
One of these two options must be done, and before this commit we were not doing either.
2019-08-20 09:03:12 +02:00
ThomasV
98a1c9268a
qt: do not show paid requests
2019-08-20 09:03:12 +02:00
ThomasV
bd5c83e906
fix race condition with channel_timestamps
2019-08-20 09:03:12 +02:00
ThomasV
b493219829
require data loss protect
2019-08-20 09:03:12 +02:00
ThomasV
9f8e2c689e
test funding_txn_minimum_depth, show it in GUI
2019-08-20 09:03:12 +02:00
ThomasV
bbec1dceda
lnpeer: fix and simplify tests in maybe_send_commitment
2019-08-20 09:03:12 +02:00
ThomasV
39bae1c7cf
channel_db: load_data should load node_info
2019-08-20 09:03:12 +02:00
ThomasV
46c2d7821f
kivy: show pending requests in receive tab instead of dialog
2019-08-20 09:03:12 +02:00
ThomasV
f8038d024b
kivy: lnpay_thread
2019-08-20 09:03:12 +02:00
ThomasV
9e78fdbf71
qt gui: simplify signals
2019-08-20 09:03:12 +02:00
ThomasV
e584a7451c
simplify tx history: do not use separate columns for lightning
2019-08-20 09:03:12 +02:00
SomberNight
80c52d4808
simple_config.estimate_fee: make sure method never fails
...
code in lnsweep was already assuming this
2019-08-20 09:03:12 +02:00
SomberNight
7f1b456b93
lnhtlc.discard_unsigned_remote_updates: fix edge case
2019-08-20 09:03:12 +02:00
SomberNight
bb63bd98fb
lnpeer: should not mark channel as OPEN if reestablish did not complete
2019-08-20 09:03:12 +02:00
SomberNight
940fc86749
lnpeer: reestablish_channel - fix data_loss_protect edge case
2019-08-20 09:03:12 +02:00
SomberNight
107f271e58
move all ctn book-keeping to lnhtlc (from lnchannel)
2019-08-20 09:03:12 +02:00
SomberNight
44761972cb
lnchannel: ctx output-ordering: identical htlcs are ordered by CLTV
2019-08-20 09:03:12 +02:00
SomberNight
b1f606eaed
lnchannel: start using "latest" and "next" instead of "current" and "pending"
...
"current" used to be "oldest_unrevoked"; and pending was "oldest_unrevoked + 1"
but this was very confusing...
so now we have "oldest_unrevoked", "latest", and "next"
where "next" is "latest + 1"
"oldest_unrevoked" and "latest" are either the same or are offset by 1
(but caller should know which one they need)
rm "got_sig_for_next" - it was a redundant sanity check, that really
just complicated things
rm "local_commitment", "remote_commitment", "set_local_commitment",
"set_remote_commitment" - just use "get_latest_commitment" instead
2019-08-20 09:03:12 +02:00
SomberNight
e32807d29d
lnworker: only reestablish channels after on-chain state is synchronized
2019-08-20 09:03:12 +02:00
SomberNight
944e4f0ba0
implement data_loss_protect
...
so that we can spend their_ctx_to_remote even when we lost our state
but have an old backup
2019-08-20 09:03:12 +02:00
SomberNight
fdf8d8609b
lnpeer: make feature-bit testing easier
...
so that we can always test like: self.localfeatures & FEATURE_BIT_OPT
2019-08-20 09:03:12 +02:00
SomberNight
014b921393
lnpeer: reestablish_channel - replay un-acked local updates
...
Replay un-acked local updates (including commitment_signed) byte-for-byte.
If we have sent them a commitment signature that they "lost" (due to disconnect),
we need to make sure we replay the same local updates, as otherwise they could
end up with two (or more) signed valid commitment transactions at the same ctn.
Multiple valid ctxs at the same ctn is a major headache for pre-signing spending txns,
e.g. for watchtowers, hence we must ensure these ctxs coincide.
2019-08-20 09:03:12 +02:00
SomberNight
e81ae1921b
lnpeer: reestablish_channel - discard unsigned remote updates
2019-08-20 09:03:12 +02:00
SomberNight
c046f2cc1c
lnhtlc: move 'next_htlc_id' from ChannelConfig to lnhtlc log
2019-08-20 09:03:12 +02:00
SomberNight
c8b19aec2a
lnpeer: make reestablish_channel saner
...
clear up expectations about ctns
2019-08-20 09:03:12 +02:00
SomberNight
a3fd6b3ce8
lnhtlc: rename ctx_pending to revack_pending, and persist it
2019-08-20 09:03:12 +02:00
SomberNight
cd4268c521
lnworker: small clean-up of short_channel_id format
2019-08-20 09:03:12 +02:00
SomberNight
bdbc662a36
lnpeer: channel_reestablished is now a queue (instead of future)
2019-08-20 09:03:12 +02:00
SomberNight
0d84873a75
lnchannel: trivial clean-up
2019-08-20 09:03:12 +02:00
ThomasV
57ec8f51c8
lnpay: check whether invoice has been paid
2019-08-20 09:03:12 +02:00
ThomasV
4b2336304f
kivy fix: get_latest_feerate
2019-08-20 09:03:12 +02:00
ThomasV
f9a2e7eeb4
lnworker.get_invoice_status: test if invoice is expired
2019-08-20 09:03:12 +02:00
ThomasV
cac1e87286
use aiohttp+jsonrpcclient to sync with remote watchtower
2019-08-20 09:03:12 +02:00
ThomasV
740381e993
fix: remove unused parameter to add_sweep_tx
2019-08-20 09:03:12 +02:00
ThomasV
fa3eefa479
refactor a few lnchannel methods
2019-08-20 09:03:12 +02:00
ThomasV
cd7ed4c59c
fix: constraints.feerate -> get_latest_feerate
2019-08-20 09:03:12 +02:00
ThomasV
f7c05f2602
Synchronize watchtower asynchronously:
...
- remove remote_commitment_to_be_revoked
- pass old ctns to lnsweep.create_sweeptxs_for_watchtower
- store the ctn of sweeptxs in sweepStore database
- request the highest ctn from sweepstore using get_ctn
- send sweeptxs asynchronously in LNWallet.sync_with_watchtower
2019-08-20 09:03:12 +02:00
SomberNight
f060e53912
(trivial) fix type annotation
2019-08-20 09:03:12 +02:00
SomberNight
087994e39a
lnchannel: move fee update logic to lnhtlc (and hopefully fix it)
2019-08-20 09:03:12 +02:00
ThomasV
3d7f7dfc82
revamp fee updates (draft)
2019-08-20 09:03:12 +02:00
SomberNight
7431aac5cd
lnhtlc: (fix) was locking in too many updates during commit/revoke
2019-08-20 09:03:12 +02:00
SomberNight
4ccfa39fdd
cli: fix add_peer cmd
2019-08-20 09:03:12 +02:00
ThomasV
9045d7b293
cleanup revoke_current_commitment
2019-08-20 09:03:12 +02:00
ThomasV
e43a3bc63a
follow-up prev commit: pass is_mine to _edge_cost
2019-08-20 09:03:12 +02:00
ThomasV
b55f9e9e6a
Do not route through channels for which we did not receive
...
both updates, because this often means one of the nodes is
offline.
2019-08-20 09:03:12 +02:00
ThomasV
30e942bead
fix: delete from channel_db
2019-08-20 09:03:12 +02:00
ThomasV
32fcad5bc3
channel_db: update channels_for_node when removing channel
2019-08-20 09:03:12 +02:00
ThomasV
2be68ac4d2
Use one LNWatcher instance per wallet
2019-08-20 09:03:12 +02:00
ThomasV
4d76e84218
improve regtest.sh with wait functions
2019-08-20 09:03:12 +02:00
ThomasV
6b90d501ab
fix type: list
2019-08-20 09:03:12 +02:00
ThomasV
94fe28b576
regtest: remove cost limit
2019-08-20 09:03:12 +02:00
ThomasV
c7b9bdc5f5
lnwatcher: wait until lnwatcher is fully synchronized before check_onchain_situation
2019-08-20 09:03:12 +02:00
ThomasV
a8ce8109be
Perform breach remedy without sweepstore:
...
- add functions to lnsweep
- lnworker: analyze candidate ctx and htlc_tx
- watchtower will be optional
- add test for breach remedy with spent htlcs
- save tx name as label
2019-08-20 09:03:12 +02:00
ThomasV
238f3c949c
get rid of sql_alchemy
2019-08-20 09:03:12 +02:00
ThomasV
0eab1692d6
Do not store message payloads in channel db.
...
Use single primary key for addresses.
2019-08-20 09:03:12 +02:00
ThomasV
f2d58d0e3f
optimize channel_db:
...
- use python objects mirrored by sql database
- write sql to file asynchronously
- the sql decorator is awaited in sweepstore, not in channel_db
2019-08-20 09:03:12 +02:00
ThomasV
180f6d34be
separate channel_db module
2019-08-20 09:03:12 +02:00
ThomasV
06b5299b0f
comment out convert, add logging statement
2019-08-20 09:03:12 +02:00
ThomasV
a54cb30cf3
kivy: simplify open_channel dialog
2019-08-20 09:03:12 +02:00
SomberNight
c15267e1f6
pycryptodomex for android
2019-08-20 09:03:12 +02:00
ThomasV
115113f492
remove expensive sql request, python set comparison is faster
2019-08-20 09:03:12 +02:00
ThomasV
af7d7e883c
Rework wallet history methods:
...
- wallet.get_full_history returns onchain and lightning
- capital gains are returned by get_detailed_history
- display lightning history in kivy
- command line: separate lightning and onchain history
2019-08-20 09:03:12 +02:00
SomberNight
7e8be3d2e7
lnpeer: some exception handling clean up
...
main_loop should dump traces of unexpected exceptions to log.
Coroutines/functions invoked inside main_loop should simply propagate it
up the chain.
Typical exceptions are handled in handle_disconnect without dumping the trace.
2019-08-20 09:03:12 +02:00
SomberNight
efc8948c00
lnworker: set DATA_LOSS_PROTECT flag for LNGossip too
...
otherwise peers disconnect
2019-08-20 09:03:12 +02:00
SomberNight
e6fc8868b1
qt channels list: add "short channel id" column
2019-08-20 09:03:12 +02:00
SomberNight
aa4027298f
do not "import *"
2019-08-20 09:03:12 +02:00
SomberNight
3413eb05b9
qt ChannelsList: some clean-up
2019-08-20 09:03:12 +02:00
SomberNight
5e3e3e41a1
qt receive tab: fix update_receive_address_styling
2019-08-20 09:03:12 +02:00
SomberNight
63217c1ca7
qt main window: hide "Channels" tab if lightning is disabled
2019-08-20 09:03:12 +02:00
ThomasV
70cd29f9e1
GUI refactoring for Kivy and lightning.
...
This also touches Qt and wallet code.
2019-08-20 09:03:12 +02:00
ThomasV
1a23dcb8d5
display lightning payment attempts using signal
2019-08-20 09:03:12 +02:00
ThomasV
049857d528
on_revoke_and_ack: be robust to exceptions raised in lnwatcher
2019-08-20 09:03:12 +02:00
ThomasV
dff1822c37
fix watchtower: sweep_tx must not be None
2019-08-20 09:03:12 +02:00
ThomasV
d477e3489f
lnworker: fix reestablish_peer_for_given_channel by passing chan explicitly
2019-08-20 09:03:12 +02:00
ThomasV
0f00f4f655
fix encode_msg: optional fields were not sent
2019-08-20 09:03:12 +02:00
ThomasV
67f1ade798
send data_loss_protect fields if we support it
2019-08-20 09:03:12 +02:00
ThomasV
9eddb9844c
on_commitment_signed: distinguish between exceptions
2019-08-20 09:03:11 +02:00
ThomasV
0913194a53
qt: add clear button to receive tab, show invoice right after it is added
2019-08-20 09:03:11 +02:00
ThomasV
234591624e
request_lists: remove non-sense
2019-08-20 09:03:11 +02:00
ThomasV
b8d908d63e
lnworker improvements:
...
- enable option data_loss_protect
- separate add_peer from open_channel
- display exceptions raised in open_channel
2019-08-20 09:03:11 +02:00
ThomasV
d2dfa8c558
regtest: use while loops instead of fine-tuned delays
2019-08-20 09:03:11 +02:00
ThomasV
d9b041e64d
encapsulate detect_who_closed in channel
2019-08-20 09:03:11 +02:00
ThomasV
24cc3599c7
lnworker: catch exceptions raised by add_future_tx
2019-08-20 09:03:11 +02:00
ThomasV
740ef09883
simplify_lnsweep
2019-08-20 09:03:11 +02:00
ThomasV
9abbd077a5
lnhtlc: use boolean instead of int in ctn_latest
2019-08-20 09:03:11 +02:00
SomberNight
69bffac86a
lnhtlc: fix adding htlc between sending commitment_signed and receiving revoke_and_ack
2019-08-20 09:03:11 +02:00
ThomasV
50479086b5
raise PaymentFailure in case of timeout (follow-up previous commit)
2019-08-20 09:03:11 +02:00
ThomasV
dbe8b75659
move lnpay attempts logic to lnworker.pay
2019-08-20 09:03:11 +02:00
ThomasV
3349e941de
lnsweep: minor fix
2019-08-20 09:03:11 +02:00
ThomasV
81d340b19c
lnworker: do not create sweep transactions before outputs can be redeemed
2019-08-20 09:03:11 +02:00
ThomasV
2b04cb3bc4
fix tests broken by previous commit
2019-08-20 09:03:11 +02:00
ThomasV
8d99fe8243
Let lnworker sweep HTLC outputs after breach, instead of lnwatcher
2019-08-20 09:03:11 +02:00
ThomasV
3dacc525e6
on_network_update: check if channel is closed
2019-08-20 09:03:11 +02:00
ThomasV
7be4cdaf18
redeem htlcs:
...
- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
- add test for breach remedy with unsettled htlcs
- add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
so that we can read intermediate commitment tx in regtest
2019-08-20 09:03:11 +02:00
ThomasV
7418bd4552
lnsweep: simplify a few methods
2019-08-20 09:03:11 +02:00
ThomasV
6bbdbf7596
rework on_channel_closed in LNWorker:
...
- use detect_who_closed; this allows us to redeem to_remote of breach ctx
- do not redeem to_local of breach ctx, because it is redundant with lnwatcher
- rename a few methods
2019-08-20 09:03:11 +02:00
SomberNight
930d21c31c
channel close handling: detect situation based on output addresses
...
WIP...
2019-08-20 09:03:11 +02:00
SomberNight
acbb458ef7
set default to_self_delay to 1 day
2019-08-20 09:03:11 +02:00
SomberNight
9a0ba7fa79
ChannelDB: trivial bugfix for get_channels_for_node
2019-08-20 09:03:11 +02:00
ThomasV
c38afe8b07
add to_remote to breach test
2019-08-20 09:03:11 +02:00
ThomasV
765114faf7
add function new_blocks to simplify regtests
2019-08-20 09:03:11 +02:00
SomberNight
18a2a169c7
qt ChannelDetails: fix show_tx
2019-08-20 09:03:11 +02:00
SomberNight
6d8c605307
move lnworker.first_block to constants
2019-08-20 09:03:11 +02:00
SomberNight
a0764c017c
lnpeer: process gossip in chunks
2019-08-20 09:03:11 +02:00
SomberNight
62f58c18fe
ChannelDB.on_node_announcement: some speed-up
...
(e.g. for 100 node anns, was ~5 seconds, now 0.7 sec; so still slow)
2019-08-20 09:03:11 +02:00
SomberNight
cffb89002c
fix ChannelDB.compare_channels: was raising "too many SQL variables"
...
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) too many SQL variables
2019-08-20 09:03:11 +02:00
SomberNight
60cd885f74
tests/regtest: stop using "bitcoin-cli generate" (deprecated)
2019-08-20 09:03:11 +02:00
ThomasV
84c6a464e8
gui: channel_details minor fix
2019-08-20 09:03:11 +02:00
ThomasV
a70441f0f1
minor fixes: remove_channel
2019-08-20 09:03:11 +02:00
ThomasV
6d9ef29690
redo LNWorker pay:
...
- wait until htlc has been fulfilled
- raise if htlc is not fulfilled
- return boolean success
- try multiple paths in GUI
2019-08-20 09:03:11 +02:00
ThomasV
669b84fbd6
gui channels_list fixes
2019-08-20 09:03:11 +02:00
ThomasV
32e517f407
improve lightning_dialog GUI settings
2019-08-20 09:03:11 +02:00
ThomasV
15eecab978
update electrumx starting script
2019-08-20 09:03:11 +02:00
ThomasV
a5570d94f3
channel blacklist: minor fix
2019-08-20 09:03:11 +02:00
ThomasV
fed6c96693
add option to remove channel after it has been closed
2019-08-20 09:03:11 +02:00
ThomasV
3c0df28c98
do not include 'force_closing' in channel states, because it is not part of the peer protocol
2019-08-20 09:03:11 +02:00
ThomasV
0acd0c23d3
fix: key must be unique (sql)
2019-08-20 09:03:11 +02:00
ThomasV
d30307b29e
gui: improve display of lightning status
2019-08-20 09:03:11 +02:00
ThomasV
eb4e6bb0de
improve filter_channel_updates
...
blacklist channels that do not really get updated
2019-08-20 09:03:11 +02:00
ThomasV
f4b3d7627d
query_short_channel_ids: use Event instead of Lock
2019-08-20 09:03:11 +02:00
ThomasV
d30e894aaf
fix: add_channel_update
2019-08-20 09:03:11 +02:00
ThomasV
b055eeace2
prune channels older than two weeks from database
2019-08-20 09:03:11 +02:00
ThomasV
522ce5bb9f
verify channel updates in peer's TaskGroup
2019-08-20 09:03:11 +02:00
ThomasV
308dc6aa6b
use a single queue for gossip messages, so that they are processed in the correct order
2019-08-20 09:03:11 +02:00
ThomasV
e68f318b12
verify node and channel announcements before entering sql lock
2019-08-20 09:03:11 +02:00
SomberNight
fbafc77f01
lnpeer query_short_channel_ids: BOLT-07 says ids must be sorted
...
this is why most remote peers were disconnecting upon receiving this msg
2019-08-20 09:03:11 +02:00
SomberNight
afc5717cf0
lnpeer reply_channel_range: handle lnd
2019-08-20 09:03:11 +02:00
ThomasV
0e42fd9f17
parallelize short_channel_id requests
2019-08-20 09:03:11 +02:00
ThomasV
1011245c5e
LNGossip: sync channel db using query_channel_range
2019-08-20 09:03:11 +02:00
ThomasV
95376226e8
save lightning invoice descriptions as labels and allow user to edit them
2019-08-20 09:03:11 +02:00
ThomasV
b1f8c42424
post-rebase fix
2019-08-20 09:03:11 +02:00
ThomasV
f5c58c5e19
lightning network dialog
2019-08-20 09:03:11 +02:00
ThomasV
db60634774
use config instead of watchtower_window to decide if we close the app
2019-08-20 09:03:11 +02:00
ThomasV
e53ecb9b77
add labels to lightning history
2019-08-20 09:03:11 +02:00
ThomasV
c4081284bd
lightning: GUI improvements
2019-08-20 09:03:11 +02:00
ThomasV
670424f080
get_payments: do not include failed payments
2019-08-20 09:03:11 +02:00
ThomasV
2ec82433b4
wallet: add lnworker in constructor for CLI
2019-08-20 09:03:11 +02:00
ThomasV
446a8b0dd9
fix column names
2019-08-20 09:03:11 +02:00
ThomasV
31684abb51
do not SPV channel announcements; this is too resource intensive
2019-08-20 09:03:11 +02:00
ThomasV
d134937269
update regexp syntax
2019-08-20 09:03:11 +02:00
ThomasV
746dd725c6
follow-up previous
2019-08-20 09:03:11 +02:00
ThomasV
842fff832f
enable lightning through command line option
2019-08-20 09:03:11 +02:00
ThomasV
9a3a63d18e
logging (follow-up rebase)
2019-08-20 09:03:11 +02:00
SomberNight
e4ed15f683
fix tests
2019-08-20 09:03:11 +02:00
SomberNight
cc57da704b
logging: adapt lightning branch to logging changes
2019-08-20 09:03:11 +02:00
ThomasV
730be17aba
Use separate lightning nodes for gossip and channel operations.
2019-08-20 09:03:11 +02:00
ThomasV
12743bda93
remove test_require_data_loss_protect
2019-08-20 09:03:11 +02:00
ThomasV
34f22e6681
lnrouter: load data before finding path
2019-08-20 09:03:11 +02:00
ThomasV
dac686b11d
minor fix
2019-08-20 09:03:11 +02:00
SomberNight
fda6fb6521
lnhtlc: handle fails asymmetrically
2019-08-20 09:03:11 +02:00
SomberNight
f47519bdf3
lnchan: make_commitment and balance (follow-up prev)
...
"balance(self, subject, ctn=None)" is underspecified.
whose balance? whose commitment transaction?
this lead to issues...
2019-08-20 09:03:11 +02:00
SomberNight
8632f027da
lnhtlc: small clean-up / docstrings
2019-08-20 09:03:11 +02:00
SomberNight
268f05c60c
lnhtlc: add type hints
2019-08-20 09:03:11 +02:00
ThomasV
796f199a5b
follow-up prev commit
2019-08-20 09:03:11 +02:00
ThomasV
a6469904ee
fix verify_sig_for_channel_update: use raw message
2019-08-20 09:03:11 +02:00
ThomasV
407114d3cc
lnpeer:
...
- disable option data_loss_protect
- disable query_short_channel_ids
- increase timeouts in pay
2019-08-20 09:03:11 +02:00
ThomasV
e2182f5846
lnwatcher fixes
2019-08-20 09:03:11 +02:00
ThomasV
f0ac81419c
increase timeout in open_channel
2019-08-20 09:03:11 +02:00
ThomasV
5eab60621d
lnpeer:
...
- send data_loss_protect fields with channel_reestablish
- close connection if we receive an unknown channel_reestablish
- log all exceptions that make us close a connection
- formatting
2019-08-20 09:03:11 +02:00
ThomasV
b76728d459
lnrouter: fix get_last_good_address: one_or_none -> all
2019-08-20 09:03:11 +02:00
ThomasV
9983578df0
lightning tx: remove amount from label
2019-08-20 09:03:11 +02:00
ThomasV
93e8d4f953
channel_db: fix timestamp_range, reduce verbosity
2019-08-20 09:03:11 +02:00
ThomasV
aa398993cf
lnrouter fixes:
...
- use gossip_queries_req instead of initial_routing_sync
- add connected nodes to recent peers only after successful init
- derive timestamp used with gossip_timestamp_filter from channel_db
- fix query_short_channel_ids:
1. channel IDs must be sorted with zlib
2. limit request to 100
3. do not abuse this to request node_announcements; it is fine not to have all nodes.
- fix get_recent_peers:
1. do not set last_connected_date to 'now' if we never connected a node
2. sql query was misconstructed and was returning only one peer
- populate FALLBACK_NODE_LIST_MAINNET with nodes that have the requested flags
2019-08-20 09:03:11 +02:00
ThomasV
e7888a50be
fix sql conflicts in lnrouter
2019-08-20 09:03:11 +02:00
ThomasV
eae8f1a139
gui: show only initialized peers
2019-08-20 09:03:11 +02:00
ThomasV
f5eb369fb7
lnpeer: spawn wait_for(self.initialized) to kill the TaskGroup if it times out
2019-08-20 09:03:11 +02:00
ThomasV
2c80996fbf
lnrouter: fix primary key conflict in Policy update
2019-08-20 09:03:11 +02:00
ThomasV
e7218d798d
add get_channel_ctx to CLI, for testing breaches
2019-08-20 09:03:11 +02:00
ThomasV
a698344136
cleanup tests that use regtest:
...
- separate setup from execution
- install bitcoind and electrumx in travis
- use the same framework for lnwatcher and forwarding
- make tests runnable locally
2019-08-20 09:03:11 +02:00
ThomasV
023d4026b9
fix local_index in channel _shutdown
2019-08-20 09:03:11 +02:00
ThomasV
3abe30e9d8
basic watchtower synchronization
2019-08-20 09:03:11 +02:00
ThomasV
c155293166
follow-up variable renaming
2019-08-20 09:03:11 +02:00
ThomasV
5148397a75
test forwarding
2019-08-20 09:03:11 +02:00
ThomasV
90c42c7f1b
fix icons in receive tab
2019-08-20 09:03:11 +02:00
ThomasV
ec97d623a5
force-close channel if unfulfilled htlc is close to cltv expiry
2019-08-20 09:03:11 +02:00
ThomasV
4dc6c6c82e
fix tests (follow up prev commit)
2019-08-20 09:03:11 +02:00
ThomasV
8d77a7ecd8
save timestamps in htlc log
2019-08-20 09:03:11 +02:00
ThomasV
ecd9508233
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
a7d37b72db
factorize channel opening code into chan.open_with_first_pcp
2019-08-20 09:03:11 +02:00
ThomasV
c3f6351922
simplify points, remove side-effect in reestablish_channel
2019-08-20 09:03:11 +02:00
ThomasV
b5fd27c64c
fix local/remote confusion in reestablish_channel
2019-08-20 09:03:11 +02:00
ThomasV
82491ff083
do not duplicate ctn in channel log and config
2019-08-20 09:03:11 +02:00
ThomasV
8d28188d24
lnhtlc: remove unused field in log
2019-08-20 09:03:11 +02:00
ThomasV
51466930f2
reestablish_peers_and_channels: spawn tasks in for loop
2019-08-20 09:03:11 +02:00
ThomasV
38f1436d78
post rebase fixes
2019-08-20 09:03:11 +02:00
ThomasV
b215d6c4b7
lnhtlc: rename ctnheights -> ctn
2019-08-20 09:03:11 +02:00
ThomasV
02d013421a
lnwatcher: store transactions as binary
2019-08-20 09:03:11 +02:00
ThomasV
d8e9a9a49e
create parent class for sql databases
2019-08-20 09:03:11 +02:00
ThomasV
b861e2e955
lnwatcher: save sweepstore in sqlite database
2019-08-20 09:03:11 +02:00
ThomasV
bfdf0a7e88
start asyncio loop in test_lnrouter and test_lnpeer
2019-08-20 09:03:11 +02:00
ThomasV
29afe52b4c
sqlite: do not use scoped_session
2019-08-20 09:03:11 +02:00
ThomasV
cab0f7d9e0
add sqlalchemy to requirements
2019-08-20 09:03:11 +02:00
ThomasV
436c313790
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
46aa5c1958
lnrouter: perform SQL requests in a separate thread. persist database.
2019-08-20 09:03:11 +02:00
ThomasV
9f188c087c
Flatten the structure of lnrouter, so that DBSession is not used outside of ChannelDB
2019-08-20 09:03:11 +02:00
Janus
95a2174789
sqlite in lnrouter: lnpeer: introduce _gossip_loop for gossip handling separated from message handling
2019-08-20 09:03:11 +02:00
Janus
3442e51fac
sqlite in lnrouter: remove useless InDB suffix
2019-08-20 09:03:11 +02:00
Janus
945e1dc4ee
sqlite in lnrouter: request missing channel_announcements and node_announcements
2019-08-20 09:03:11 +02:00
Janus
d2d67f1fe1
sqlite in lnrouter: avoid exceptions on shutdown
2019-08-20 09:03:11 +02:00
Janus
dd7c4b3bab
sqlite in lnrouter
2019-08-20 09:03:11 +02:00
ThomasV
d94e40d2be
add 'txpos' field to lightning history items, in case two transactions have the same timestamp
2019-08-20 09:03:11 +02:00
ThomasV
7a51f034e4
add future transactions to address synchronizer
2019-08-20 09:03:11 +02:00
ThomasV
2994764ad8
history: add column for ln amount
2019-08-20 09:03:11 +02:00
ThomasV
7a0e8bb343
fix amount_msat sign in get_history
2019-08-20 09:03:11 +02:00
ThomasV
43d9e0460e
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
8aa4ce0704
improve watchtower gui
2019-08-20 09:03:11 +02:00
ThomasV
8b12f481da
lightning: display forwarded payments as a single history item
2019-08-20 09:03:11 +02:00
ThomasV
3e443535a2
lnchannel: pass reference to lnworker
2019-08-20 09:03:11 +02:00
ThomasV
a8e2f79563
lnchannel: save timestamp when we settle
2019-08-20 09:03:11 +02:00
ThomasV
ed4cecf19c
ln_message: trigger notification instead of popup
2019-08-20 09:03:11 +02:00
SomberNight
ef7a59b4a9
lnchannel: save htlc preimages as soon as possible but horribly hacky
...
will properly clean this up...
2019-08-20 09:03:11 +02:00
SomberNight
7292da24e6
lnchannel: only consider payments finished when we revoke our old ctx
...
in the old code,
`self.hm.received_in_ctn(self.config[REMOTE].ctn + 1)`
did not really make sense as "received_in_ctn" compares the argument against the LOCAL ctn
2019-08-20 09:03:11 +02:00
SomberNight
a565c500f6
lnhtlc: revert 0c4e7b856f8c96c4f0a33bf3e0d1c8fd8184bd36
2019-08-20 09:03:11 +02:00
SomberNight
5f164bcbe8
travis: don't build binaries on ln branch (also for appimage)
2019-08-20 09:03:11 +02:00
SomberNight
7644c84e07
qt: update whole gui on every LN payment
...
inefficient... but at least kept updated.
2019-08-20 09:03:11 +02:00
SomberNight
021f5d570e
lnpeer: check that remote only sends commit_sig if there are changes
2019-08-20 09:03:11 +02:00
SomberNight
dfc2a35ae6
qt: handle LN invoices better in Send tab
2019-08-20 09:03:11 +02:00
SomberNight
962628ac3d
lnworker: minor clean-up re payment_completed
2019-08-20 09:03:11 +02:00
ThomasV
11c0c0d5a1
lnhtlc: fix received_in_ctn (LOCAL->REMOTE)
2019-08-20 09:03:11 +02:00
SomberNight
9206b6225b
tmp fix for circular imports
2019-08-20 09:03:11 +02:00
SomberNight
828f07a1ff
qt request_list: disable editing existing items
2019-08-20 09:03:11 +02:00
SomberNight
f0b4d1ecce
qt request_list: minor fix for context menu
2019-08-20 09:03:11 +02:00
SomberNight
64b2844e81
qt request_list: fix changing between items
2019-08-20 09:03:11 +02:00
Janus
f618bb4a67
lnhtlc: handle settles like adds (asymmetrical across ctns)
2019-08-20 09:03:11 +02:00
SomberNight
3d0b5fc80f
more post-rebase fixups
2019-08-20 09:03:11 +02:00
SomberNight
3a2ab149b9
lnchannel: add_htlc and receive_htlc now take and return UpdateAddHtlc
...
also fix undefined vars in _maybe_forward_htlc and _maybe_fulfill_htlc
in lnpeer
2019-08-20 09:03:11 +02:00
ThomasV
62be0c481c
lightning: Save invoices and preimages separately. Save preimages when forwarding
2019-08-20 09:03:11 +02:00
ThomasV
e475617b75
lnpeer: distinguish local and remote pending updates
2019-08-20 09:03:11 +02:00
ThomasV
459f9aaee7
lnchannel: reformatting
2019-08-20 09:03:11 +02:00
ThomasV
4228b926d4
lnpeer: send commitment after receiving updates
2019-08-20 09:03:11 +02:00
ThomasV
5f516bac35
move lightning icon
2019-08-20 09:03:11 +02:00
SomberNight
2976f50b8c
lightning post-rebase fixups
2019-08-20 09:03:11 +02:00
ThomasV
3d8e168a85
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
6eba22b5a8
lnpeer: replace asyncio.sleep with events
2019-08-20 09:03:11 +02:00
ThomasV
86b33a5637
code refactoring: _maybe_fullfill_htlc, _maybe_forward_htlc
2019-08-20 09:03:11 +02:00
ThomasV
5d26f51ad0
lnchannel: fix error message
2019-08-20 09:03:11 +02:00
ThomasV
a40207cbbb
Refactor LNPeer in order to support HTLC forwarding:
...
1. Do not perform channel updates in coroutines, because they would get executed in random order.
2. After applying channel updates, wait only for the relevant commitment (local or remote) and not for both, because local and remote might be out of sync (BOLT 2).
3. When waiting for a commitment, wait until a given ctn has been reached, because a queue cannot be shared by several coroutines
2019-08-20 09:03:11 +02:00
ThomasV
50b4f785a9
test_lnpeer: add names
2019-08-20 09:03:11 +02:00
ThomasV
3dce65dc73
Rename lnchan, lnchannel_verifier, lnbase
...
Auto-completions are a pain if files share a long prefix
2019-08-20 09:03:11 +02:00
Janus
8274a963e6
lnworker: save outgoing invoice when initiating payment
2019-08-20 09:03:11 +02:00
Janus
98e85fd16d
qt: channel_details: prevent crash on stuck SENT htlc
2019-08-20 09:03:11 +02:00
Janus
5f1feee331
move lightning message encoding to new lnmsg module
2019-08-20 09:03:11 +02:00
Janus
f5cee9ecf6
lightning: post-rebase fixes, read_QIcon and invalid import
2019-08-20 09:03:11 +02:00
ThomasV
d5006e83e7
test_forwarding: do not set HOME
2019-08-20 09:03:11 +02:00
ThomasV
954e4c8892
lnbase: rename methods, fix tests
2019-08-20 09:03:11 +02:00
ThomasV
909f1e77de
script that tests htlc forwarding
2019-08-20 09:03:11 +02:00
ThomasV
43e6e08840
Forward HTLCs
2019-08-20 09:03:11 +02:00
ThomasV
a975ac1571
lnworker: get_channel_by_short_id
2019-08-20 09:03:11 +02:00
ThomasV
fa96efabb5
lnpeer: receive_and_revoke, send_and_revoke
2019-08-20 09:03:11 +02:00
ThomasV
f4b2644620
set short_channel_id regardless of channel state, because peer might be disconnected
2019-08-20 09:03:11 +02:00
ThomasV
b265212fe6
show amount in channel opening/closure
2019-08-20 09:03:11 +02:00
ThomasV
d9813540ac
fix: test short_channel_id before removing from channel_db
2019-08-20 09:03:11 +02:00
ThomasV
108a986ef0
history tab: render channel opening/closure on a single line
2019-08-20 09:03:11 +02:00
ThomasV
82e8bcebb6
restructure channel_reestablish, resend funding_locked if needed
2019-08-20 09:03:11 +02:00
ThomasV
8e753f998a
fix tests
2019-08-20 09:03:11 +02:00
ThomasV
a3c6f82bb2
move LNPeer handshake back into initialize
2019-08-20 09:03:11 +02:00
ThomasV
42cbe74e95
history: better handling of None timestamps
2019-08-20 09:03:11 +02:00
ThomasV
2a112b867b
follow-up previous commit
2019-08-20 09:03:11 +02:00
ThomasV
b5482e4470
create transport and perform handshake before creating Peer
2019-08-20 09:03:11 +02:00
ThomasV
61638664f7
do not add ephemeral addresses to recent peers
2019-08-20 09:03:11 +02:00
ThomasV
472e82e387
fix channel closure when it was requested by the remote party
2019-08-20 09:03:11 +02:00
ThomasV
d383573bc3
CLI: use funding_point in channel_open and channel_close. add host:port to nodeid
2019-08-20 09:03:11 +02:00
ThomasV
0924503cb6
rpartition->rsplit
2019-08-20 09:03:11 +02:00
ThomasV
776caeeff0
follow-up prev commit: use maxsize to sort timestamps
2019-08-20 09:03:11 +02:00
ThomasV
f04e10f61a
save channel timestamps, and show lightning payments in history tab
2019-08-20 09:03:11 +02:00
ThomasV
ae402303ca
channel: is_closed
2019-08-20 09:03:11 +02:00
ThomasV
f6f5cbee72
fix lnworker.get_balance
2019-08-20 09:03:11 +02:00
ThomasV
b7d93e2e11
gui: display lightning balance in status bar
2019-08-20 09:03:11 +02:00
Janus
18bd934461
ln: show full chan id in list, use Event for initialized, more timeouts, return peer from add_peer, set max_htlc_value_in_flight_msat to capacity
2019-08-20 09:03:11 +02:00
ThomasV
19e60f00bb
add watchtower_window
2019-08-20 09:03:11 +02:00
ThomasV
7bb4ea150f
gui: show incoming lightning requests, add on-chain icon
2019-08-20 09:03:11 +02:00
ThomasV
2af178a586
Store boolean is_received in lightning invoices. Sort lightning history with timestamp. Minor fixes
2019-08-20 09:03:11 +02:00
Janus
4e3b2b5479
tests: update lnbase test to use 4-tuple for invoices
2019-08-20 09:03:11 +02:00
ThomasV
281d51c002
follow-up prev commit
2019-08-20 09:03:11 +02:00
ThomasV
0e8dba897e
lightning:
...
* store invoices for both directions
* do not store lightning_payments_inflight, lightning_payments_completed in lnworker
* payment history is returned by get_payments method of LNChannel
* command line: lightning history, lightning_invoices
* re-enable push_msat
2019-08-20 09:03:11 +02:00
Janus
d80b709aa4
lnbase: fix on_open_channel, add TODOs for missing validation
2019-08-20 09:03:11 +02:00
Janus
d5ed4309bb
revert low max_htlc_value_in_flight_msat, fix test
...
spec does not mention that there can be an upper bound
on max_htlc_value_in_flight_msat, so don't try to make
any node happy that has a max limit on this.
2019-08-20 09:03:11 +02:00
Janus
e6bd3959e0
ln: handle channel limits better, show remote limits in details dialog, replace rusty's testnet peer (doesn't work currently)
2019-08-20 09:03:11 +02:00
ThomasV
0a08ccc1c6
rename paying -> inflight
2019-08-20 09:03:11 +02:00
ThomasV
b0d6000771
turn lightning_payments_completed into dict. Show status of lightning payments in GUI. Make 'listchannels' available offline
2019-08-20 09:03:11 +02:00
ThomasV
26ced1b343
fix test
2019-08-20 09:03:11 +02:00
ThomasV
d789f11898
remove deterministic derivation for testing
2019-08-20 09:03:11 +02:00
ThomasV
e6d680ec1b
instanciate LNWorker without Network
2019-08-20 09:03:11 +02:00
Janus
7cf4f40dcb
ln: warn when negotiated feerate is too low
2019-08-20 09:03:11 +02:00
Janus
8fc1779b0d
ln: add test_lnwatcher
2019-08-20 09:03:11 +02:00
Janus
129099797a
lnworker: handle null whitelist correctly
2019-08-20 09:03:11 +02:00
Janus
3b44cf8c67
lnworker: fix 'channel details' with stuck htlc
2019-08-20 09:03:11 +02:00
Janus
f8dc9b344a
lnbase: work around peer not sending funding_locked so channel doesn't get marked open
2019-08-20 09:03:11 +02:00
Janus
6b6097a453
ln: add closechannel cli command
2019-08-20 09:03:11 +02:00
Janus
bd45f3f1c8
lnworker: return txid from force_close_channel as expected
2019-08-20 09:03:11 +02:00
Janus
38396e8ed4
lnwatcher: fix incorrect tuple unpacking in do_breach_remedy
2019-08-20 09:03:11 +02:00
Janus
38d2d4c321
lnchan: fix per_commitment_point number in verify_htlc
2019-08-20 09:03:11 +02:00
Janus
1f1207ecbe
ln: request_list: post rebase fixup (remove new_request_button deactivation)
2019-08-20 09:03:11 +02:00
ThomasV
02798aeb39
sort requests by date
2019-08-20 09:03:11 +02:00
ThomasV
3ce0f7f0cd
simplify requests list
2019-08-20 09:03:11 +02:00
ThomasV
290a1c61a8
confirmation dialog before force closure
2019-08-20 09:03:11 +02:00
ThomasV
dbcd5fe59d
channel_details: minor fix
2019-08-20 09:03:11 +02:00
ThomasV
3c8dea9b28
lightning: simplify request tab
2019-08-20 09:03:11 +02:00
Janus
51bc02557d
ln: fix sweeping htlc output from remote ctx (timeout e.g. without htlc tx)
2019-08-20 09:03:11 +02:00
Janus
e56e849505
lnchan refactor
...
- replace undoing logic with new HTLCManager class
- separate SENT/RECEIVED
- move UpdateAddHtlc to lnutil
2019-08-20 09:03:11 +02:00
Janus
ef88bb1c28
request_list: select new items
2019-08-20 09:03:11 +02:00
ThomasV
d9e7807fff
lnpeer: print port in error_messages
2019-08-20 09:03:11 +02:00
Janus
3ccd2fedff
ln: two remaining encumberedTx removal remnants
2019-08-20 09:03:11 +02:00
ThomasV
320dc29732
use to_dict (follow-up baa03a469f3e0e0ae61593272f5cb7e2483d49ad)
2019-08-20 09:03:11 +02:00
Janus
9cbf55f977
request_list: do not mention that ln invoice is bolt-11
2019-08-20 09:03:11 +02:00
Janus
720146ee40
request_list: fix qr code display and keyboard selection of lightning invoices
2019-08-20 09:03:11 +02:00
ThomasV
5776b322f7
formatting
2019-08-20 09:03:11 +02:00
ThomasV
b0f39718bb
remove useless returns and cryptic names
2019-08-20 09:03:11 +02:00
Janus
2c1fcb2f54
ln: remove EncumberedTransaction
2019-08-20 09:03:11 +02:00
Janus
60508725b6
lnbase: fix sig encoding in mutual close
2019-08-20 09:03:11 +02:00
Janus
3975560db5
lnsweep: use dicts consistently
2019-08-20 09:03:11 +02:00
Janus
06d4224101
lnchan: remove debugging code, commented out code
2019-08-20 09:03:11 +02:00
Janus
2323118bda
lnchan: only sign force_close_tx when demanded, assure consistency, fix test
2019-08-20 09:03:11 +02:00
Janus
37a0315aab
lnbase: fix NameError
2019-08-20 09:03:11 +02:00
Janus
1d8fe52fa3
lnchan: make force_close_tx() assure that tx is valid, trigger failure in test
2019-08-20 09:03:11 +02:00
ThomasV
cf3e050b7e
fix error message
2019-08-20 09:03:11 +02:00
ThomasV
8274067619
fix lnsweep: prevout
2019-08-20 09:03:11 +02:00
ThomasV
7e34554d1e
fix test_lnchan
2019-08-20 09:03:11 +02:00
ThomasV
fde9f91902
lnchannel: store pre-signed sweep transactions after each new commitment
2019-08-20 09:03:11 +02:00
ThomasV
3019aa35cf
on_close_channel: fix output index, and simplify lnsweep
2019-08-20 09:03:11 +02:00
ThomasV
729ddb8ec3
LNWatcher refactoring:
...
- do not store non-breach transactions
- send 'channel_open' and 'channel_closed' events
- force-closed channels are handled by LNWorker
2019-08-20 09:03:11 +02:00
ThomasV
1b7a3c25d1
lnsweep: return ctx.txid instead of None
2019-08-20 09:03:11 +02:00
Janus
56853da391
qt main_window: do not unregister on shutdown
...
this is handled differently in lightning, see commit
commit 6e355601261a60d143561f15760cc48f9c81d000
Author: ThomasV <thomasv@electrum.org>
Date: Sun Jun 3 10:07:56 2018 +0200
integrate channels_list with existing framework
2019-08-20 09:03:11 +02:00
Janus
545182e0a5
lnsweep: make maybe_create_sweeptx_for_their_ctx_to_local consistent
2019-08-20 09:03:11 +02:00
ThomasV
3aa36c1502
Channel: add current_commitment method
2019-08-20 09:03:11 +02:00
ThomasV
3222e26e01
format message
2019-08-20 09:03:11 +02:00
ThomasV
f4b9d2f47c
show lightning network capacity in GUI
2019-08-20 09:03:11 +02:00
Janus
47c07f77b4
lnsweep: fix create_sweeptxs_for_their_just_revoked_ctx
...
in the case where an htlc is failed, it could happen
that we use the wrong list of htlcs to generate sweep
tx'es. we would use the pending list instead of the
committed list.
observed by sending 12300sat and then 123000sat,
the second payment fails and an AssertionError was
triggered cause the htlc output could not be found
in the ctx.
added some documentation to clarify the behaviour
of lnchan.included_htlcs.
2019-08-20 09:03:11 +02:00
Janus
1fbce71c1f
update lightning.json
2019-08-20 09:03:11 +02:00
Janus
4a2a45d7e3
lightning: post rebase qt gui fixes
2019-08-20 09:03:11 +02:00
ThomasV
d493dd1953
add pycryptodomex to requirements
2019-08-20 09:03:11 +02:00
Janus
133e5ec8c3
use gossip_timestamp_filter instead of request_initial_sync
2019-08-20 09:03:11 +02:00
Janus
864d910888
qt: channel_details: add more info: sent/received, channel id, funding tx, short channel id, node id
2019-08-20 09:03:11 +02:00
Janus
762d8be84f
lnaddr: make it possible to use lnaddr to decode arbitrary invoices on the cmd line
2019-08-20 09:03:11 +02:00
SomberNight
9256472485
rm 'cryptography' as dependency; use new pycryptodomex version
...
pycryptodomex 3.7 implemented chacha20_poly1305 and chacha20,
and it is already used (although optionally) to speed up AES,
so we can remove cryptography and make pycryptodomex mandatory for LN
2019-08-20 09:03:11 +02:00
ThomasV
c0a1af2032
fix channel closure:
...
- add 'CLOSING' state
- wait until channel has no inflight HTLC
- end fee negocitation when both parties agree on the fee
(previously code ended it only when the other party had broadcast)
- broadcast the closing transaction
2019-08-20 09:03:11 +02:00
ThomasV
5bc74772a2
follow up 'replace properties with functions'
2019-08-20 09:03:11 +02:00
ThomasV
0e3270a1d6
further simplify lnwatcher
2019-08-20 09:03:11 +02:00
SomberNight
dbc4549c0e
lnchan: restore process_new_offchain_ctx
2019-08-20 09:03:11 +02:00
SomberNight
0070ae1fb1
fix prev
2019-08-20 09:03:11 +02:00
SomberNight
595cfcbb65
move sweeping methods from lnchan.py to new file
...
also sweep "received" htlcs from "our" ctx
also sweep htlcs from their ctx (non-breach)
extract ctn; included_htlcs_in_their_latest_ctxs
2019-08-20 09:03:11 +02:00
SomberNight
bc72966442
lnchan: follow-up "replace properties with functions"
2019-08-20 09:03:11 +02:00
ThomasV
88c6eeb966
make LNWatcher inherit AddressSynchronizer
2019-08-20 09:03:11 +02:00
ThomasV
78896897cb
lnchan: replace properties with functions
2019-08-20 09:03:11 +02:00
Janus
c339eabd31
qt: channel_details: remove demo code
2019-08-20 09:03:11 +02:00
Janus
e3409d32ef
channel details with list of htlcs
2019-08-20 09:03:11 +02:00
Janus
9d32031ca2
Kivy: Lightning support in Receive tab
2019-08-20 09:03:11 +02:00
Janus
ecac8f2880
tests/lnbase: stub on_channels_updated
2019-08-20 09:03:11 +02:00
Janus
7db9a22d63
Kivy: open channel dialog
2019-08-20 09:03:11 +02:00
ThomasV
3430d1aaa3
follow-up prev commit
2019-08-20 09:03:11 +02:00
ThomasV
5422de90a2
lightning: do not handle more than one fee update at a time
2019-08-20 09:03:11 +02:00
Janus
1352b0ce9f
Kivy: Support Lightning in Send tab
2019-08-20 09:03:11 +02:00
Janus
f803bb571d
kivy: restore channel list to working state, add [force-]closing functionality
2019-08-20 09:03:11 +02:00
Janus
1520338f37
fix ln tests
2019-08-20 09:03:11 +02:00
SomberNight
521fadb8cb
lnutil: restructure channel config namedtuples (local/remote config)
2019-08-20 09:03:11 +02:00
Janus
1425628604
add command for listing invoices and their progress, fix list_channels
2019-08-20 09:03:11 +02:00
Janus
783cac1f23
function that returns map from commitment number to list of HTLCs
2019-08-20 09:03:11 +02:00
SomberNight
5b7c801ca4
after rebase fixes
2019-08-20 09:03:11 +02:00
Janus
8a98810df1
do not co-op close channels with pending htlcs
2019-08-20 09:03:11 +02:00
Janus
9cf7aa054d
call force_close_channel on LNWorker, not Peer
2019-08-20 09:03:11 +02:00
Janus
c570bc5fb1
avoid leaving FORCE_CLOSING state, rebroadcast closing tx if reorged out
2019-08-20 09:03:11 +02:00
Janus
0ea87278fb
move force_close_channel to lnbase, test it, add FORCE_CLOSING state
2019-08-20 09:03:11 +02:00
Janus
6211e656a8
lnwatcher: do not get_transaction before broadcast
...
this workaround was inserted to avoid losing the interface
when rebroadcasting a transaction already in the mempool
many times. but since the network should make sure we always
have a interface ready, and this problem shouldn't happen on
mainnet, remove the workaround
2019-08-20 09:03:11 +02:00
Janus
c8dcf0b471
lnwatcher: more detailed logging, support notifying test suite of txs
2019-08-20 09:03:11 +02:00
Janus
795ba1f99d
lnwatcher: ensure probable spendability of prev_tx
...
previously, we would try to publish the second_stage
even if we couldn't, because a conflicting transaction
was published (like an htlc success when we close with
htlcs pending with a 1-hop payment and an online
counterparty)
2019-08-20 09:03:11 +02:00
Janus
f9f1805cdf
use IntEnum for TxMinedDepth
2019-08-20 09:03:11 +02:00
ThomasV
632f11d5da
watchtower: add watch_channel rpc
2019-08-20 09:03:11 +02:00
Janus
39fa13b938
lnchan: use NamedTuple for logs instead of dict with static keys (adds, locked_in, settles, fails)
2019-08-20 09:03:10 +02:00
Janus
72187a4341
lnchan: make sign_next_commitment revert state
2019-08-20 09:03:10 +02:00
Janus
001bb4ca09
remove incorrect docstrings, attribute docstring sources where applicable
2019-08-20 09:03:10 +02:00
SomberNight
c0ae7b5534
after rebase clean-up
2019-08-20 09:03:10 +02:00
Janus
7e76e82152
test_lnbase: add test that pays to another local electrum
2019-08-20 09:03:10 +02:00
SomberNight
ce2b572fa5
lnbase: more type annotations, and minor fix
2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe
add licence headers to more files
2019-08-20 09:03:10 +02:00
Janus
f5201327d1
add lnd copyright boilerplate to lnchan, test_lnchan
2019-08-20 09:03:10 +02:00
Janus
85789d8a09
lnbase: mark initialized later, add tests, etc
...
- consistent node_id sorting
- require OPTION_DATA_LOSS_PROTECT and test it
2019-08-20 09:03:10 +02:00
Janus
a42c1067ab
lnworker: fix listchannels
2019-08-20 09:03:10 +02:00
Janus
578faeb91a
lnbase: do not assert only one htlc in commitment
2019-08-20 09:03:10 +02:00
Janus
a5a7c1406e
lightning channels reserves: use pretty balance in Qt, fix bugs, add tests
2019-08-20 09:03:10 +02:00
ThomasV
eb4e6b2e54
use WaitingDialog to close channels
2019-08-20 09:03:10 +02:00
ThomasV
70dbd8e672
add close_channel method to peer
2019-08-20 09:03:10 +02:00
ThomasV
f985aac8d1
fix typo
2019-08-20 09:03:10 +02:00
ThomasV
a5ab431b4b
parse invoices with lightning: prefix
2019-08-20 09:03:10 +02:00
ThomasV
5ca6fbaea7
lnbase: self.channel_reestablished is not a queue
2019-08-20 09:03:10 +02:00
Janus
15b0720f5e
lightning channel reserves
2019-08-20 09:03:10 +02:00
SomberNight
54edc9488a
lnworker: store invoices based on payment_hash
2019-08-20 09:03:10 +02:00
ThomasV
d9facabc8c
lnbase: call save_channel in revoke and receive_revoke
2019-08-20 09:03:10 +02:00
Janus
0dfc9e512b
fix co-op close
2019-08-20 09:03:10 +02:00
Janus
d6f62d4e7f
follow-up redeeming of local outgoing htlc outputs, fix tests
2019-08-20 09:03:10 +02:00
SomberNight
04ec7e9968
lnutil.make_funding_input: don't return payment pubkeys
...
order depends on who is initiator anyway
2019-08-20 09:03:10 +02:00
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
2019-08-20 09:03:10 +02:00
SomberNight
f70e679aba
some more type annotations that needed conditional imports
2019-08-20 09:03:10 +02:00
SomberNight
f3d1f71e94
lnchan: set diagnostic_name
...
previously was only set for tests
2019-08-20 09:03:10 +02:00
SomberNight
edff357fad
better handling of channel updates for private channels
2019-08-20 09:03:10 +02:00
SomberNight
bd48072e04
lnrouter: can_pay for own channels should use amount_to_forward
2019-08-20 09:03:10 +02:00
SomberNight
2364de930b
lnrouter: run Dijkstra in reverse direction
2019-08-20 09:03:10 +02:00
SomberNight
7edbd5682a
fix confusion re max path length
2019-08-20 09:03:10 +02:00
SomberNight
2fafd01945
protect against getting robbed through routing fees
2019-08-20 09:03:10 +02:00
SomberNight
c577df8489
lnbase: when opening channel, test if we have enough balance first
...
and make sure we don't try to create the funding txn from local UTXOs
2019-08-20 09:03:10 +02:00
SomberNight
d511ecdc00
start failing htlcs
2019-08-20 09:03:10 +02:00
SomberNight
ded11b4d9e
lnonion: implement error packet construction
2019-08-20 09:03:10 +02:00
SomberNight
dfe61e15c3
invoice 'r' field fallback: change cltv to 1
2019-08-20 09:03:10 +02:00
SomberNight
4b37343c62
unify hardcoded regtest fee
2019-08-20 09:03:10 +02:00
ThomasV
d6b4268fde
Qt gui: show messages about payment outcome
2019-08-20 09:03:10 +02:00
ThomasV
02c39a950f
encapsulate get_invoice in lnworker
2019-08-20 09:03:10 +02:00
ThomasV
095de2dd22
make on_update_add_htlc async
2019-08-20 09:03:10 +02:00
SomberNight
3ac9858d59
follow-up prev
2019-08-20 09:03:10 +02:00
SomberNight
56c0983e69
fix multi-hop payments
2019-08-20 09:03:10 +02:00
Janus
ac68c8f531
lnchan: add available_to_spend()
2019-08-20 09:03:10 +02:00
Janus
d317bdbd9b
lnchan: make function for onion_keys decoding/encoding
2019-08-20 09:03:10 +02:00
ThomasV
c0aee58e4d
follow-up 3460ba738e
2019-08-20 09:03:10 +02:00
SomberNight
e6a0b641d5
lnaddr: encode min_final_cltv into invoice
2019-08-20 09:03:10 +02:00
SomberNight
384fd665b3
log if no invoice has no routing hints
2019-08-20 09:03:10 +02:00
ThomasV
d9eb92979b
revert rbf on funding tx
2019-08-20 09:03:10 +02:00
SomberNight
a8b9727817
lnbase: fix peer clean-up
2019-08-20 09:03:10 +02:00
ThomasV
87cc312d1e
improve suggest_peers; add htlcs to list_channels.
2019-08-20 09:03:10 +02:00
ThomasV
f8894d467f
funding tx: use fees from config and set rbf
2019-08-20 09:03:10 +02:00
SomberNight
9de6028fb5
clean-up Peer init
2019-08-20 09:03:10 +02:00
SomberNight
25c2657680
if channel_update for our channel is missing, fill invoice with zeroes
2019-08-20 09:03:10 +02:00
SomberNight
2e5552816c
if payment fails with UPDATE onion error, also utilise channel_update for private channels
2019-08-20 09:03:10 +02:00
Janus
962f70c7da
ln: add lightning_listen config option
2019-08-20 09:03:10 +02:00
SomberNight
52377dbfa0
lnrouter: use htlc_maximum_msat
2019-08-20 09:03:10 +02:00
SomberNight
ff0aa90ddf
lnworker: make add_peer async
2019-08-20 09:03:10 +02:00
ThomasV
8bb23ea2cd
follow-up prev commit: channel_flags, message_flags, htlc_maximum_msat
2019-08-20 09:03:10 +02:00
ThomasV
9659d23bde
add htlc_maximum_msat feature (bolt7)
2019-08-20 09:03:10 +02:00
SomberNight
79989ad538
lnbase: typo in on_channel_reestablish
2019-08-20 09:03:10 +02:00
SomberNight
a91e244a05
path finding: minor clean-up
2019-08-20 09:03:10 +02:00
Janus
eabe23f6b8
make function for determining who pays fee
2019-08-20 09:03:10 +02:00
SomberNight
cd175f0949
fix prev
2019-08-20 09:03:10 +02:00
ThomasV
9a59ffaf44
lnrouter: filter out unsuitable channels
2019-08-20 09:03:10 +02:00
ThomasV
a0acec9720
gather definitions of LN exceptions
2019-08-20 09:03:10 +02:00
ThomasV
409a336071
fix tests (follow-up previous commit)
2019-08-20 09:03:10 +02:00
ThomasV
445252284f
move transport code to its own file
2019-08-20 09:03:10 +02:00
ThomasV
910e85ec01
future and callback are not needed here
2019-08-20 09:03:10 +02:00
Janus
71afa3cc70
lnbase: split out BOLT-08 (Noise) implementation
2019-08-20 09:03:10 +02:00
SomberNight
0578bbd5d0
fix tests
2019-08-20 09:03:10 +02:00
SomberNight
f267400e1e
follow-up prev
2019-08-20 09:03:10 +02:00
SomberNight
17ccb79ca4
channel verifier: NetworkJobOnDefaultServer, and some error handling
2019-08-20 09:03:10 +02:00
ThomasV
5a081b2131
start channel verifier in network.start()
2019-08-20 09:03:10 +02:00
ThomasV
626d09b358
add 'recḱless' option to allow using lightning on mainnet
2019-08-20 09:03:10 +02:00
ThomasV
87fb0da5e1
minor fix
2019-08-20 09:03:10 +02:00
ThomasV
9362130fba
fix race between network and lnwatcher (network.add_job does not always work)
2019-08-20 09:03:10 +02:00
ThomasV
e761f5b876
add watchtower class, send encumbered tx as json
2019-08-20 09:03:10 +02:00
SomberNight
7589bdc6a9
fix tests
2019-08-20 09:03:10 +02:00
SomberNight
48252318b8
rebase follow-up
2019-08-20 09:03:10 +02:00
Janus
520b5703a4
lnbase: resend revoke_and_ack if necessary
2019-08-20 09:03:10 +02:00
ThomasV
30753ed475
watchtower: use network job, catch exceptions
2019-08-20 09:03:10 +02:00
ThomasV
680b129b4a
remote watchtower: initial commit
2019-08-20 09:03:10 +02:00
Janus
94a10e6307
rebase fixup: use new broadcast_transaction API
2019-08-20 09:03:10 +02:00
Janus
601356f5d1
lnbase: use 45000 feerate on regtest for eclair compatibility
2019-08-20 09:03:10 +02:00
ThomasV
46cf18ce5f
open_channel: improved success message
2019-08-20 09:03:10 +02:00
ThomasV
6efe5db0d0
run open_channel in a WaitingDialog
2019-08-20 09:03:10 +02:00
Janus
1763d02b05
rename lnhtlc->lnchan, HTLCStateMachine->Channel
2019-08-20 09:03:10 +02:00
Janus
b26dc66567
lnhtlc: only store feerate once, don't store heights since we do not roll back
2019-08-20 09:03:10 +02:00
Janus
e8471e483b
lnhtlc: merge config and state, remove unnecessary properties
2019-08-20 09:03:10 +02:00
Janus
1d4c113a35
lnhtlc: remove lookup_htlc, use heterogeneously typed lists
2019-08-20 09:03:10 +02:00
Janus
699368b0b7
lnhtlc: save settled htlc amounts separately
2019-08-20 09:03:10 +02:00
Janus
18d06dd6b4
qt channels_list: use repr() and not str() for exceptions
2019-08-20 09:03:10 +02:00
ThomasV
d439b3c308
fix previous commit
2019-08-20 09:03:10 +02:00
ThomasV
1ebd1baebf
follow-up 1c8a4bcfa497b117e4511c2f108dbca8a1adb793
2019-08-20 09:03:10 +02:00
SomberNight
8d4a5bd1d7
lnbase: handle some error codes re htlc failures ('UPDATE' flag)
2019-08-20 09:03:10 +02:00
SomberNight
a8ace7ef4f
lnonion: use IntEnum and IntFlag for failure codes
2019-08-20 09:03:10 +02:00
SomberNight
864efa029b
handle failing htlc after restart
2019-08-20 09:03:10 +02:00
SomberNight
eced61123d
clean up local/global features
2019-08-20 09:03:10 +02:00
SomberNight
4d32478f30
on_channel_reestablish: try to get remote to force close channel if out-of-sync.
...
see ACINQ/eclair#727 and lightningnetwork/lnd#1904
2019-08-20 09:03:10 +02:00
SomberNight
1946254ef2
on_update_fail_htlc: don't send commitment without changes
...
c-lightning was force-closing channels with us: "[lnbase:127.0.0.1] error commit_sig with no changes"
2019-08-20 09:03:10 +02:00
SomberNight
bf25d765d9
simplify ChannelDB.on_channel_update
2019-08-20 09:03:10 +02:00
SomberNight
c1473ca97d
travis: don't build binaries on ln branch
2019-08-20 09:03:10 +02:00
SomberNight
a06b49ae40
when paying and there are multiple 'r' hints, use one at random
2019-08-20 09:03:10 +02:00
SomberNight
97393d05aa
use 'r' field in invoice when making payments (routing hints)
2019-08-20 09:03:10 +02:00
SomberNight
029ec5a5ab
make our channels private, and put routing hints in invoices we create
2019-08-20 09:03:10 +02:00
SomberNight
09c3e52e62
lnworker: fix race
...
sometimes a reestablished channel would not get marked "open"
2019-08-20 09:03:10 +02:00
SomberNight
53802ba382
lnaddr: clean up imports
2019-08-20 09:03:10 +02:00
ThomasV
c1b34dafe2
follow-up previous commit
2019-08-20 09:03:10 +02:00
ThomasV
4441233596
get rid of callbacks in lnwatcher, use network events instead
2019-08-20 09:03:10 +02:00
ThomasV
242ab5ae56
lightning: fix tests
2019-08-20 09:03:10 +02:00
SomberNight
5fbadafdb1
follow-up lnwatcher changes
2019-08-20 09:03:10 +02:00
ThomasV
6e5b36e661
lnwatcher simplification: remove ctn tests and pubkeys
2019-08-20 09:03:10 +02:00
ThomasV
9a88b5605a
add more fields to list_channels
2019-08-20 09:03:10 +02:00
ThomasV
6b9de278d4
aiosafe: define user visible exception class
2019-08-20 09:03:10 +02:00
ThomasV
6f3c2b30ed
lnbase: propagate error messages received in on_error to their relevant coroutines
2019-08-20 09:03:10 +02:00
ThomasV
11c3ca281c
create sweep transaction outside of lnwatcher
2019-08-20 09:03:10 +02:00
SomberNight
72eb179c7a
fix race between lnwatcher/lnworker
...
channels were sometimes not getting re-established
2019-08-20 09:03:10 +02:00
SomberNight
d44afd9633
fix tests
2019-08-20 09:03:10 +02:00
SomberNight
707c7d569d
lnbase: Peer handles its own disconnection instead of lnworker
2019-08-20 09:03:10 +02:00
SomberNight
f3dd7ce615
follow-up prev: avoid storage key collision with old 'lightning_privkey'
2019-08-20 09:03:10 +02:00
SomberNight
17457327ef
make key derivation reasonable
...
no more hardcoded secrets, no more key-reuse
2019-08-20 09:03:10 +02:00
Janus
5859054095
fix lnwatcher for channels initiated by remote
2019-08-20 09:03:10 +02:00
SomberNight
fb8deecb57
lnutil: missing import
2019-08-20 09:03:10 +02:00
Janus
c5b7deac6b
lnhtlc: don't save FeeUpdates to disk, only keep FeeUpdate in memory while in progress
2019-08-20 09:03:10 +02:00
Janus
8bd6dc2425
ln: fix opening of channels (NameErrors)
2019-08-20 09:03:10 +02:00
Janus
bdf36ac649
lnbase: update gui after accomodating channel opening request
2019-08-20 09:03:10 +02:00
Janus
0405f0d9ad
accept channel opening requests initiated by remote
2019-08-20 09:03:10 +02:00
SomberNight
b18a17ef79
lnchannelverifier: (minor) use named fields of namedtuple
2019-08-20 09:03:10 +02:00
SomberNight
c430b39b7d
fix lnworker.choose_preferred_address
2019-08-20 09:03:10 +02:00
Janus
139f773c2e
new network API: use broadcast_transaction with run_from_other_thread
2019-08-20 09:03:10 +02:00
Janus
1a7b06b690
lnhtlc: multiply weight by feerate before rounding
...
This resolves the error formerly manifested as:
Traceback (most recent call last):
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/packages/jsonrpclib/SimpleJSONRPCServer.py", line 376, in _dispatch
return func(*params)
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/daemon.py", line 292, in run_cmdline
result = func(*args, **kwargs)
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/commands.py", line 87, in func_wrapper
return func(*args, **kwargs)
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/commands.py", line 697, in lnpay
return f.result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnbase.py", line 887, in pay
sig_64, htlc_sigs = chan.sign_next_commitment()
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnhtlc.py", line 281, in sign_next_commitment
htlc_tx = make_htlc_tx_with_open_channel(self, *args)
File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnutil.py", line 262, in make_htlc_tx_with_open_channel
commit.txid(), commit.htlc_output_indices[original_htlc_output_index],
KeyError: 0
2019-08-20 09:03:10 +02:00
Janus
646881f437
lnworker.pay(): lightning-integration support
2019-08-20 09:03:10 +02:00
Janus
a071aafcc7
lnhtlc: generalize balance/pending_commitment code over htlc direction
2019-08-20 09:03:10 +02:00
Janus
c8dc17012f
lnworker: add missing import
2019-08-20 09:03:10 +02:00
Janus
cef3a30c5a
lnbase: remove code duplication by introducing send_commitment(chan)
2019-08-20 09:03:10 +02:00
Janus
addd8928bf
lnbase: remove unnecessary branching and duplicated code in receive_commitment_revoke_ack
2019-08-20 09:03:10 +02:00
Janus
e5f42a3973
lnhtlc: save settled or failed htlcs
2019-08-20 09:03:10 +02:00
Janus
efc8d50570
move connection string decoding to lnworker, fix test_lnutil
2019-08-20 09:03:10 +02:00
Janus
24cf4e7eb0
qt channels_list: min width, not fixed with (for hiDPI displays), use OK as default button
2019-08-20 09:03:10 +02:00
Janus
9862fe5c0c
ecc_fast: require libsecp256k1 on lightning, channel graph breaks electrum without
2019-08-20 09:03:10 +02:00
Janus
1988b552e1
commands: add dumpgraph command to see which nodes electrum knows about
2019-08-20 09:03:10 +02:00
Janus
6bec42d18a
requirements: require bitstring for lnaddr, cryptography for lnbase
2019-08-20 09:03:10 +02:00
ThomasV
75dd56eff0
avoid code duplication between methods that send channel updates
2019-08-20 09:03:10 +02:00
Janus
5e7117dddd
ln: commit fee updates as soon as possible
2019-08-20 09:03:10 +02:00
Janus
5753cf9e05
ln fees: avoid resending same fee update before it has been committed to, docs
2019-08-20 09:03:10 +02:00
ThomasV
22b06ddec2
lnwatcher: fix parameters to broadcast_transaction
2019-08-20 09:03:10 +02:00
Janus
d07adda3c0
lnhtlc: decrease next_htlc_id counter when removing htlcs when saving
2019-08-20 09:03:10 +02:00
ThomasV
1127d3f467
simplify syntax
2019-08-20 09:03:10 +02:00
Janus
878dc17acb
ln: don't save htlcs that are not locked in
2019-08-20 09:03:10 +02:00
Janus
2c6925e526
lnhtlc: bip69 ordering of htlc signatues we generate
2019-08-20 09:03:10 +02:00
Janus
e23e0d6c6e
ln: avoid duplicated htlc filter code, support multiple htlcs better
2019-08-20 09:03:10 +02:00
Janus
e18a3b5a3d
lnutil: remove LI01 sort after Tx.from_io: fixup after rebase on da9d1e6001
2019-08-20 09:03:10 +02:00
Janus
50b3bc939c
avoid reading from queues concurrently in pay()
2019-08-20 09:03:10 +02:00
ThomasV
a54631b873
add pong handler to reduce verbosity
2019-08-20 09:03:10 +02:00
Janus
a04e37d050
keep htlc history in case a htlc fails
2019-08-20 09:03:10 +02:00
Janus
cf4f0c5d3a
add command to clear ln blacklist, prevent error in pay() from killing Peer
2019-08-20 09:03:10 +02:00
SomberNight
200b012e57
lnchannelverifier: some clean-up
2019-08-20 09:03:10 +02:00
SomberNight
c91fe27e7d
fix lnwatcher: network triggers were renamed
2019-08-20 09:03:10 +02:00
SomberNight
d29191b010
rename LNChanAnnVerifier
2019-08-20 09:03:10 +02:00
SomberNight
fc0009206b
fix prev
2019-08-20 09:03:10 +02:00
ThomasV
31b1243f25
lnbase: save_channel in revoke
2019-08-20 09:03:10 +02:00
ThomasV
8df569962d
fix: broadcast_transaction from non network thread
2019-08-20 09:03:10 +02:00
ThomasV
180eb6d101
partial revert of df24fb00578309b5db27876769306196238ec3f2: process_message should not be async
2019-08-20 09:03:10 +02:00
ThomasV
dc0f03de99
channel verifier: fix request_chunk args
2019-08-20 09:03:10 +02:00
ThomasV
08448fd2f0
add lnworker in start_network
2019-08-20 09:03:10 +02:00
ThomasV
5c5982d9f7
lnwatcher: do not assume addr_sync.synchronizer
2019-08-20 09:03:10 +02:00
Janus
cc7ef49c43
lnhtlc: also check received htlcs when validating commitment sigs
2019-08-20 09:03:10 +02:00
Janus
224226f427
ln: cooperative close with remote peer initiating
2019-08-20 09:03:10 +02:00
Janus
ff902a55ee
lnhtlc: don't settle htlc with HTLCStateMachine too early
2019-08-20 09:03:10 +02:00
Janus
d5d9270d0c
lnhtlc: save logs and feeupdates
2019-08-20 09:03:10 +02:00
Janus
eca5545004
lnhtlc: don't throw away fee updates or htlcs
...
also add inject_fees debug command
2019-08-20 09:03:10 +02:00
Janus
02eca03486
lnhtlc: cleanup and save settled htlcs
2019-08-20 09:03:10 +02:00
Janus
6f5209ef85
lnhtlc: test that sent amount is received
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
Janus
3eabd70df5
lightning: post aiorpcx rebase fixup
2019-08-20 09:03:10 +02:00
SomberNight
7edba63341
remove our closed channels from channeldb. note some FIXMEs
...
payment were attempting to use the closed channels.
2019-08-20 09:03:10 +02:00
SomberNight
08d20ce187
lnbase: fix payments
2019-08-20 09:03:10 +02:00
SomberNight
1b030fca78
rebase follow-up: use namedtuples from master in new code (TxOutput, TxMinedStatus)
2019-08-20 09:03:10 +02:00
SomberNight
bab9f163f7
decode onion errors to failure message type
2019-08-20 09:03:10 +02:00
SomberNight
b85aea1541
qt: pay_lightning_invoice - attempt paying multiple times in case of failure
2019-08-20 09:03:10 +02:00
SomberNight
4d1785799b
lnbase.pay: test if htlc can be added
2019-08-20 09:03:10 +02:00
SomberNight
9827cda9b1
qt send tab: hide fee fields when paying with lightning
2019-08-20 09:03:10 +02:00
SomberNight
2b4a436572
qt open channel dialog: allow pasting invoices to open a channel
2019-08-20 09:03:10 +02:00
SomberNight
cd893de837
lnrouter: use 'disable' flags from channel updates in path finding
2019-08-20 09:03:10 +02:00
SomberNight
15a6a83107
ln onchain fees: use 2 block ETAs with 150 s/b fallback
2019-08-20 09:03:10 +02:00
SomberNight
f3e5ba6ac1
more reliable peer and channel re-establishing
2019-08-20 09:03:10 +02:00
SomberNight
362a3a5a44
lnworker: fix confusion re what is in self.peers
2019-08-20 09:03:10 +02:00
SomberNight
9f79b7df63
don't connect to same peer multiple times
2019-08-20 09:03:10 +02:00
SomberNight
0b0bc89083
fix tests
2019-08-20 09:03:10 +02:00
SomberNight
c02cc9bb3b
persist recent peers. implement dns seed bootstrapping.
...
dns seeds are currently disabled though, as they always seem to return mainnet nodes.
2019-08-20 09:03:10 +02:00
SomberNight
bc06ded4b9
persist nodes in channel_db on disk
2019-08-20 09:03:10 +02:00
SomberNight
5a05a92b3d
move bolt-04 onion stuff to its own module
2019-08-20 09:03:10 +02:00
Janus
9247da5203
ln: share more code with control path for failed htlc, verify ctx'es
2019-08-20 09:03:10 +02:00
Janus
96a16adf30
ln: fix forwarded payment fees by removing separation between fee and amount in htlc objects
2019-08-20 09:03:10 +02:00
Janus
318d25e676
ln: verify received commitment transactions during payment
2019-08-20 09:03:10 +02:00
Janus
3c06b3cee1
ln: use START_INDEX instead of 2**48-1
2019-08-20 09:03:10 +02:00
Janus
a841fa3602
ln: save htlc signatures
2019-08-20 09:03:10 +02:00
Janus
9c442586b2
ln: avoid dust sends breaking channel, avoid inline functions
2019-08-20 09:03:10 +02:00
SomberNight
d0798c336f
channeldb: allow injecting trusted edges
2019-08-20 09:03:10 +02:00
Janus
7f0568d83a
special case receiving payment after fee update, fee update injector
2019-08-20 09:03:10 +02:00
SomberNight
a5b44d25b0
persist channel db on disk. verify channel gossip sigs.
2019-08-20 09:03:10 +02:00
SomberNight
c1d1826014
start using electrum protocol 1.4
2019-08-20 09:03:10 +02:00
Janus
935f11522d
lightning.json with gossip_queries
2019-08-20 09:03:10 +02:00
SomberNight
8ffeb79d01
constants.py: remove duplicate Simnet declaration
2019-08-20 09:03:10 +02:00
Janus
9853cc6f31
ln: do not use mSAT accuracy for commitment fees
2019-08-20 09:03:10 +02:00
Janus
66e7b4d250
ln: fundee must commit to fee first
2019-08-20 09:03:10 +02:00
SomberNight
fb00e29f1c
bolt-08 handshake must use ephemeral key
2019-08-20 09:03:10 +02:00
SomberNight
fca5c9379f
avoid crash if don't have peer for open channel
2019-08-20 09:03:10 +02:00
Janus
74b180a4e6
use correct dust limit for their to_local/to_remote outputs
2019-08-20 09:03:10 +02:00
Janus
478e484c54
ln: initialize genesis with object, fix method name typo, use depth_target_to_fee
2019-08-20 09:03:10 +02:00
ThomasV
bb4aa1e135
lnwatcher: pass address instead of wallet reference
2019-08-20 09:03:10 +02:00
ThomasV
bc28edf178
encapsulate funding_address_for_channel
2019-08-20 09:03:10 +02:00
SomberNight
8e63471d69
allow paying invoice without amount. min feerate 253 sat/kw.
2019-08-20 09:03:10 +02:00
Janus
ba74844b2e
lnbase: fee handling: add todo since depth_to_fee is inappropriate
2019-08-20 09:03:10 +02:00
ThomasV
21ee6f6965
asyncio: do not set event loop from wallet
2019-08-20 09:03:10 +02:00
Janus
2fd5f8613a
ln: fix race in on_network_update
2019-08-20 09:03:10 +02:00
Janus
d5cb21143f
ln: send update_fee on fee change, handle nodes without data_protect
2019-08-20 09:03:10 +02:00
Janus
12a02a8a1e
lnrouter: ignore duplicate channel announcement
2019-08-20 09:03:10 +02:00
ThomasV
9897e41e68
remove unused method
2019-08-20 09:03:10 +02:00
SomberNight
21e907a4e3
ChannelDB: print_graph
2019-08-20 09:03:10 +02:00
SomberNight
135951a13f
qt channels list: update channel when detecting close
2019-08-20 09:03:10 +02:00
SomberNight
f2242868fa
qt/channels list: show error in dialog
2019-08-20 09:03:10 +02:00
SomberNight
66817d41f9
lnwatcher improvements
...
- only try sweeping csv-locked to_local if past timelock
- check if outputs are already spent
- no need to keep watching channels for which all outputs are spent and mined deep
2019-08-20 09:03:10 +02:00
Janus
d740475e7a
move channel_state into HTLCStateMachine
2019-08-20 09:03:10 +02:00
ThomasV
3caccbebcd
follow-up a7e5b9421c014fc0be72696837cb9d77519c5e03
2019-08-20 09:03:10 +02:00
ThomasV
89dfd1cc2c
lightning: improve request tab layout
2019-08-20 09:03:10 +02:00
ThomasV
f2b40c69fc
do not set background in frozen_style, it does not look good with dark theme
2019-08-20 09:03:10 +02:00
ThomasV
b5f0209a56
fix crash in lnworker main_loop
2019-08-20 09:03:10 +02:00
ThomasV
18bc5aa27b
lightning: improve receive in Qt GUI
2019-08-20 09:03:10 +02:00
ThomasV
31b67c422b
add peer suggestion to open channel dialog. move add_peer code back to lnworker constructor
2019-08-20 09:03:10 +02:00
ThomasV
2ee41975f9
add lnworker.main_loop to network.futures so it gets cancelled on exit. fix aiosafe verbosity.
2019-08-20 09:03:10 +02:00
ThomasV
44d8c8f995
diagnostic_name: convert to str
2019-08-20 09:03:10 +02:00
ThomasV
8f779f504f
LNWorker: connect to multiple peers.
...
save exceptions in aiosafe.
enable adding peer in GUI.
2019-08-20 09:03:10 +02:00
Janus
35adc3231b
lightning: fixup after rebasing on restructured master
2019-08-20 09:03:10 +02:00
ThomasV
1db7a8334a
Refresh LN status in GUI using network callback.
2019-08-20 09:03:10 +02:00
Janus
9145d61797
lnhtlc: remove unnecessary double application of pending feerate
2019-08-20 09:03:10 +02:00
Janus
cc48e14618
ln: enable receiving dust htlcs
2019-08-20 09:03:10 +02:00
SomberNight
18627ecd1a
lnwatcher: naive code to sweep to_local from our ctx (will not wait for timelock yet)
2019-08-20 09:03:10 +02:00
Janus
55a7e4cec1
ln: use pending_local_commit while closing (won't be revoked)
2019-08-20 09:03:10 +02:00
Janus
ed62a21547
ln: raise our dust/reserve to 546 to be compatible with c-lightning
2019-08-20 09:03:10 +02:00
Janus
b26e028d9b
ln: test fix: our commit fee is implicit from outputs
2019-08-20 09:03:10 +02:00
Janus
2dd1cb86fa
lnbase: do not revoke more than once if we have missed reading commitments
2019-08-20 09:03:10 +02:00
SomberNight
63d2c3aaf4
lnwatcher: sweep to_remote and to_local outputs if they close
2019-08-20 09:03:10 +02:00
Janus
8573dd3b6a
ln: revoke before sending bare ctx in pay(), remove subtraction of trimmed amt from fee
2019-08-20 09:03:10 +02:00
Janus
605d6ff5ca
ln: add two trimming tests, avoid negative numbers in htlc trim decision
2019-08-20 09:03:10 +02:00
Janus
03c2b954d9
lnhtlc: fee update upgrade and passes ReciverCommits and SenderCommits tests, fix NameErrors in lnbase
2019-08-20 09:03:10 +02:00
Janus
d95d6fcae9
lnaddr: remove remnants of lightning_payencode directory
2019-08-20 09:03:10 +02:00
Janus
ea3d8cb157
lnaddr: fix imports
2019-08-20 09:03:10 +02:00
ThomasV
722b4c5029
move comment
2019-08-20 09:03:10 +02:00
ThomasV
8346e358b2
move lnaddr.py to lib
2019-08-20 09:03:10 +02:00
Janus
4515c859c4
ln: avoid code duplication
2019-08-20 09:03:10 +02:00
Janus
fe973a5137
ln: avoid recursive dependencies, make new lnutil
2019-08-20 09:03:10 +02:00
Janus
7a3551b5df
ln: merge OpenChannel and HTLCStateMachine
2019-08-20 09:03:10 +02:00
Janus
42a56df996
ln: shortcut some OpenChannel fields to traversing too much
2019-08-20 09:03:10 +02:00
Janus
77e9abc655
ln: store HTLCStateMachine in lnworker.channels
2019-08-20 09:03:10 +02:00
SomberNight
0d4593eebf
improve Qt Receive tab for LN payment requests
2019-08-20 09:03:10 +02:00
ThomasV
c7e47b74a9
Separate open_channel dialog. In open_channel_coroutine, use host and port from channel announcements
2019-08-20 09:03:10 +02:00
Janus
dbdabcfc5d
ln: use new non-classmethod add_signature_to_txin
2019-08-20 09:03:10 +02:00
Janus
b3dad9480c
ln: trim dust htlc outputs
2019-08-20 09:03:10 +02:00
ThomasV
8fe70fc0eb
do not set channel state in close_channel; the watcher should do it
2019-08-20 09:03:10 +02:00
ThomasV
61983c222a
lightning: single shared instance of Watcher, ChannelDB and PathFinder
2019-08-20 09:03:10 +02:00
ThomasV
3fd3b2a74d
disable lightning on mainnet
2019-08-20 09:03:10 +02:00
Janus
e7089c1458
ln: improve lnhtlc, passes test
2019-08-20 09:03:10 +02:00
Janus
56d5936661
lnhtlc: use current_per_commitment_point, current_commitment_signature
2019-08-20 09:03:10 +02:00
ThomasV
0ccafb547c
fix reestablish_channel
2019-08-20 09:03:10 +02:00
ThomasV
df960700c9
reestablish channels in network callback
2019-08-20 09:03:10 +02:00
ThomasV
322acd93d9
channel watcher class
2019-08-20 09:03:10 +02:00
Janus
4eb370d2e2
ln: add was_announced in test_lnhtlc
2019-08-20 09:03:10 +02:00
Janus
7f206d6e4c
ln: close channels
2019-08-20 09:03:10 +02:00
Janus
83c60441cf
ln: don't corrupt channels storage when multiple funding_locked are received
2019-08-20 09:03:10 +02:00
Janus
3f73332817
ln: don't break channel when failing htlc
2019-08-20 09:03:10 +02:00
Janus
6f88c55f17
ln: announcement reliability fixes for qt, remove asserts forbidding unbalanced channels
2019-08-20 09:03:10 +02:00
Janus
e9fec66eb4
ln: begin handling htlc failures
2019-08-20 09:03:10 +02:00
SomberNight
6d8cae11dd
add minor comment for RouteEdge as clarification
2019-08-20 09:03:10 +02:00
SomberNight
36519a535b
LNPathFinder: cltv delta of first edge in a path should be ignored
2019-08-20 09:03:10 +02:00
Janus
a106760469
ln: channel announcements
2019-08-20 09:03:10 +02:00
Janus
275f1e6cbc
ln: lnpay: revoke until we get a commitment tx without htlcs
2019-08-20 09:03:10 +02:00
Janus
f169bff89e
ln: fix reestablishing channel with no mined funding tx
2019-08-20 09:03:10 +02:00
Janus
3ea6415dc7
ln: fix repeated payments
2019-08-20 09:03:10 +02:00
Janus
399fe08047
ln: avoid code duplication
2019-08-20 09:03:10 +02:00
Janus
d1769472bd
ln: save remote's secrets in RevocationStore, not our secrets. call lnhtlc.receive_revocation
2019-08-20 09:03:10 +02:00
Janus
6c8bd2559b
lnbase/lnhtlc: use lnhtlc more instead of manually constructing tx'es
2019-08-20 09:03:10 +02:00
Janus
9010ea7e6e
lnbase: use sign_next_commitment for initial remote_ctx
2019-08-20 09:03:10 +02:00
Janus
434ce49451
lnbase: use lnhtlc when verifying our initial commitment tx
2019-08-20 09:03:10 +02:00
Janus
8eeaac8dda
lnbase: use broadcast_transaction instead of broadcast (follow up e57e55aad)
2019-08-20 09:03:10 +02:00
Janus
3270ac039c
test_lnbase: use new Peer API (with lnworker)
2019-08-20 09:03:10 +02:00
Janus
bd0f659f26
ln: remove unneeded forwarding htlc features, check commitment sig using lnhtlc while receiving
2019-08-20 09:03:10 +02:00
Janus
4d25933898
ln: integrate lnhtlc in lnbase, fix multiple lnhtlc bugs
2019-08-20 09:03:10 +02:00
Janus
5ed6f79a33
ln: request_initial_sync, increase our max_htlc_value, fix receiving payment
2019-08-20 09:03:10 +02:00
ThomasV
6e71340e52
do not block GUI with open_channel
2019-08-20 09:03:10 +02:00
ThomasV
40fcf58fec
lightning: display remote balance in gui
2019-08-20 09:03:10 +02:00
ThomasV
2b9be294a0
lnbase: mark_open on startup
2019-08-20 09:03:10 +02:00
ThomasV
f1d067f446
revert the introduction of add_invoice_coroutine in a612c2b09
2019-08-20 09:03:10 +02:00
ThomasV
aeb58dbd66
do not pass channel list to update_rows signal, as it is sent to all windows
2019-08-20 09:03:10 +02:00
SomberNight
6f246b90bf
wait for peer.initialized in channel_establishment_flow
2019-08-20 09:03:10 +02:00
ThomasV
11c6fce7bf
follow up 0b3a882e7d57c8a42be48c491a46dc814eab6acb
2019-08-20 09:03:10 +02:00
ThomasV
2ae4b1862d
simplify funding_locked
...
expose lnworker in peer
update channel_db when channels are open
2019-08-20 09:03:10 +02:00
ThomasV
21c883bd0b
Display channel status in the GUI.
...
Do not convert channel_id to integer; there is no reason to do that.
2019-08-20 09:03:10 +02:00
ThomasV
bf6d28e1f0
integrate channels_list with existing framework
2019-08-20 09:03:10 +02:00
ThomasV
4fe912f4b3
qt: fix unit of lnaddr.amount
2019-08-20 09:03:10 +02:00
ThomasV
6263b472d9
follow-up a612c2b0983ab4c6798156aebf1cd550fb3e0447
2019-08-20 09:03:10 +02:00
Janus
497706afbf
ln: htlc state machine (not used yet)
2019-08-20 09:03:10 +02:00
Janus
85e18be7d0
ln: save channels in dict, warn on invoice exceeding max_htlc amount
2019-08-20 09:03:10 +02:00
ThomasV
34d5f1b2e3
lightning: connect send button
2019-08-20 09:03:10 +02:00
ThomasV
12d3877873
lightning GUI: use existing receive and send tabs with lightning invoices
2019-08-20 09:03:10 +02:00
Janus
7d2a6d83d5
ln: don't make invoice if peer can't possibly pay, append _sat to sat
...
parameters to avoid confusion
2019-08-20 09:03:10 +02:00
ThomasV
b74d4261af
lnworker: generate and save private key
2019-08-20 09:03:10 +02:00
ThomasV
af4f0b6daf
lnworker: separate invoice creation from payment flow
2019-08-20 09:03:10 +02:00
Janus
ae3971259d
ln: restore channels correctly after restart
...
* save funding_locked_received: if a node already sent us
funding_locked, save it to avoid superfluous messages
* use Queues instead of Futures: this ensure that we don't error if we
receive two messages of the same type, and in avoids having to delete
futures in finally blocks. A queue monitor could be added to detect
queue elements that are not popped.
* request initial routing sync: since we don't store the graph yet, it
is better to request the graph from the Peer so that we can route
* channel_state cleanup: now each channel should have a state, which is
initialized to OPENING and only marked OPEN once we have verified that
the funding_tx has been mined
2019-08-20 09:03:10 +02:00
ThomasV
aafbe74a28
fix channel_reestablish
2019-08-20 09:03:10 +02:00
ThomasV
1f6646fa25
lnbase: fix read_message
2019-08-20 09:03:10 +02:00
Janus
6a8e5d5954
ln: restore functionality
2019-08-20 09:03:09 +02:00
Janus
4268be9093
ln: save remote node_id in channel
2019-08-20 09:03:09 +02:00
SomberNight
8ba63380b4
split lnrouter from lnbase
2019-08-20 09:03:09 +02:00
SomberNight
f6763b6084
remove function H256
2019-08-20 09:03:09 +02:00
ThomasV
762dea6593
fix amount in open_channel, add listchannels command
2019-08-20 09:03:09 +02:00
ThomasV
b71f020fc9
move on_funding_locked to lnworker
2019-08-20 09:03:09 +02:00
ThomasV
0552c61b66
lightning: add payment methods to lnworker
2019-08-20 09:03:09 +02:00
ThomasV
c621ae8f6e
lightning: move lnworker code to its own module
2019-08-20 09:03:09 +02:00
ThomasV
f66377604d
fix lnaddr.py following rebase
2019-08-20 09:03:09 +02:00
ThomasV
5666188e9e
update lnbase after crypto refactoring
2019-08-20 09:03:09 +02:00
Janus
1d8c771440
lnbase: remove lnbase stub
2019-08-20 09:03:09 +02:00
ThomasV
8abd072c89
lnbase: pass password to mktx
2019-08-20 09:03:09 +02:00
ThomasV
5a819611c8
qt: fix password passed to open_channel, cleanup
2019-08-20 09:03:09 +02:00
Janus
6ac15962dc
lnbase: mSAT hygiene, multiple multi-hop payments can be received
2019-08-20 09:03:09 +02:00
Janus
10e8a90224
kivy: port lightning ui to lnbase
2019-08-20 09:03:09 +02:00
Janus
18963405ee
lightning: remove hub based approach, port qt gui to lnbase
2019-08-20 09:03:09 +02:00
Janus
4fdf1b9b84
lnbase: use small buffer when reading, support new_channel without payment in online test, send channel_reserve_satoshis
2019-08-20 09:03:09 +02:00
Janus
5d375de30e
lnbase: use correct cltv_expiry calculation (use invoice)
2019-08-20 09:03:09 +02:00
Janus
eeb027babc
lnbase: fix multi-hop payments
2019-08-20 09:03:09 +02:00
Janus
001ab4e3bc
lnbase: fix onion-hop payload construction again (cltv currently broken)
2019-08-20 09:03:09 +02:00
Janus
1d267f1226
lnbase: fix multi-hop fees, initial handling of received update_add_htlc during payment
2019-08-20 09:03:09 +02:00
Janus
f6995b99d9
lnbase: calculate cltv_expiry for onion_packet correctly
2019-08-20 09:03:09 +02:00
Janus
6c67ad24f3
lnbase: try multi-hop onion package, type safety
2019-08-20 09:03:09 +02:00
SomberNight
43eb33327e
PathFinder: change path element semantics from "from node, take edge" to "to get to node, use edge"
2019-08-20 09:03:09 +02:00
SomberNight
50cc603d91
create route from path, that includes extra info needed for routing
2019-08-20 09:03:09 +02:00
SomberNight
5b1da26041
bolt-04: decryption of errors
2019-08-20 09:03:09 +02:00
Janus
5da3820a28
lnbase online test: use random node key when making new channel, save node key, multiple actions per invocation
2019-08-20 09:03:09 +02:00
Janus
b81fb44952
lnbase: fix pay(), save htlc_id's, generate onion packet correctly
2019-08-20 09:03:09 +02:00
Janus
34da1349e0
lnbase/online_test: save short_channel_id to wallet and build onion packet with it
2019-08-20 09:03:09 +02:00
SomberNight
7ba3f2d54d
calc short_channel_id after funding locked
2019-08-20 09:03:09 +02:00
Janus
6bf2714e33
lnbase: initial 'payment to remote' attempt
2019-08-20 09:03:09 +02:00
Janus
928eb886c5
lnbase: formatting, remove imports
2019-08-20 09:03:09 +02:00
Janus
2e23ecb3ca
lnbase: verify commitment tx'es again
2019-08-20 09:03:09 +02:00
Janus
73a17c93ee
lnbase: infinite amount of incoming payments
2019-08-20 09:03:09 +02:00
Janus
6173c2d7a7
lnbase: two payments working, temporarily disable sig check
2019-08-20 09:03:09 +02:00
Janus
ee87920573
lnbase: store remote revocation store, don't store all remote revocation points, verify ctn numbers in reestablish
2019-08-20 09:03:09 +02:00
Janus
3a20c8ce00
lnbase: add RevocationStore test, remove unnecessary lnd helper functions
2019-08-20 09:03:09 +02:00
Janus
cf82150aab
lnbase: compact commitment secret storage
2019-08-20 09:03:09 +02:00
Janus
c5fb090e5c
lnbase: no negative commitment number nonsense
2019-08-20 09:03:09 +02:00
Janus
2338d18ab8
lnbase: move channel commitment number increment to function
2019-08-20 09:03:09 +02:00
Janus
2a594e9d0e
lnbase: receive repeated payments
2019-08-20 09:03:09 +02:00
Janus
913176b4b1
tests: don't use default lightning_peers in online test
2019-08-20 09:03:09 +02:00
Janus
d9d2989a6a
lnbase: channel reestablishment working
2019-08-20 09:03:09 +02:00
SomberNight
a58a345dc3
bolt-04: implement processing of onion packets
2019-08-20 09:03:09 +02:00
SomberNight
053c571d74
minor clean-up of prev. util.xor_bytes
2019-08-20 09:03:09 +02:00
SomberNight
47b1bed539
implement bolt-04 onion packet construction
2019-08-20 09:03:09 +02:00
Janus
60b77f6a00
lnbase: save channel details in wallet, enable running online test with reestablishment_mode
2019-08-20 09:03:09 +02:00
Janus
d3f8fe923c
lnbase: move waiting for funding_locked to new function, make function for signing and sig conversion
2019-08-20 09:03:09 +02:00
Janus
d96b80ad1f
lnbase: make function for building htlc_tx depending on if it is for_us/we_receive
2019-08-20 09:03:09 +02:00
Janus
309aca69b8
lnbase: verify their htlc signature
2019-08-20 09:03:09 +02:00
ThomasV
6b79052bc9
lnbase: standardize to_bytes calls
2019-08-20 09:03:09 +02:00
Janus
fa80fd4bd5
lnbase: fix custom local to_self_delay, use node privkey derived from timestamp in online test
2019-08-20 09:03:09 +02:00
Janus
517e19ebab
test_lnbase_online: pass password=None to channel_establishment_flow
2019-08-20 09:03:09 +02:00
Janus
1363dfb522
lnbase: avoid copying variables, insert newlines
2019-08-20 09:03:09 +02:00
ThomasV
96544b8b58
lnbase: derive keys from wallet keystore
2019-08-20 09:03:09 +02:00
Janus
bdec72dd4b
lnbase: avoid local variables, remote useless comments, name basepoints as such
2019-08-20 09:03:09 +02:00
Janus
e1f7eb6cb3
lnbase: set new field in Transaction instead of returning a tuple in make_commitment
2019-08-20 09:03:09 +02:00
Janus
194a2bba16
lnbase: set to_self_delay back to 144, defer cltv_expiry problem
2019-08-20 09:03:09 +02:00
Janus
19d8a13232
lnbase: use correct delay
2019-08-20 09:03:09 +02:00
Janus
20f0464009
lnbase: avoid code duplication, return htlc outpoint dict in make_commitment
2019-08-20 09:03:09 +02:00
Janus
5f38019420
lnbase: simplify commitment transaction building with open channel
2019-08-20 09:03:09 +02:00
Janus
39dcc24133
lnbase: organize channel data
2019-08-20 09:03:09 +02:00
Janus
c2bbc1ec60
lnbase: allow passing KeypairGenerator to channel_establishment_flow, fix derive_privkey
2019-08-20 09:03:09 +02:00
Janus
9f8d6625ec
lnbase: receiving invoice payment works
2019-08-20 09:03:09 +02:00
Janus
6d87599964
lnbase: commitment_signed, revoke_and_ack now accepted without errors
2019-08-20 09:03:09 +02:00
SomberNight
b3da13420b
bitcoin.py: SCRIPT-related clean-up. transaction.py: construct_witness
2019-08-20 09:03:09 +02:00
Janus
75e7b3af49
lnbase: fix their new commitment transaction (htlc tx construction still incorrect)
2019-08-20 09:03:09 +02:00
ThomasV
71eacb4eab
lnbase: fix bug in message parsing
2019-08-20 09:03:09 +02:00
ThomasV
7176b0834c
follow up b5eb7dd7683f24f03c80ab8f612658b5f3966eb1
2019-08-20 09:03:09 +02:00
Janus
e9e0d60432
lnbase: attempt at making htlc_signature to send (currently remote fails due to wrong num_htlcs in commitment_signed)
2019-08-20 09:03:09 +02:00
ThomasV
c7e3f7e4e4
simplification
2019-08-20 09:03:09 +02:00
Janus
f32149e609
lnbase: add TODO explaining how to verify htlc_signature given to us
2019-08-20 09:03:09 +02:00
Janus
e98f23c4ed
lnbase: verification of new local commitment working
2019-08-20 09:03:09 +02:00
Janus
e264a21c64
lnbase: derive next keys when making updated local commitment transaction
2019-08-20 09:03:09 +02:00
Janus
3c34628ffb
lnbase: try to receive payment, work on commitment tx with htlcs
2019-08-20 09:03:09 +02:00
Janus
0f552422a6
lnbase: handle commitment transaction update (receive funds, not working yet)
2019-08-20 09:03:09 +02:00
Janus
1ffaed718c
simnet/testnet support in bolt11, set max-htlc-value-in-flight
2019-08-20 09:03:09 +02:00
SomberNight
fd7469745e
transaction.py: sign_txin. allow override for get_preimage_script.
...
test_commitment_tx_with_all_five_HTLCs_untrimmed_minimum_feerate now passes
2019-08-20 09:03:09 +02:00
ThomasV
4d41299f1c
redundant: you subscribed only to 'updated'
2019-08-20 09:03:09 +02:00
ThomasV
21be384603
lnbase: verify remote signature
2019-08-20 09:03:09 +02:00
SomberNight
e9bad2e862
channel_establishment_flow: use get_per_commitment_secret_from_seed
2019-08-20 09:03:09 +02:00
Janus
edf6fe7a94
lnbase: improve htlc_tx generation (only localsig wrong)
2019-08-20 09:03:09 +02:00
SomberNight
3e899caaf4
get_per_commitment_secret_from_seed: small clean-up
2019-08-20 09:03:09 +02:00
Janus
b523085fa3
fix derive_secret
2019-08-20 09:03:09 +02:00
SomberNight
576a74a48a
get_per_commitment_secret_from_seed (not working yet)
2019-08-20 09:03:09 +02:00
Janus
f0e19ffdfd
lnbase: avoid race while waiting for funding_locked, wait for un-reversed hash
2019-08-20 09:03:09 +02:00
Janus
4d3c34e04e
complete bolt11 port to ecdsa instead of secp256k1
2019-08-20 09:03:09 +02:00
SomberNight
4aa9d7ea0d
channel_establishment_flow: wait for confirmations of funding txn
2019-08-20 09:03:09 +02:00
ThomasV
a4809245b3
add processing flow for funding_locked
2019-08-20 09:03:09 +02:00
ThomasV
2d305bd218
lnbase: fix parameters to make_commitment in htlc test
2019-08-20 09:03:09 +02:00
SomberNight
22f6deacb8
transaction.py: shortcut witness/scriptSig serialisation
2019-08-20 09:03:09 +02:00
Janus
d055507003
lightning channels list: add mock server for testing
2019-08-20 09:03:09 +02:00
Janus
fc822ab927
lnbase: add some comments
2019-08-20 09:03:09 +02:00
SomberNight
f174609158
constants.py: Simnet inherits from Testnet
2019-08-20 09:03:09 +02:00
Janus
8468fc8f68
use same servers for simnet as for regtest
2019-08-20 09:03:09 +02:00
Janus
b22bdae951
lightning-hub: update rpc stubs, do not ignore them in gitignore
2019-08-20 09:03:09 +02:00
ThomasV
5f4328fb3a
lnbase: fix initial commitment transaction
2019-08-20 09:03:09 +02:00
SomberNight
815079efe0
refactor storage of channels, path finding
2019-08-20 09:03:09 +02:00
Janus
5b1a5e8786
avoid duplicating bech32 module
2019-08-20 09:03:09 +02:00
Janus
f278833c40
lnbase: more work on make_htlc_tx
2019-08-20 09:03:09 +02:00
Janus
d7244f6708
lnbase: make_htlc_tx
2019-08-20 09:03:09 +02:00
ThomasV
ab7a854f9a
fix: use remote_per_commitment_point
2019-08-20 09:03:09 +02:00
ThomasV
8f00bdb0b0
lnbase: derive blinded pubkey
2019-08-20 09:03:09 +02:00
ThomasV
d4377cc073
lnbase: fix variable name
2019-08-20 09:03:09 +02:00
ThomasV
6c4c2267f8
lnbase: add privkey derivation
2019-08-20 09:03:09 +02:00
ThomasV
6d703db971
add test for key derivation
2019-08-20 09:03:09 +02:00
ThomasV
aa8700d0b3
lnbase: key derivation (WIP)
2019-08-20 09:03:09 +02:00
Janus
4b8f279d50
lnbase: test signing of first htlc test case
2019-08-20 09:03:09 +02:00
Janus
fa86dda983
lnbase: make_received_htlc
2019-08-20 09:03:09 +02:00
ThomasV
6ba846bff0
fix hash in make_offered_htlc
2019-08-20 09:03:09 +02:00
ThomasV
2c717194b2
cleanup lnbase tests
2019-08-20 09:03:09 +02:00
Janus
6634027a03
lightning-hub: remove path hack, use relative imports
2019-08-20 09:03:09 +02:00
SomberNight
f8f365f1ea
naive route finding
2019-08-20 09:03:09 +02:00
Janus
a23aac76d3
lnbase: offered htlc script construction
2019-08-20 09:03:09 +02:00
ThomasV
1bc6958c83
use acceptable variable names
2019-08-20 09:03:09 +02:00
ThomasV
60d6080fe5
lightning: separate testing from main code
2019-08-20 09:03:09 +02:00
ThomasV
1c3e9b0cf8
lightning: store network view
2019-08-20 09:03:09 +02:00
ThomasV
e4b188c714
lnbase: parse ipv6, fix transport bug
2019-08-20 09:03:09 +02:00
ThomasV
d212c90ed9
lnbase: fix read_message, reduce verbosity
2019-08-20 09:03:09 +02:00
ThomasV
8e7df0be71
lnbase: implement key rotation, request initial sync in localfeatures
2019-08-20 09:03:09 +02:00
ThomasV
969708316c
lnbase: verify signature in node_announcement
2019-08-20 09:03:09 +02:00
SomberNight
b662a9d87b
bitcoin.py: implement add_number_to_script. fix CSV arg in make_commitment.
2019-08-20 09:03:09 +02:00
ThomasV
57b63cf490
lnbase: fix test
2019-08-20 09:03:09 +02:00
SomberNight
98f46dbaf5
implement script_num_to_hex. fix encoding of argument for CSV in make_commitment
2019-08-20 09:03:09 +02:00
Janus
caadc5a5bb
lightning_channels_list: use signals to avoid segfault
2019-08-20 09:03:09 +02:00
SomberNight
aaa67adb5a
fixes for make_commitment, but still incorrect destination address (csv arg?)
2019-08-20 09:03:09 +02:00
ThomasV
eca8d13e37
lnbase: fix tx amounts
2019-08-20 09:03:09 +02:00
Janus
a9edd170c7
lightning-hub: include ln relative to current directory
2019-08-20 09:03:09 +02:00
Janus
3fb6951d10
lnbase_test: add first commitment tx with 5 htlcs test
2019-08-20 09:03:09 +02:00
ThomasV
316f9a3954
lnbase: fix locktime and nsequence
2019-08-20 09:03:09 +02:00
Janus
814146f099
lnbase_test: insert remote_signature and compare fields independently
2019-08-20 09:03:09 +02:00
ThomasV
7b6f64a402
lnbase: create unit test for commitment tx
2019-08-20 09:03:09 +02:00
ThomasV
52ae63990f
lnbase: fix signature index
2019-08-20 09:03:09 +02:00
ThomasV
ba99795131
lnbase: initial commitment transaction
2019-08-20 09:03:09 +02:00
ThomasV
451d52281a
lnbase: fix funding address, funding_output_index
2019-08-20 09:03:09 +02:00
ThomasV
5a4ab74c77
follow up 1aac9e59ed957898fceef99b29b9cc17d7843569
2019-08-20 09:03:09 +02:00
ThomasV
dd73a4596e
lnbase: communication privkey belongs to peer
2019-08-20 09:03:09 +02:00
Janus
668c3887d6
lnbase: more parts of channel establishment
2019-08-20 09:03:09 +02:00
Janus
2353415445
lnbase: remove unnecessary try/except
2019-08-20 09:03:09 +02:00
Janus
e7b92b8184
lnbase: lnbase_test must use threadsafe task submission
2019-08-20 09:03:09 +02:00
ThomasV
9781201fa0
lnbase: decorator that handles exceptions
2019-08-20 09:03:09 +02:00
Janus
483ec42156
lnbase: fix shutdown when lnbase has exception in main_loop
2019-08-20 09:03:09 +02:00
Janus
e906e6e90a
lnbase: print exceptions from main_loop
2019-08-20 09:03:09 +02:00
Janus
b9ca972445
lnbase: initialize loop variable in main
2019-08-20 09:03:09 +02:00
Janus
9617447a0f
lnbase: add lnbase_test
2019-08-20 09:03:09 +02:00
ThomasV
70dd4d1235
lnbase: expose wallet object in LNWorker
2019-08-20 09:03:09 +02:00
Janus
e1824233b5
lnbase: merge initialize and main_loop
2019-08-20 09:03:09 +02:00
Janus
7bd3cbf567
lnbase: handle error during channel establishment
2019-08-20 09:03:09 +02:00
Janus
78119f9733
lnbase: channel establishment flow, avoid using Wallet instance
2019-08-20 09:03:09 +02:00
ThomasV
1f5852bd15
lnbase: use relative imports
2019-08-20 09:03:09 +02:00
Janus
784b06f1b9
lnbase: support simnet/testnet, create accepted open_channel message
2019-08-20 09:03:09 +02:00
Janus
ab2e03fcb5
lnbase: use valid pubkeys in open_channel
2019-08-20 09:03:09 +02:00
Janus
304c4b0222
lnbase: try sending open_channel
2019-08-20 09:03:09 +02:00
ThomasV
d8eedf514d
lnbase: add draft handlers
2019-08-20 09:03:09 +02:00
Janus
fc2864cb63
lnbase: avoid reimplementing int.to_bytes
2019-08-20 09:03:09 +02:00
Janus
f2066c4629
lnbase: avoid reimplementing int.from_bytes
2019-08-20 09:03:09 +02:00
Janus
94b87ac7d1
lnbase: do not catch all exceptions, tolerate calculations with variables from kwargs
2019-08-20 09:03:09 +02:00
ThomasV
3795770b37
integrate lnbase with network
2019-08-20 09:03:09 +02:00
ThomasV
0fac793735
lnbase: process ping messages
2019-08-20 09:03:09 +02:00
ThomasV
98707a3624
lnbase: create main loop
2019-08-20 09:03:09 +02:00
ThomasV
bcb268d554
lnbase: save buffer for next read
2019-08-20 09:03:09 +02:00
ThomasV
7421bffaa2
lnbase: Peer class
2019-08-20 09:03:09 +02:00
ThomasV
692bc148bb
lnbase: fix json loading and indentation
2019-08-20 09:03:09 +02:00
Janus
c69f812f13
lightning: do not list python files as resources, use lightning spec generated serialization
2019-08-20 09:03:09 +02:00
ThomasV
cbf8d4c781
lightning network base
2019-08-20 09:03:09 +02:00
Janus
094b939a24
lightning: qt channel dialog, fix for shutdown when lightning disabled
2019-08-20 09:03:09 +02:00
Janus
5e1412a839
lightning: channel details popup
2019-08-20 09:03:09 +02:00
Janus
ec89b496bf
lightning: do not catch BaseException unnecessarily, fix clearSubscribers, detect passworded wallet correctly
2019-08-20 09:03:09 +02:00
ThomasV
fe1a1b27c6
simplify parameters, add lndhost to config
2019-08-20 09:03:09 +02:00
Janus
0abfcd2b6a
lightning: add --simnet and --lightning switches
2019-08-20 09:03:09 +02:00
Janus
ae7bce3385
lightning: paste sample using clipboard
2019-08-20 09:03:09 +02:00
Janus
6aebc0fd5d
kivy: fix channel list error handling, close functionality for inactive channels
2019-08-20 09:03:09 +02:00
Janus
1a05838ef2
lightning: assert result type, add invoice qr dialog
2019-08-20 09:03:09 +02:00
Janus
afa5797099
lightning: kivy: open channel button in invoice
2019-08-20 09:03:09 +02:00
Janus
1ab03e8b2a
lightning: fix kivy channel close
2019-08-20 09:03:09 +02:00
Janus
d19e8e7f9b
lightning: python3.5 compat
2019-08-20 09:03:09 +02:00
Janus
ffe6342882
lightning: fix channels dialog
2019-08-20 09:03:09 +02:00
Janus
13527987bc
lightning: add missing import, set console to none initially
2019-08-20 09:03:09 +02:00
Janus
76bd120bdf
lightning: do not require lock for broadcast tx, it is thread-safe
2019-08-20 09:03:09 +02:00
Janus
311c53ef1d
lightning: save key derivation point
2019-08-20 09:03:09 +02:00
Janus
6ab8badb61
lightning: separate thread for publish transaction
2019-08-20 09:03:09 +02:00
Janus
277e5be229
lightning: use queueing lock
2019-08-20 09:03:09 +02:00
Janus
0f6566d11e
lightning: less junk on console, quicker shutdown
2019-08-20 09:03:09 +02:00
Janus
e3ef8d7ec4
lightning: don't receive too much data, workaround by reading byte by byte
2019-08-20 09:03:09 +02:00
Janus
d84eab0418
lightning: complete moving of lightning objects, acquire net/wallet lock while answering lightning requests
2019-08-20 09:03:09 +02:00
Janus
98f6f67c6b
lightning: misc patches, launch asyncio loop on separate thread
2019-08-20 09:03:09 +02:00
Janus
ad5aac1383
lightning: march 2018 rebase, without integration
2019-08-20 09:03:09 +02:00
ThomasV
9c454726f4
rename WizardChoiceDialog (ambiguous)
2019-08-20 09:02:33 +02:00
SomberNight
bffc2a1d4b
wizard: try harder to have temporarily stored pw erased from memory
2019-08-14 17:27:38 +02:00
SomberNight
25a1ed048f
qt preferences: cast some config values to bool
...
to gracefully handle unexpected values
fixes #5562
2019-08-14 17:15:03 +02:00
ThomasV
b42009acb7
signtransaction: pass pubkey to tx.sign ( fix #5522 )
2019-08-14 12:49:35 +02:00
ThomasV
1d637ef988
fix #5558
2019-08-14 12:00:36 +02:00
ThomasV
aa7aeb9014
disable go_back button in wizard password dialog ( fix #5509 )
2019-08-14 10:14:28 +02:00
SomberNight
e62d652f14
(trivial) time.clock is deprecated, replace with time.process_time
2019-08-14 02:18:08 +02:00
SomberNight
bf7beba60c
kivy wizard: script type dialog now uses toggle buttons
2019-08-13 20:12:27 +02:00
SomberNight
bcbd52d752
kivy wizard: dedicated button for seed options
...
previously user had to touch the text field itself
2019-08-13 19:19:50 +02:00
ThomasV
a7b61fcab9
kivy: support bip39 seeds
2019-08-13 17:14:54 +02:00
SomberNight
95ae42b998
kivy wizard: undo Window.bind callbacks
...
related: #5534
2019-08-13 17:12:42 +02:00
Christian Clauss
e34afd62ce
Travis CI: Use flake8 to find Python syntax errors and undefined names ( #5467 )
2019-08-11 22:35:23 +00:00
ThomasV
9eebb306f2
Merge pull request #5550 from zebra-lucky/fix_qt_gui_qrcodewidget_pen
...
qt gui: fix qrcodewidget pen for retina display
2019-08-10 10:08:47 +02:00
zebra-lucky
93724ba33a
qt gui: fix qrcodewidget pen for retina display
2019-08-10 03:18:15 +03:00
SomberNight
1c75d939d9
commands: change API of "make_seed" and "create" commands
...
instead of "segwit" boolean, take a "seed_type" optional arg
default seed_type to "segwit"
previously these commands created legacy seeds by defalt
2019-08-09 22:02:01 +02:00
SomberNight
0ec9f79402
rerun freeze_packages
2019-08-09 21:28:35 +02:00
SomberNight
018b962e61
requirements: allow using newer pycryptodomex
...
upper bound was previously added in cb4784c8ed
issue linked there was fixed in pyinstaller 3.5,
which we now use since ab95eff5aa
2019-08-09 21:27:13 +02:00
SomberNight
fc5248550c
appimage build: change base to ubuntu 16.04
...
ubuntu 14.04 is EOL
2019-08-09 20:56:20 +02:00
SomberNight
dfad0f43c0
ledger nano: fix monospace font on Windows, and text readability
2019-08-09 20:18:38 +02:00
SomberNight
be4cf321e0
ledger: remove mobile pairing 2FA support for Ledger Nano
...
service no longer provided by Ledger; app not in Google Play Store any more
based on Electron-Cash/Electron-Cash#1298
2019-08-09 19:54:09 +02:00
SomberNight
ab95eff5aa
build: update pyinstaller to 3.5
2019-08-09 19:13:12 +02:00
SomberNight
c8e2653690
wine build: pin build dependencies
...
"pip install pyinstaller" was "silently" grabbing unpinned dependencies
2019-08-09 19:05:32 +02:00
SomberNight
d4e16001bb
update block header checkpoints
2019-08-09 18:59:21 +02:00
SomberNight
8c91deb621
storage: better error msg on unsupported seed version
2019-08-09 18:11:50 +02:00
SomberNight
9547fb7b06
qt console: accept kwargs for commands.py methods
...
e.g. make_seed(nbits=264, segwit=True)
also allow setting "password" as a kwarg
2019-08-06 05:20:53 +02:00
ThomasV
3a35ab2574
Merge pull request #5534 from zebra-lucky/kivy_installwizard_back_button
...
gui/kivy: fix installwizard back button behaviour
2019-08-02 12:06:06 +02:00
ThomasV
d9a67c6e5d
Merge pull request #5542 from gballet/fix-electrum-env-for-freebsd
...
Fix electrum-env on FreeBSD
2019-08-02 08:38:08 +02:00
SomberNight
8390da9b7b
bitcoin.py: dedupe pubkeyhash_to_p2pkh_script
2019-07-31 01:18:51 +02:00
SomberNight
a10dc04b28
wallet: fix offline hw wallet signing when not specifying --offline
...
closes #5532
2019-07-29 13:27:37 +02:00
Daniel Kraft
3f8661b069
Unit tests for Blockchain.verify_header.
...
The function Blockchain.verify_header was previously not covered by tests
at all. Even removing all the tests in it would still make the unit tests
pass. This change adds tests for this important (!) function.
2019-07-28 13:23:20 +02:00
Guillaume Ballet
fc220c17ec
Make sure bash can be found on *BSD
2019-07-28 07:08:56 +00:00
zebra-lucky
e953eebdb9
gui/kivy: fix installwizard back button behaviour
2019-07-28 04:04:20 +03:00
Axel Gembe
84ca7ef306
Build: Set a fixed umask before starting Docker
...
Umask seems to leak into Docker containers and causes the build to
not be reproducible accross different umasks.
-----
taken from Electron-Cash/Electron-Cash@984967b408
2019-07-23 21:24:32 +02:00
ThomasV
2a80f6a3ad
Merge pull request #5520 from ldz1/exchange-fix
...
Exchange fix
2019-07-21 13:28:19 +02:00
ldz1
d17489e971
Removed dead exchange.
2019-07-21 13:15:06 +02:00
ldz1
7dda20c492
Removed dead exchange.
2019-07-21 13:13:51 +02:00
SomberNight
249e3d496b
appimage build: rm "build" folder if present as it makes build non-reproducible
...
AFAICT the "build" is created if you "python setup.py install" electrum,
which is now deprecated in any case.
2019-07-19 04:52:26 +02:00
SomberNight
f60f690ca9
change many str(e) to repr(e) as some exceptions were cryptic
...
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
40e2b1d6e7
exchange_rate: fix #5495
2019-07-14 14:34:02 +02:00
ThomasV
16f56ccbf0
load version module in make_download
2019-07-11 16:54:47 +02:00
ThomasV
665d6540d7
pass host to upload script
2019-07-11 16:34:33 +02:00
SomberNight
e81f4bdcd1
prepare release 3.3.8
2019-07-11 14:51:54 +02:00
SomberNight
61bf5ce59a
windows build: calculate COFF checksum ourselves
...
closes #5504
2019-07-10 23:44:51 +02:00
SomberNight
c67705e116
appimage build: build was failing on some host systems
...
On Ubuntu host, build succeeded; but e.g. on Manjaro host, it failed with:
```
./build.sh: line 233: /opt/electrum/contrib/build-linux/appimage/../../../contrib/build-linux/appimage/.cache/appimage/appimagetool: No such file or directory
```
2019-07-10 20:26:25 +02:00
SomberNight
8a1052330d
wallet: loosen bump_fee sanity check further
...
fixes #5502
2019-07-10 16:35:40 +02:00
ThomasV
261c492c37
Merge pull request #5494 from SomberNight/tx_signing_perf_20190708
...
transaction: segwit input signing was doing quadratic hashing
2019-07-09 17:41:56 +02:00
SomberNight
cc42b4a226
transaction: segwit input signing was doing quadratic hashing
...
performance improvements are negligible for typical transactions though.
some measurements of wall clock time for Transaction.sign (with libsecp256k1):
0.11 sec -> 0.08 sec ( 61 p2wpkh-p2sh inputs, 1 output)
2.48 sec -> 0.75 sec ( 522 p2wpkh-p2sh inputs, 1 output)
13.2 sec -> 1.8 sec (1445 p2wpkh inputs, 1 output)
176.4 sec -> 7.6 sec (5542 p2wpkh inputs, 1 output)
2019-07-09 17:37:02 +02:00
SomberNight
a14016275b
transaction.serialize_preimage: trivial clean-up
2019-07-08 05:58:57 +02:00
SomberNight
b4bf39ee92
qt coins tab: let user filter by prevout_hash/prevout_n
2019-07-08 05:20:26 +02:00
SomberNight
91d8f12f44
servers: follow-up prev
2019-07-06 00:35:03 +02:00
SomberNight
eb92bda597
servers: rm phishing domain
...
(and update a port)
2019-07-06 00:25:55 +02:00
SomberNight
aadde9be17
transaction: fix remove_signatures
...
closes #5491
2019-07-05 21:16:58 +02:00
SomberNight
cc9ad3ae90
wallet: fix restore_wallet_from_text edge case
...
closes #5490
2019-07-05 19:27:44 +02:00
SomberNight
9b82321fc0
verifier: further sanity checks for SPV verification.
...
Thanks to @JeremyRand
2019-07-05 18:39:40 +02:00
SomberNight
5bf854edcb
android build: make buildozer.spec more similar to upstream example
2019-07-05 00:10:55 +02:00
Axel Gembe
fc65cdaa8a
AppImage: Fix webbrowser.open not opening links
...
There was an issue where webbrowser.open would invoke a program like
kde-open5 that loaded the systems libQt5DBus, which was not satisfied
with the AppImage's libdbus. To fix this we fork the process, unset
LD_LIBRARY_PATH and then open the URL.
fixes #5425
-----
taken from Electron-Cash/Electron-Cash@00939aafd1
2019-07-05 00:02:26 +02:00
Axel Gembe
69b673b8a1
AppImage: Bundle more binaries to increase compatibility
...
This slightly increases the AppImage size but allows us to be more
compatible with older distributions.
-----
taken from Electron-Cash/Electron-Cash@96644acd6f
2019-07-04 23:35:52 +02:00
Axel Gembe
dcecf7db4b
Wine Build: Make it less noisy
...
This suppresses the pip script location warnings, like we already
do for AppImage. It also disables the Wine debugging messages by
setting WINEDEBUG=-all.
-----
taken from Electron-Cash/Electron-Cash@d3685b038e
2019-07-04 22:32:51 +02:00
Axel Gembe
0d1a473bb0
AppImage: Disable pip warnings about script install locations
...
It warns about scripts being installed in a location that is not on the
path, but that is inconsequential as they are not used.
-----
taken from Electron-Cash/Electron-Cash@9a29017c5d
2019-07-04 22:31:56 +02:00
SomberNight
c9006032d9
qt network dialog: let user edit server host/port in peace
...
incoming network updates could keep changing the text fields while
user is editing them
2019-07-04 21:46:11 +02:00
SomberNight
1518c7d133
build macOS README: mention how Qt affects min supported macOS version
2019-07-04 20:53:24 +02:00
SomberNight
93d68a4361
exchange_rate: fix #5487
2019-07-04 19:55:03 +02:00
SomberNight
650225e238
crash reporter UX
...
see #5483
2019-07-04 19:13:12 +02:00
SomberNight
28ca561bba
added trigger_crash method for testing crash reporter
...
invoke via console as:
electrum.base_crash_reporter.trigger_crash()
2019-07-04 18:06:21 +02:00
SomberNight
94b721baa4
wallet: fix type error in _bump_fee_through_decreasing_outputs
...
fixes #5483
2019-07-04 17:23:34 +02:00
SomberNight
194bf84418
build readme nits
...
sudo is needed to rm FRESH_CLONE as docker is running as sudo.
the proper fix would be to have docker not run as sudo...
2019-07-03 21:09:11 +02:00
SomberNight
5ed6a68d8c
update make_locale doc references, and small nits
2019-07-03 17:42:40 +02:00
SomberNight
f1516d60ec
mac build: fix locale in binaries
2019-07-03 17:37:02 +02:00
SomberNight
ec56a4612c
make_tgz: build locale from deterministic submodule
2019-07-03 17:36:29 +02:00
ThomasV
7b7397a8c7
chmod push_locale
2019-07-03 16:20:40 +02:00
ThomasV
5db21134aa
separate push and pull locale
2019-07-03 16:19:26 +02:00
ThomasV
aa00fa2a5c
update submodule
2019-07-03 16:01:10 +02:00
SomberNight
034c1e0828
prepare release 3.3.7
2019-07-03 15:47:05 +02:00
SomberNight
e431a07258
fix prev: conditional import / type hint failure
2019-07-03 13:56:11 +02:00
SomberNight
d293b2e038
wallet: follow-up prev
2019-07-03 13:40:42 +02:00
ThomasV
37e7add776
Do not pass storage to address_synchronizer
2019-07-03 10:46:30 +02:00
SomberNight
fb76fcc886
trezor: use only Bridge when available
...
fixes #5420
2019-07-02 21:21:39 +02:00
SomberNight
53893be4c9
crash reporter: in Qt subclass, do network request using WaitingDialog
...
so it does not block the GUI
2019-07-02 19:27:36 +02:00
SomberNight
1d0f67996e
build-wine: build our own pyinstaller bootloader
...
This seems to reduce anti-virus false positives.
based on:
Electron-Cash/Electron-Cash@1ac12e4111
Electron-Cash/Electron-Cash@9726498e95
Electron-Cash/Electron-Cash@40b1139d67
2019-07-01 22:22:25 +02:00
SomberNight
423d44bcaf
build-wine: some clean-up. cache downloads. better status messages
2019-07-01 20:18:30 +02:00
SomberNight
6455f515f0
build-wine: don't use gpg keyservers
...
based on Electron-Cash/Electron-Cash@a582be04d3
2019-07-01 18:01:14 +02:00
SomberNight
7c5247081b
change electrum.png to square (by padding)
...
ran "appimagelint" and apparently icon file needs to be a square
(could have just created another copy, but I guess a square icon
might make sense in other cases too)
2019-07-01 15:00:21 +02:00
SomberNight
4c63eca896
wallet.bump_fee: loosen sanity check a tiny bit
2019-06-29 16:22:37 +02:00
SomberNight
4f51308eab
coinchooser: clarify docs for make_tx
2019-06-29 16:21:07 +02:00
SomberNight
72d06038a7
synchronizer: fix race in _on_address_status
...
Triggering needs two consecutive scripthash status changes
in very quick succession. Client gets notification from server,
but then response to "blockchain.scripthash.get_history" will already contain
the changed-again history that has a different status.
20190627T101547.902638Z | INFO | synchronizer.[default_wallet] | receiving history mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL 1
20190627T101547.903262Z | INFO | synchronizer.[default_wallet] | error: status mismatch: mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL
2019-06-29 06:03:14 +02:00
SomberNight
37809bed74
qt high dpi: fix some text fields
...
There are probably other DPI related issues though.
closes #5471
closes #4597
closes #1927
2019-06-29 05:27:28 +02:00
SomberNight
e7304ce23e
TorDetector: minor clean-up
2019-06-29 04:03:29 +02:00
nachunjae
8a4e307b78
Update block explorer URL for btc.com ( #5438 )
...
* update block explorer URL for btc.com
2019-06-29 03:54:53 +02:00
SomberNight
f405c3fbdd
ledger: (trivial) rm some remnants of hw1 setup
2019-06-29 02:28:00 +02:00
SomberNight
935ab9a12f
interface: check if future already done in handle_disconnect
...
future could get cancelled in network.py in which case set_result raised
2019-06-28 21:13:33 +02:00
SomberNight
c6a54f05f5
wallet: some performance optimisations for get_receiving_addresses
...
jsondb takes a copy of the whole self.receiving_addresses
good for avoiding race conditions but horrible for performance...
this significantly speeds up at least
- synchronize_sequence, and
- is_beyond_limit (used by Qt AddressList)
2019-06-28 20:20:24 +02:00
SomberNight
a2bffb9137
network: harden against eclipse attacks
2019-06-27 19:10:25 +02:00
SomberNight
baa0293620
android build: persist debug keystore
...
so that we can upgrade debug installations on the phone and keep the datadir
2019-06-27 07:08:03 +02:00
SomberNight
0fafd8c0a7
fix #4777 again...
2019-06-27 05:00:16 +02:00
SomberNight
7bf6786bf5
build: note whether binary is reproducible in each case
2019-06-26 04:18:24 +02:00
SomberNight
4fc43da344
interface.debug will now also print errors
2019-06-26 01:16:34 +02:00
ThomasV
62e6ca50e1
do not log client-side RPC executions
2019-06-25 15:26:24 +02:00
SomberNight
570c0aeca3
build: make NSIS windows binary deterministic by changing the .ico file
...
see bitcoin/bitcoin@217208a36d
-----
A lot of time was wasted on this... over the years actually...
Some notes and rant here, for future reference.
During the initial effort to try to make binaries reproducible,
out of the three windows binaries being distributed (standalone, portable, setup),
only the first two were successfully made deterministic.
Later, we started to use Docker-based builds. At that point ThomasV and I
could reproducibly build the same setup/nsis exe but Travis kept building a different one.
Recently I have noticed that if I do two subsequent builds of the setup exe on
the same machine, adding a new file in contrib/build-wine/ between the builds,
then I get different binaries. Playing around with this a bit, it seems:
- other files that are in the same folder as contrib/build-wine/electrum.nsi affect the binary
- only files that are in exactly the same folder matter (not recursively)
- only filenames matter (not permission, owner, timestamps, or file contents)
To see the difference in the binaries, use vbindiff, and disable the compression done
by nsis (SetCompress off).
There is a ~48 byte diff near the very beginning of the "Uninstaller" section.
I am only guessing it is the uninstaller section based on the sizes of the sections
printed by nsis during the build.
I have downloaded the binary built by Travis, and the diff is consistent with this
(i.e. it's the same kind of diff that manifests if I change the filename of one of
the supposedly unrelated files).
Commenting out the "WriteUninstaller" line in .nsi fixes the issue. i.e. if no
uninstaller is created then the binary becomes deterministic.
Commenting out the "!define MUI_ICON" line in .nsi also fixes the issue.
At this point I remembered the above referenced commit by bluematt; which I had
thought we had already followed up on...
Replacing the .ico file fixes the issue.
Note that it's not actually clear what the exact requirements for the .ico file are.
Removing any of the layers in the image seems to introduce non-determinicity.
The new .ico file has layers with resolutions and properties the bitcoin.ico file has.
I guess NSIS must have strict requirements for the icon size, and if a given size icon is missing
it might be creating it itself?? And during the downscaling it uses a non-deterministic
algorithm that initialises some RNG from the directory listing (bauerj's guess somewhat adapted :D).
Just crazy.
2019-06-24 21:51:47 +02:00
SomberNight
9f28f8bcc6
Appimage: follow-up b69249f6c3
...
libsecp256k1.a needs to be deleted as it's not reproducible...
2019-06-23 04:17:46 +02:00
SomberNight
266484e0fd
Appimage: nits. use "fail"
...
somewhat based on same script in Electron-Cash/Electron-Cash
2019-06-23 04:13:28 +02:00
Axel Gembe
bb59a1298a
AppImage: Patch Python sysconfigdata
...
When building in docker on macOS, python builds with .exe extension
because the case insensitive file system of macOS leaks into docker.
This causes the build to result in a different output on macOS compared
to Linux. We simply patch sysconfigdata to remove the extension.
Some more info: https://bugs.python.org/issue27631
2019-06-23 04:13:23 +02:00
SomberNight
212ed8b18b
qt: set WWLabel text to be mouse-selectable by default
...
this lets user to copy-paste text in e.g. many wizard dialogs
2019-06-23 03:10:09 +02:00
SomberNight
31ba440d1c
build-wine: print some text before "pip install"
2019-06-23 03:09:05 +02:00
SomberNight
ec496a8222
requirements-hw: rm Cython
...
not actually needed
based on Electron-Cash/Electron-Cash@70de1a2b53
2019-06-23 03:06:36 +02:00
Axel Gembe
b69249f6c3
AppImage: Remove unused binaries
...
There are a lot of dupliacted files, testing files and unused libraries
present in the AppImage. Removing these reduces the AppImage size
significantly.
-----
taken from Electron-Cash/Electron-Cash@cff5fb1289
2019-06-23 02:56:33 +02:00
Axel Gembe
501fd8f9e5
AppImage: Improve reproducible Python build reliability on Linux
...
There was a problem where Python would not properly include the faketime
timestamp sometimes. This patch replaces faketime with a patch that is
used by Ubuntu for reproducible builds by exporting BUILD_DATE and
BUILD_TIME with the desired values.
-----
taken from Electron-Cash/Electron-Cash@9532508a3f
2019-06-23 02:47:16 +02:00
Axel Gembe
ae714772c3
AppImage: Make build reproducible
...
We build our own mksquashfs from squashfskit which supports generating
reproducible squashfs images. We use a small wrapper script to remove
the -mkfs-fixed-time which appimagekit passes but squashfskits
mksquashfs does not support.
-----
taken from Electron-Cash/Electron-Cash@dd1f106f4f
see AppImage/AppImageKit#929
2019-06-23 02:40:29 +02:00
SomberNight
fd5d1dab4f
coinchooser: clear up what "fee_estimator" expects
2019-06-20 22:46:22 +02:00
SomberNight
cb69aa80f7
coinchooser: don't spend buckets with negative effective value
...
Calculate the effective value of buckets, and filter <0 out.
Note that the filtering is done on the buckets, not per-coin.
This should better preserve the user's privacy in certain cases.
When the user "sends Max", as before, all UTXOs are selected,
even if they are not economical to spend.
see #5433
2019-06-20 22:42:50 +02:00
SomberNight
e0b1bbfc46
tests: new tests for bump_fee and rbf_batching
2019-06-20 22:42:50 +02:00
SomberNight
0c20fcb6b3
tests: fix existing bump_fee tests
2019-06-20 22:42:49 +02:00
SomberNight
8491a2d329
wallet: RBF batching will now reuse the change address
2019-06-20 22:42:49 +02:00
SomberNight
d0a43662bd
wallet: make "increase fee" RBF logic smarter
...
There are now two internal strategies to bump the fee of a txn.
bump fee method 1: keep all inputs, keep all not is_mine outputs,
allow adding new inputs
bump fee method 2: keep all inputs, no new inputs are added,
allow decreasing and removing outputs (change is decreased first)
Method 2 is less "safe" as it might end up decreasing e.g. a payment to a merchant;
but e.g. if the user has sent "Max" previously, this is the only way to RBF.
We try method 1 first, and fail-over to method 2.
Previous versions always used method 2.
fixes #3652
2019-06-20 22:42:48 +02:00
SomberNight
8bfe12e047
wallet: split "change address logic" from make_unsigned_transaction
2019-06-20 22:42:48 +02:00
SomberNight
e864fa5088
coinchooser: tweak heuristic scoring.
...
transactions without any change now get better scores.
transactions with really small change get worse scores.
2019-06-20 22:42:47 +02:00
SomberNight
f409b5da40
coinchooser: refactor so that penalty_func has access to change outputs
2019-06-20 22:42:47 +02:00
SomberNight
6424163d4b
wallet: fix rbf_batching edge case
...
The old change output was given to coinchooser
as part of possible UTXOs to use.
(Though the coinchooser was really unlikely to select it, as by
definition that UTXO is unconfirmed)
2019-06-20 21:53:24 +02:00
SomberNight
5f71163449
qt crash reporter: add warning that report contents are public
2019-06-20 17:32:21 +02:00
SomberNight
5effaaf428
TxOutput usage: trivial clean-up
2019-06-19 21:59:49 +02:00
SomberNight
c7a8540d06
kivy: show tx fee rate in tx dialog
2019-06-19 21:56:52 +02:00
SomberNight
cb204dd969
coinchooser: better account for fees in penalty_func
2019-06-17 19:55:39 +02:00
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
...
method should make sure prevout_n is str...
also wrote failing test
2019-06-15 03:51:11 +02:00
SomberNight
d07caaf601
qt msgbox: when using rich text, set text format to "AutoText" instead
...
"\n" newlines were ignored for WIF_HELP_TEXT InfoButtons
2019-06-13 17:03:12 +02:00
SomberNight
23ec426b4f
qt history list: tweak sort order of items
2019-06-13 01:03:56 +02:00
SomberNight
811169da4b
plugins: on some systems plugins with relative imports failed to load
...
this caused electrum to fail to start
potentially only older python 3.6.x are affected
fixes #5421
2019-06-12 20:07:36 +02:00
SomberNight
29ce50a305
follow-up prev
...
wallet.is_mine needs to tolerate None as input
2019-06-12 18:27:13 +02:00
SomberNight
9e21b76c91
wallet: stricter validation in export_private_key
...
fixes #5422
2019-06-12 18:09:38 +02:00
SomberNight
c7b64f4794
AppImage: update appimagetool version
2019-06-11 20:24:51 +02:00
SomberNight
63e5119ceb
builds: parallelise "make" by setting "-j4"
2019-06-11 20:02:28 +02:00
SomberNight
9d2b601cc7
update block explorer URL for blockchain.info
...
closes #5408
2019-06-11 19:19:43 +02:00
SomberNight
7120c344b2
qt seed completer: colour words yellow if only in old electrum list
...
Some people complained that due to merging the two word lists,
it is difficult to restore from a metal backup, as they planned
to rely on the "4 letter prefixes are unique in bip39 word list" property.
So we colour words that are only in old list.
2019-06-08 15:37:49 +02:00
SomberNight
5c83df7709
android: update kivy, p4a, buildozer
2019-06-07 20:06:15 +02:00
SomberNight
6bdc6f559c
storage: fix bug in convert_version_17
...
closes #5400
2019-06-06 19:51:37 +02:00
SomberNight
53d189fc7a
storage: fix some madness about get_data_ref() and put() interacting badly
...
previously load_transactions() had to be called before upgrade();
now we reverse this order.
to reproduce/illustrate issue, before this commit:
try running convert_version_17 and convert_version_18
(e.g. see testcase test_upgrade_from_client_2_9_3_old_seeded_with_realistic_history)
and then in qt console:
>> wallet.storage.db.get_data_ref('spent_outpoints') == wallet.storage.db.spent_outpoints
False
>> wallet.storage.db.get_data_ref('verified_tx3') == wallet.storage.db.verified_tx
False
2019-06-06 19:49:06 +02:00
SomberNight
33308307a4
bip70 payreq: do not show error messages in gui
...
closes #5393
2019-06-05 19:40:33 +02:00
SomberNight
0553ab7f3f
follow-up prev
...
PaymentRequest.error is really not intuitive.........
2019-06-05 19:05:58 +02:00
SomberNight
d2de8de356
qt payment requests: fix some races
...
closes #5283 , #5407 , #5121
2019-06-05 16:29:33 +02:00
SomberNight
0ec574bcf8
kivy tx_dialog: fix size of buttons in "Options" dropdown
2019-06-04 21:00:48 +02:00
SomberNight
fbcf6f48b9
rerun freeze_packages
2019-06-04 20:36:52 +02:00
SomberNight
046518d7f7
requirements: restrict qdarkstyle to <2.7
...
qdarkstyle 2.7 pulls in new dependencies
see ColinDuquesnoy/QDarkStyleSheet#182
2019-06-04 20:35:46 +02:00
SomberNight
6cf7aefe28
kivy: offer to copy raw hex tx to clipboard
...
related: #5405
2019-06-04 19:20:31 +02:00
SomberNight
21ab65e5f7
qt lists right click: fix #5365
2019-06-03 22:21:53 +02:00
SomberNight
0ef853c046
rm dead code
2019-06-03 20:35:37 +02:00
SomberNight
371e1a6ebf
hw: allow bypassing "too old firmware" error when using hw wallets
...
The framework here is generic enough that it can be used for any hw plugin,
however atm only Trezor is implemented.
closes #5391
2019-05-31 04:09:03 +02:00
SomberNight
7cba46c317
deprecation warnings: only show when running from source
2019-05-28 21:38:27 +02:00
SomberNight
ab81a09de2
interface: hide some server-induced errors from log
2019-05-28 21:23:06 +02:00
SomberNight
d17e6a1b87
interface: fix for aiorpcx 0.18
2019-05-28 06:14:53 +02:00
SomberNight
41802d8094
qt receive tab: "receive address" is now coloured red if already used
...
closes #3812
closes #5374
2019-05-27 20:24:09 +02:00
SomberNight
41f160dd74
update to aiorpcx 0.18
2019-05-27 19:35:30 +02:00
SomberNight
eaf203dbb5
interface: fix connecting to new servers using self-signed certs
...
got broken in 6ec1578a90
2019-05-27 19:09:54 +02:00
SomberNight
37da192bf5
wizard/hw: less spammy logs when hw library unavailable
...
closes #5380
2019-05-26 17:01:01 +02:00
SomberNight
30ffb3d4dc
util: add function "chunks"
...
taken from ElectrumX
67111a3c4c/electrumx/lib/util.py (L149)
2019-05-26 04:10:32 +02:00
SomberNight
1ebfcc0f36
kivy: "paste" button now works for transactions
2019-05-26 02:46:25 +02:00
SomberNight
c776af41f6
qt: allow QR codes to store a bit more data
...
by decreasing error correction (about ~26% larger max payload)
2019-05-26 02:13:02 +02:00
SomberNight
aec53ae6af
qt: "Help" and "?" buttons can show rich text
...
namely "Revealer" plugin uses rich text in its description
2019-05-26 01:27:27 +02:00
SomberNight
e1c1a9d6a2
interface: add comment
2019-05-25 05:20:21 +02:00
SomberNight
3b445d7248
fix #5376
2019-05-25 05:13:57 +02:00
SomberNight
158090bf8b
util.parse_URI: more granular exceptions
...
related: #5376
first report in #5376 was generated with these changes;
before, the exception was caught and a toast displayed "Not a Bitcoin URI"
2019-05-25 04:55:36 +02:00
SomberNight
a591ccf9b1
interface: follow-up 6ec1578a90
2019-05-22 17:43:33 +02:00
SomberNight
db9a9bbf25
qt settings: restart needed after toggling log_to_file
2019-05-21 20:57:29 +02:00
SomberNight
6ec1578a90
follow-up prev
2019-05-21 18:43:16 +02:00
SomberNight
fecef91ee0
interface was suppressing storage r/w exceptions
2019-05-21 18:11:49 +02:00
ThomasV
cf01788c86
Merge pull request #5367 from SomberNight/issue_5366
...
keystore/transactions: fix overflow of derivation path indices
2019-05-21 09:52:05 +02:00
SomberNight
6ad24ea3b3
keystore/transactions: fix overflow of derivation path indices
...
fixes #5366
2019-05-21 02:14:22 +02:00
Jochen Hoenicke
468c35e605
Update Johoe's server address ( #5363 )
2019-05-19 17:53:22 +02:00
shyrwall
a8b939711a
Spreading malware ( #5356 )
...
servers: rm phishing servers......
2019-05-18 03:41:58 +02:00
SomberNight
d3f65e24e1
kivy: warn user during "Send" if high fee (change condition)
...
Specifically, warning was previously triggered if fee > 1 mBTC;
now it is unified with Qt, warning is triggered if feerate > 600 sat/byte.
2019-05-17 20:10:10 +02:00
ThomasV
a762687740
Merge pull request #5354 from JeremyRand/readme-appimage
...
Add AppImage to "Creating Binaries" in README.md
2019-05-17 11:51:46 +02:00
JeremyRand
10098db59b
Add AppImage to "Creating Binaries" in README.md
2019-05-17 05:30:41 +00:00
ThomasV
9529b418e2
prepare release 3.3.6
2019-05-16 19:02:20 +02:00
SomberNight
763720715b
update release notes
2019-05-16 18:59:33 +02:00
SomberNight
e8bc5bbec4
interface: follow-up 6cc70bc7a2
2019-05-15 19:56:16 +02:00
Axel Gembe
cd52350f5d
AppImage: Remove unused PyQt5 modules
...
We already delete unused Qt modules, but we weren't deleting their PyQt5 modules.
-----
taken from Electron-Cash/Electron-Cash@e044c94677
2019-05-15 19:04:42 +02:00
Axel Gembe
5afda62ee3
AppImage: Remove Qt.so to prevent importing from PyQt5.Qt
...
Importing from PyQt5.Qt is an unnecessary fallback that loads every PyQt5 module.
-----
taken from Electron-Cash/Electron-Cash@d69471b31d
2019-05-15 19:03:18 +02:00
Axel Gembe
c3b92aa13a
AppImage: Copy libusb binary into image
...
pkg2appimage excludes libusb-1.0.so by default for no good reason:
83483c2971/excludelist (L112)
This can cause an issue when the AppImage loads the systems libusb but the
systems libusb in turn loads libudev from the AppImage. The kernel ABI for
libusb will not be changing so it is safe to bundle it into the AppImage.
-----
taken from Electron-Cash/Electron-Cash@25d45fdcbf
2019-05-15 19:01:39 +02:00
SomberNight
e415c0d930
wallet: (fix) synchronizer would also resub closed wallets...
...
network cb was not removed, so Synchronizer and the wallet itself was
kept in memory; and Synchronizer kept working
2019-05-14 17:04:03 +02:00
SomberNight
6cc70bc7a2
interface: when disconnecting due to RPCError, don't dump traceback
2019-05-14 15:58:02 +02:00
SomberNight
003e6c3e79
fix 2fa wallet creation via qt gui
...
closes #5334
2019-05-14 15:32:57 +02:00
SomberNight
7aaac2ee30
qt wizard: change wizard_dialog semantics to raise exceptions
...
Specifically GoBack and UserCancelled will not be suppressed anymore.
Previously, if 'run_next' raised GoBack, that would propagate out fully,
while if 'func' itself raised it would be suppressed. This was confusing.
somewhat related: #5334
2019-05-14 15:31:33 +02:00
SomberNight
099315013e
(trivial) qt main_window: rm unnecessary indendation
2019-05-14 00:03:50 +02:00
SomberNight
f6dfcccf8c
qt: factor out util.MessageBoxMixin.msg_box into function and use it
...
so these dialogs also get our custom default settings applied,
e.g. their text is selectable by mouse
2019-05-13 23:59:29 +02:00
SomberNight
407e3514cc
wallet: test_addresses_sanity to include (part of) address in exception
...
related: #5342
2019-05-13 23:20:48 +02:00
SomberNight
4db1535bce
qt wizard: catch wallet/bitcoin exceptions (regression)
...
fix #5342
2019-05-13 22:56:38 +02:00
SomberNight
d2a80f15a1
kivy fx dialog: fix #5329
2019-05-13 20:05:01 +02:00
SomberNight
fd58a0cb20
json_db: enforce order of 'load_transactions' and 'upgrade'
...
fixes #5331
2019-05-13 19:21:26 +02:00
SomberNight
a59e3efd3e
qt send tab: fix tx_size and fee calc in case of payment requests
...
do_update_fee() was always setting
`outputs = self.payto_e.get_outputs(...)`
but this only works `if not self.payment_request`
Minor refactor to re-use logic instead of duplicating code.
2019-05-13 02:52:22 +02:00
SomberNight
dd7b356fcc
kivy wizard: fix #5333
2019-05-11 19:36:57 +02:00
SomberNight
22c08f1522
qt dark: fix2 "In History tab, labels while edited were being clipped"
...
follow-up 3ed502a728
from Electron-Cash/Electron-Cash@cddde8d21b
2019-05-11 02:17:35 +02:00
SomberNight
808239bbcc
wallet: fix deleting address from Imported_Wallet
...
closes #4481
2019-05-11 02:08:15 +02:00
SomberNight
46ae86f600
wallet: fix balance_at_timestamp
...
closes #5326
2019-05-10 19:22:13 +02:00
SomberNight
aab067372c
requirements: pin PyQt5-sip version due to build problems
...
see https://tickets.metabrainz.org/browse/PICARD-1472
having issues on MacOS to codesign sip.so when PyQt5-sip==4.19.15:
PyQt5/sip.so malformed object (unknown load command 7)
2019-05-09 18:11:50 +02:00
ThomasV
9053cb2218
update version
2019-05-09 16:16:04 +02:00
ThomasV
bea0ac1106
date release notes
2019-05-09 16:15:09 +02:00
ThomasV
9a3ea0e514
update locale
2019-05-09 16:09:05 +02:00
SomberNight
03c3ba0d36
gitignore: add more build folders
2019-05-09 15:59:47 +02:00
ThomasV
1b8673839a
buildozer: add tests to exclude_dirs
2019-05-09 15:51:00 +02:00
SomberNight
bc64051139
update release notes
2019-05-08 16:52:53 +02:00
SomberNight
f6a7e6ec7d
logging: don't log to file by default
...
Leaking addresses/pubkeys/txids is a privacy leak...
but with lightning, logging should be enabled by default, as otherwise
issues would be sometimes impossible to debug...
Well, disable it for now.
2019-05-08 16:52:04 +02:00
SomberNight
3ed502a728
qt dark: fix "In History tab, labels while edited were being clipped"
2019-05-08 16:31:56 +02:00
ThomasV
2a6b02d43e
Merge pull request #5321 from SomberNight/logging_shortcut_filtering_20190507
...
logging: '-V' cli option can blacklist/whitelist classes with short names
2019-05-08 11:41:32 +02:00
SomberNight
104b8804f7
logging: '-V' cli option can blacklist/whitelist classes with short names
...
for example, '-V ni' will whitelist the 'Network' and 'Interface' classes
'-V ^ni' will blacklist those instead
2019-05-07 21:07:18 +02:00
ThomasV
92260a798a
Merge pull request #5319 from SomberNight/sync_progress_3_20190507
...
synchronizer: show progress in GUI (take 3) (req_answered/req_sent)
2019-05-07 18:01:18 +02:00
SomberNight
0e6cf153d7
synchronizer: show progress in GUI
2019-05-07 17:58:06 +02:00
SomberNight
92ad7ec5c0
interface: use itertools.count
2019-05-07 17:24:00 +02:00
SomberNight
e63157c2ab
logging: fix another call with multiple args
...
did a search with following regex now: logger\..*\(.*,
2019-05-07 01:41:41 +02:00
SomberNight
06cff9ac10
logging: fix call with multiple args
2019-05-06 23:03:19 +02:00
SomberNight
fd09033890
kivy: fix a race at startup
...
on_history (fx) races with load_wallet
2019-05-06 21:10:52 +02:00
SomberNight
720519f610
fix wine build dir references
...
follow-up 8e32f49469
2019-05-06 20:19:23 +02:00
SomberNight
a0b711cfea
requirements: bump python-ecdsa minimum
...
0.9 was not actually enough...
2019-05-06 19:12:40 +02:00
SomberNight
70fd716cbe
kivy: fix IPv6
...
closes #5176
2019-05-06 19:11:56 +02:00
SomberNight
7a99fdc275
kivy: fix crash in logging.py; platform.platform() not available
2019-05-06 19:10:29 +02:00
SomberNight
8e32f49469
wine build: rm old README
2019-05-06 17:10:36 +02:00
SomberNight
3e8ca80afd
servers: remove phishing server
2019-05-06 01:00:10 +02:00
SomberNight
cb4784c8ed
requirements: use older pycryptodomex for now
...
see Legrandin/pycryptodome#286
2019-05-05 19:31:58 +02:00
SomberNight
b11cb11d95
qt console: failed to print certain objects with custom __eq__
2019-05-05 17:59:45 +02:00
SomberNight
f38eed2fad
rerun freeze_packages
...
One user reported not getting keepkey with fw 6.1.0 detected
with python-keepkey 6.0.3, but detecting it with 6.1.0.
Sounds weird as all the changes look to be tests-related,
and could not reproduce. Still, this should not hurt.
2019-05-05 17:39:24 +02:00
SomberNight
2481d708cc
network: sanitize_tx_broadcast_response - new strings in bitcoind 0.18
2019-05-05 04:34:31 +02:00
SomberNight
00b2fee461
qt dark style: fix padding of PayToEdit
...
based on Electron-Cash/Electron-Cash@7e69f0e6ea
see ColinDuquesnoy/QDarkStyleSheet#159
2019-05-05 02:14:07 +02:00
SomberNight
201909df51
update release notes
2019-05-04 18:55:45 +02:00
SomberNight
c80c3596a7
logging: expose 'disablefilelogging' option in Qt preferences
2019-05-04 18:30:26 +02:00
SomberNight
e361a8549c
qt paytoedit: enable up/down keys
...
useful if multiline, and no harm(?) otherwise
2019-05-04 04:42:39 +02:00
SomberNight
aac9826e1b
qt paytoedit: better height adjustment
...
was sometimes weird...
e.g. pasting several lines of outputs would leave the textedit single line
2019-05-04 04:39:59 +02:00
SomberNight
7278953c63
servers: update mainnet default list (emzy)
2019-05-03 23:03:41 +02:00
SomberNight
7fc9e109ed
servers: update mainnet default list
2019-05-03 20:14:39 +02:00
SomberNight
0c963b0894
network.broadcast_transaction: add "do not trust" text to log messages
2019-05-03 20:11:48 +02:00
SomberNight
bd5b7abd80
rerun freeze_packages
...
mainly for qdarkstyle
2019-05-03 04:44:18 +02:00
SomberNight
07ec0d41d5
fix prev
...
unintentionally committed
2019-05-03 03:13:43 +02:00
SomberNight
fd5b1acdc8
commands: fix encrypt/decrypt
...
based on Electron-Cash/Electron-Cash@62aa08a0ff
2019-05-03 03:10:31 +02:00
SomberNight
387834164c
logging: port ugly accidental side-effect into readable explicit feature
...
LogFormatterForConsole.format() was mutating its 'record' argument,
which was affecting all handlers/formatters
2019-05-02 16:05:26 +02:00
ThomasV
a3e522efd9
Merge pull request #5296 from SomberNight/logging_20190328
...
use stdlib logging module instead of print_error
2019-05-02 15:33:29 +02:00
SomberNight
163a814dc4
logging: log exceptions caught by crash reporter
2019-05-02 15:19:11 +02:00
SomberNight
a7b13f4876
logging: make console log lines shorter
2019-05-02 15:19:11 +02:00
SomberNight
f22a23aaf2
logging: fix for kivy
2019-05-02 15:19:10 +02:00
SomberNight
6940c424d1
logging: cli options to filter for modules using -v
...
old style "-v" still works
filtering examples:
-v=debug,network=error,interface=error // effectively blacklists network and interface
-v=warning,network=debug,interface=debug // effectively whitelists network and interface
2019-05-02 15:19:10 +02:00
SomberNight
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
cluelessperson
4d64e132d7
standardized logging base with ISO8601, UTC, rotating file logs, and more!
2019-05-02 15:07:15 +02:00
ThomasV
ec6f4e9f1c
Decouple my GPG pubkey from Animazing
2019-05-02 14:23:31 +02:00
SomberNight
28d70963ec
qt txdialog: word-wrap blockhash
2019-05-02 12:05:27 +02:00
SomberNight
556fa30ddf
interface: partially fix ipv6 proxy
...
note that network.deserialize_proxy is still broken for ipv6
2019-05-02 12:04:06 +02:00
SomberNight
19ced234aa
qt: maybe batch do_update_fee() on network fee update
2019-05-02 03:09:47 +02:00
SomberNight
d56917f4b1
coinchooser: improve performance significantly
...
existing code was n^2 in number of UTXOs
this is now mostly linear
(linear if shortcut is hit; otherwise in rare cases still quadratic)
tested using wallet with 800 UTXOs, most of which were needed to make payment
coinchooser.make_tx() went from 18 sec to 0.8 sec
2019-05-02 03:07:34 +02:00
SomberNight
15dda65c52
qt network dialog: "use Tor proxy" cb would get auto-checked incorrectly
2019-05-02 01:20:14 +02:00
SomberNight
b4648eceda
rerun freeze_packages
2019-04-30 21:36:27 +02:00
SomberNight
33f5b6a288
requirements: relax qdarkstyle version
...
upstream issue ColinDuquesnoy/QDarkStyleSheet#123 now fixed
2019-04-30 21:35:32 +02:00
SomberNight
51e0672da6
update to aiorpcx 0.17
2019-04-30 21:24:39 +02:00
SomberNight
d92a4e8365
keepkey: rm homescreen stuff (remnants from trezor?)
2019-04-29 19:33:54 +02:00
Calin Culianu
05697e51b8
Trezor: Minor nit in settings screen. Image size was shown as H x W
...
(from Electron-Cash/Electron-Cash@e0e7ff218d )
2019-04-29 19:28:42 +02:00
SomberNight
19d7784616
qt tx dialog: show block height and block hash
2019-04-29 02:48:40 +02:00
SomberNight
205c437d9a
wallet: get_tx_info now returns NamedTuple instead of abomination
2019-04-29 02:32:15 +02:00
SomberNight
271d1a3f1d
qt tx dialog: two columns for tx stats
...
also show "RBF", and fix "date"
2019-04-29 01:19:06 +02:00
SomberNight
99f9a1b484
qt: warn user if in testnet mode
...
closes #5295
2019-04-28 06:31:01 +02:00
SomberNight
162d81c156
servers: update testnet default list
...
closes #5293
2019-04-27 23:10:12 +02:00
luggs-co
b9ef5ea713
Remove luggs' server from default list ( #5300 )
2019-04-27 17:23:48 +02:00
SomberNight
7bea1cce1f
x509: show cert expiration date in error
...
related #5292
2019-04-26 01:55:58 +02:00
SomberNight
7584cebbe3
bitcoin: stricter check on WIF for compressed pubkeys
...
fixes #5290
2019-04-25 14:35:16 +02:00
ghost43
a6762ffebc
Merge pull request #5272 from SomberNight/issue_4638_2
...
sweep/import key: disallow uncompressed segwit
2019-04-25 14:25:46 +02:00
Aleksey Karpov
3d8bcded79
update bitcoin explorer options ( #5285 )
...
removed blocktrail.com, blockr.io, biteasy.com ( this explorers no longer works)
added btc.bitaps.com (mainnet explorer) tbtc.bitaps.com (testnet explorer + coin faucet)
2019-04-24 17:05:11 +02:00
SomberNight
c31fa798c2
util make_aiohttp_session: use longer default timeout
...
same motivation as for 1110f13c62
2019-04-22 03:07:31 +02:00
SomberNight
2b717a8cef
minor fix re translated string
2019-04-21 03:31:37 +02:00
SomberNight
914d02ecd3
kivy tx dialog: allow removing local transactions
...
fixes #5156
2019-04-21 03:26:54 +02:00
SomberNight
8d0ec1dec0
kivy tx dialog: "action button" can have multiple options -> dropdown
2019-04-21 03:25:06 +02:00
SomberNight
2adabfd918
kivy: fix history tab fiat values
...
follow-up 46f1fca7c3
2019-04-21 01:55:46 +02:00
SomberNight
8ad0c248a5
cpfp: include fee already paid by parent tx in calculation
...
fixes #5244
2019-04-20 02:09:45 +02:00
SomberNight
1f83711c26
util/Fiat: Fiat(No Data) should equal Fiat(No Data)
...
Decimal('NaN') != Decimal('NaN')
matters in e.g. qt history tab refresh (shortcut)
2019-04-19 20:02:44 +02:00
SomberNight
46a236f167
qt tabs: restore filter state after refresh
2019-04-19 19:12:42 +02:00
SomberNight
d4a2e9634f
bitcoin: disallow importing/sweeping segwit scripts with uncompressed pubkey
...
fixes #4638
2019-04-19 00:37:28 +02:00
SomberNight
a1d98d4331
sweep/import key: show error in Qt GUI to user as tooltip
2019-04-19 00:15:45 +02:00
SomberNight
1110f13c62
network: allow longer timeouts in _run_new_interface
...
On Windows box with weird networking setup (VPN, no IPv6, many DNS nameservers
but only some working well), the previous timeouts were too low: they were
reached due to DNS resolution.
related: #4421
2019-04-18 23:05:35 +02:00
ThomasV
9b4e490e3c
leave max_button pressed ( fix #5251 )
2019-04-17 14:18:36 +02:00
SomberNight
c49d5f672c
network: fix proxy case
...
follow-up "healty spread of servers" d8f3ab0917
2019-04-15 10:49:09 +02:00
SomberNight
2dca91d048
interface: better exception handling for _try_saving_ssl_cert_for_first_time
2019-04-12 22:49:34 +02:00
SomberNight
d8f3ab0917
network: do not connect to multiple servers on same /16
...
maintain a healthy spread of (IP addresses of) connected servers
2019-04-12 22:32:36 +02:00
SomberNight
7ddc28b0dc
network: cap number of server peers accepted from main server
2019-04-12 22:24:36 +02:00
SomberNight
ecefa47b40
verifier: trivial clean-up
2019-04-12 20:29:05 +02:00
SomberNight
4f2aa53a76
interface: in server.version, send "electrum/3.3.4" as client name
...
closes #5246
2019-04-12 19:11:25 +02:00
SomberNight
0c1ea909df
kivy: "server lagging" -> show number of blocks
2019-04-12 17:13:10 +02:00
SomberNight
f432320576
appimage build: nits.
...
also touch symbolic links
2019-04-12 16:54:22 +02:00
SomberNight
baebfc03f1
binary builder dockerfiles: update packages
...
ubuntu no longer serves those older versions
2019-04-12 16:51:35 +02:00
Abdussamad Abdurrazzaq
920949498a
Update utxo list when label is changed on history list
2019-04-07 08:37:57 +05:00
Abdussamad Abdurrazzaq
ffe676bc28
Strip whitespace from amounts when copying. Fix bug in request list where address was copied instead of column specific data ( #5228 )
2019-04-05 15:59:14 +02:00
SomberNight
441da52b51
fix more DeprecationWarnings
2019-03-27 19:27:45 +01:00
ghost43
5b6357d472
Merge pull request #5211 from FrancisPouliot/master
...
Add Bylls BTC/CAD rates
2019-03-27 19:03:49 +01:00
SomberNight
4374b809fa
fix-up prev
2019-03-27 19:01:38 +01:00
Francis Pouliot
a9c13d6641
exchange_rate: add Bylls BTC/CAD rates
2019-03-27 19:00:40 +01:00
SomberNight
bdb6d65cf7
fix some DeprecationWarnings
2019-03-27 18:41:42 +01:00
SomberNight
4f70da6e15
make sure DeprecationWarnings are shown
2019-03-27 18:09:26 +01:00
SomberNight
89871a835e
default servers: rm electrum3.hachre.de
...
see #5224
2019-03-27 16:43:07 +01:00
SomberNight
1b3f428e88
keystore: speedup for Old_KeyStore
...
from Electron-Cash/Electron-Cash@01177d7deb
2019-03-27 16:30:21 +01:00
SomberNight
bca6ad5241
verifier: fix logic bug. after reorg, some verifs were not undone
...
after a reorg, in a many fork/orphan chains scenario,
we would sometimes not undo SPV for enough blocks
functions in blockchain.py somewhat based on kyuupichan/bitcoinX@5126bd15ef
2019-03-26 21:01:43 +01:00
SomberNight
9a71120090
blockchain: fix bug when swapping chain with parent
...
chain might become the parent of some of its former siblings
2019-03-26 20:55:27 +01:00
SomberNight
199199421d
follow-up prev
2019-03-26 20:42:24 +01:00
ThomasV
46f1fca7c3
remove currency from amount fields in exported history
2019-03-26 18:35:46 +01:00
SomberNight
d07fce0826
windows DNS resolution: handle domain with only AAAA records
...
this is getting too complicated :/
2019-03-26 16:52:11 +01:00
SomberNight
beacf88420
qt invoice list: fix #5222
2019-03-26 16:38:32 +01:00
SomberNight
c4fb58cd74
windows DNS resolution: follow-up 9b0773cf2b
...
related: #5176 , #4421
prev was failing on systems where
IPv6 is not available but DNS can resolve AAAA records
(my artificial test environment with IPv6 disabled was also filtering AAAA DNS)
2019-03-26 03:07:11 +01:00
SomberNight
1cfac928f9
trustedcoin: longer timeout for server signing
...
fixes #5221
2019-03-25 23:36:52 +01:00
SomberNight
9b0773cf2b
windows DNS resolution: handle IPv6
...
related: #5176 , #4421
2019-03-25 19:15:19 +01:00
ghost43
9161d3a5a1
Merge pull request #5162 from kpstar/master
...
android all currencies with history checkbox
2019-03-22 19:03:07 +01:00
SomberNight
6311aa24a8
follow-up prev
2019-03-22 18:52:57 +01:00
kpstar
d79992b125
android- all fiat currency with history option
2019-03-22 18:20:52 +01:00
SomberNight
6702c335e8
network: (trivial) ignore empty string donation address
2019-03-22 17:30:12 +01:00
SomberNight
8c3ab63504
labels: don't dump trace if failed to connect to server
2019-03-22 17:24:52 +01:00
SomberNight
c23e949848
exchange_rate: change default provider to CoinGecko
...
closes #5188
2019-03-22 16:55:57 +01:00
SomberNight
5cbf54d23a
exchange_rate: minor clean-up
...
based on mhsmith/electrum@7ed3f032dd
2019-03-22 16:48:47 +01:00
SomberNight
95a122596e
fx: add CoinGecko and CoinCap
...
somewhat based on
Electron-Cash/Electron-Cash@b3c76cd311
Electron-Cash/Electron-Cash@adf8f943a1
Electron-Cash/Electron-Cash@8879e41fa0
2019-03-22 16:35:02 +01:00
SomberNight
df8e2c3cc2
fix Revealer in binaries
...
fixes #5027
2019-03-22 15:23:43 +01:00
SomberNight
9117ded1cd
appimage: build python with curses and sqlite3 included
...
related #5213
2019-03-22 14:42:57 +01:00
SomberNight
c2455c89df
rerun freeze_packages
...
(related 232e59fc60 )
2019-03-22 14:34:21 +01:00
SomberNight
232e59fc60
requirements: use PyQt <5.12 in binaries for now. for AppImage
...
AppImage is built on Ubuntu 14.04 to maximise compatibility
but PyQt 5.12 blobs distributed on PyPI no longer work on 14.04
PyQt 5.11.x works
2019-03-22 14:32:21 +01:00
zebra-lucky
df6cba5af8
fix sign message not accept rich text ( #5210 )
...
* fix sign message not accept rich text
* set no rich also to signature/encrypt msg/encrypted fields
2019-03-20 00:46:19 +01:00
SomberNight
3b1ece4c70
interface: if iface conn fails early, don't wait for timeout of 'ready'
...
Network code is waiting for iface.ready with a timeout.
While network.py code is waiting, the already failed iface takes up a slot
in "connecting".
2019-03-18 21:34:01 +01:00
SomberNight
a2f477b679
rerun freeze_packages
2019-03-18 17:31:55 +01:00
SomberNight
366472549b
requirements: bump min keepkey
2019-03-18 17:29:37 +01:00
ghost43
c325f91c81
Merge pull request #5205 from keepkeyjon/keepkey-webusb
...
keepkey: support v6.0.0+ firmwares (webusb)
2019-03-18 16:57:45 +01:00
keepkeyjon
ef7af73bd3
keepkey: support v6.0.0+ firmwares (webusb)
2019-03-17 14:08:23 -06:00
SomberNight
a62bf2a53a
trustedcoin: better UX in Qt when cannot connect to TC server
...
closes #5184
2019-03-16 20:05:10 +01:00
ThomasV
13f3f71125
daemon: in detached modde, redirect strandard file descriptors
2019-03-12 08:32:27 +01:00
ghost43
52af40685e
Merge pull request #5152 from SomberNight/freeze_individual_utxos
...
Freeze individual UTXOs
2019-03-11 19:12:56 +01:00
SomberNight
3b7b81d82b
qt Coins tab: better tooltip for frozen items
2019-03-11 19:03:32 +01:00
SomberNight
95965c8ef4
qt Coins tab: add "Copy ..." option to context menu
2019-03-11 18:55:49 +01:00
SomberNight
24b0943266
qt Coins tab: reorder columns so that outpoint is first
2019-03-11 18:53:53 +01:00
SomberNight
752c518bdc
add option to freeze individual UTXOs
...
based on cculianu's work in Electron-Cash/Electron-Cash@fd910cffc8
2019-03-11 18:46:29 +01:00
SomberNight
cd40f2c9b7
trivial wallet clean-up
2019-03-10 18:47:23 +01:00
SomberNight
7b4bb19b34
exchange_rate: raise for http status so empty hist rate dicts don't get saved
...
and if they had already been saved, treat them as if nothing was saved
context: BitcoinAverage started restricting the historical API endpoints.
they now deny unauthenticated requests. :/
2019-03-10 07:41:49 +01:00
SomberNight
1f7b56b455
labels plugin: no need for 'proxy_set' callback
2019-03-09 17:13:06 +01:00
SomberNight
6aa81a8f56
commands: explicitly mention "?"/":" magic chars for "create" cmd
...
related: #5185
2019-03-09 16:47:19 +01:00
SomberNight
790c889483
qt network dialog: increase min size
2019-03-07 16:33:30 +01:00
SomberNight
03ab64e39f
appimage: towards deterministic builds
...
same-machine build almost works.
$ diffoscope dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage1 dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage2
|############################| 100% Time: 0:00:05
--- dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage1
+++ dist/electrum-3.3.4-76-geb04551-dirty-x86_64.AppImage2
├── readelf --wide --decompress --hex-dump=.digest_md5 {}
│ @@ -1,4 +1,4 @@
│
│ Hex dump of section '.digest_md5':
│ - 0x00000000 77e356ea eefe1459 a40f00d9 ab5c0e00 w.V....Y.....\..
│ + 0x00000000 1dda23b5 31f9024c fe6d2755 e930a41a ..#.1..L.m'U.0..
2019-03-06 04:53:18 +01:00
SomberNight
eb04551f9a
accept base43-encoded tx in Qt "Load transaction"
...
When encoding transactions as QR codes, we encode the tx bytes as base43
first. This makes it easier to load a transaction if the user manually
decodes the QR code.
2019-03-05 17:27:53 +01:00
SomberNight
8f5ca40d10
new cli command: get_tx_status
2019-03-05 17:01:54 +01:00
ThomasV
56ced1dfd5
let DB handle addresses
2019-03-05 08:20:34 +01:00
SomberNight
2abc4f6334
wallet: cache get_addr_balance
...
notably this makes get_history faster; as 40% of the time is spent in
get_addr_balance (without the cache)
2019-03-04 22:19:33 +01:00
SomberNight
514d0ae958
wallet: towards restoring previous performance 2
2019-03-04 18:16:48 +01:00
SomberNight
8ae6ddcc00
keystore: rm dead code
2019-03-04 17:29:12 +01:00
SomberNight
12b98fa251
wizard: fix regression: unencrypted wallets were not getting upgraded
...
fixes #5177
2019-03-04 17:23:43 +01:00
SomberNight
bf1c1c2a11
qt qrcodewidget: on MacOS, was grabbing whole screen
...
from Electron-Cash/Electron-Cash@61d46989e6
2019-03-04 04:24:45 +01:00
SomberNight
43583c1e28
daemon: make sure wallet paths are standardised everywhere
2019-03-04 02:49:41 +01:00
SomberNight
d11481f360
storage: fix path standardisation
2019-03-04 02:48:25 +01:00
SomberNight
93fa9a9d69
wizard: partial revert of 2da6692f73
2019-03-04 02:46:50 +01:00
SomberNight
d55a045405
qt wizard: minor clean-up
2019-03-04 02:20:34 +01:00
SomberNight
2da6692f73
wizard: some fixes
...
related: #5174
2019-03-04 02:08:23 +01:00
SomberNight
ef1330df5d
[trivial] use namedtuple field by name
2019-03-03 17:34:03 +01:00
SomberNight
7458461f13
wizard: fix decryption of hw wallet files
...
see #5174
2019-03-03 17:33:13 +01:00
SomberNight
b076f5294f
wizard: allow kwargs in run()
2019-03-03 17:32:00 +01:00
SomberNight
0ac2ca8ed3
qt "new transaction" notifications: change wording
...
closes #5171
2019-03-02 19:25:54 +01:00
SomberNight
b79f43c360
wallet: fix RBF batching
...
post-storage_db-merge fixup
2019-03-02 19:16:39 +01:00
SomberNight
94c4cb44d7
fix storage upgrade tests: "fixture 'func' not found"
2019-03-01 21:02:10 +01:00
SomberNight
0c232905a8
wallet: rm dead code
2019-03-01 20:55:21 +01:00
SomberNight
b6d5304e51
qt: close wizard after splitting an old multi-account wallet
...
instead of trying to open the old pre-split file
2019-03-01 20:50:17 +01:00
SomberNight
b134f04fef
storage: fix convert_version_18
2019-03-01 19:54:09 +01:00
SomberNight
9ecb504739
storage: fix convert_version_17 and add new test case
...
follow-up 121b8048b0
2019-03-01 19:46:23 +01:00
SomberNight
ef8d7e3227
qt wizard: don't consider old version storage to be incomplete
2019-03-01 19:44:20 +01:00
SomberNight
121b8048b0
json_db: store Transaction objects in memory, not raw hex
...
to avoid deserializing the same tx multiple times
2019-03-01 17:59:22 +01:00
SomberNight
2ad73050b3
wallet: towards restoring previous performance
2019-03-01 17:59:22 +01:00
SomberNight
8b2c586d30
post-storage_db-merge fixups
2019-03-01 14:14:30 +01:00
SomberNight
d0fa3b431a
wallet: generate addresses in Deterministic_Wallet constructor
2019-02-28 21:22:10 +01:00
SomberNight
7b9047d8d6
scripts: simplify quick_start
2019-02-28 20:26:30 +01:00
SomberNight
b34e1634b6
commands: fix gettransaction
2019-02-28 20:26:30 +01:00
SomberNight
f85b8f349d
wallet: fix bug in restore_wallet_from_text, and write tests
2019-02-28 20:26:29 +01:00
SomberNight
ae80f143e7
commands/wallet: separate out 'create' and 'restore' core parts
...
so that they are easier to use from python scripts
2019-02-28 20:26:29 +01:00
SomberNight
b2128af958
ledger: suppress error message if user cancels tx signing
2019-02-28 17:56:08 +01:00
ThomasV
2fd4cdcaa9
json_db: add missing lock
2019-02-28 16:11:19 +01:00
ThomasV
943d1ba8f2
json_db: private methods. return tx in remove_transaction
2019-02-28 16:03:36 +01:00
ThomasV
d8c4bf5662
storage: call load_plugins in decrypt
2019-02-28 15:50:37 +01:00
ThomasV
1e519f2dd0
json_db: make get operations threadsafe
2019-02-28 15:47:42 +01:00
ThomasV
3631c27ed7
fix: load trustedcoin plugin for two-step wallet creation
2019-02-28 13:11:00 +01:00
ThomasV
d74f0c0947
storage_db: fix tests, add modified flag to db class
2019-02-28 12:09:36 +01:00
ThomasV
dbca0a0e83
fix tests for json storage
2019-02-28 10:37:48 +01:00
ThomasV
048eb01300
fix json_db list
2019-02-28 10:04:44 +01:00
ThomasV
cb9dcb8e26
load wallet plugin in Wallet factory, fix trustedcoin wizard on kivy
2019-02-28 09:02:58 +01:00
ThomasV
d73f7a2c10
jsondb: convert lists to sets
2019-02-28 09:02:58 +01:00
SomberNight
4b36114d0d
small fixups
2019-02-28 09:02:58 +01:00
ThomasV
791e680a96
abstract database away from wallet and address_synchronizer
2019-02-28 09:02:58 +01:00
ThomasV
7f2083f667
separate storage and database (JsonDB)
2019-02-28 09:02:58 +01:00
ThomasV
d5790ea109
wizard: do not use on storage object during wallet creation
2019-02-28 09:02:58 +01:00
SomberNight
d6c2a0af94
exchange_rate: small fixups. BitcoinAverage, BitStamp
...
- BitcoinAverage seems to have historical rates for all currencies it supports
(as in, if there is spot price, there is also history).
- BitStamp now uses v2 API, also has support for EUR.
- Bitcointoyou does not seem to actually offer histories
(and `request_history` was undefined anyway)
- regenerate currencies.json
2019-02-27 23:49:25 +01:00
SomberNight
4b3a285871
exchange_rate: some clean-up and fixes
...
- generation of currencies.json was broken
- removed some dead exchanges
2019-02-27 21:48:33 +01:00
SomberNight
a2047e2c68
tests: base43/base58 encoding/decoding
2019-02-25 19:17:38 +01:00
SomberNight
072ce9c7ac
do not raise BaseException
2019-02-25 16:40:51 +01:00
ghost43
6617307730
Merge pull request #5118 from SomberNight/trezor_init_20190213
...
Trezor: implement "seedless" mode
2019-02-22 18:59:52 +01:00
SomberNight
11733d6bc2
wizard: normalize bip32 derivation path
...
so that what gets put in storage is "canonical"
(from now on... we could storage upgrade existing wallets
but it's not critical)
2019-02-22 18:50:29 +01:00
SomberNight
85a7aa291e
bip32: refactor whole module. clean-up.
2019-02-22 18:50:24 +01:00
SomberNight
b39c51adf7
mv "electrum seed" stuff from bitcoin.py to mnemonic.py
2019-02-22 18:01:54 +01:00
SomberNight
e7f38467d7
move opcodes to bitcoin.py
2019-02-22 17:39:58 +01:00
SomberNight
c03c17f1c7
transaction: replace custom enum type for opcodes with stdlib enum
...
based on Electron-Cash/Electron-Cash@99e60b4941
2019-02-22 16:52:08 +01:00
SomberNight
9dedf51afd
trustedcoin: nicer 'ErrorConnectingServer' exception
2019-02-21 23:07:19 +01:00
SomberNight
4ef3eda8da
util: mv create_URI to create_bip21_uri, and small clean-up
2019-02-20 21:19:03 +01:00
SomberNight
40bf049c82
commands: introduce 'removelocaltx'
...
see #5137
2019-02-20 18:01:43 +01:00
SomberNight
8e6904c7b7
wallet: default to get_addresses() in get_history()
...
get_addresses() is a superset of history.keys()
(was missing some local transactions in the output of get_history())
2019-02-20 17:52:43 +01:00
Jean P
7618693ca9
Add support for Ledger Nano X and future devices ( #5140 )
2019-02-20 13:46:26 +01:00
SomberNight
2d6a68545b
qt installwizard: fix small regression
...
related: #5139 and 8f4967f7d0
2019-02-19 15:40:29 +01:00
SomberNight
d4e209dc3a
trustedcoin: print messages in both direction when debugging
2019-02-18 18:03:42 +01:00
SomberNight
0bf0b1d20b
interface.is_server_ca_signed: don't rely on assert
2019-02-18 18:00:54 +01:00
SomberNight
2f11216986
fix get_fee_text for static fees
...
mismatching units
probably only affects kivy gui; when using static fees
2019-02-18 17:52:50 +01:00
SomberNight
0de954546a
test python version in main script
...
for better error text on old python
related: #5008 , #5129
2019-02-15 22:06:10 +01:00
SomberNight
92bf409bf0
scripts: add "quick_start" to showcase some basic functionality
2019-02-15 21:14:08 +01:00
ThomasV
25a460f855
Merge branch 'network_walk'
2019-02-15 17:37:59 +01:00
ThomasV
52520490c5
improve network send_multiple_requests
2019-02-15 17:37:15 +01:00
SomberNight
5313591c28
synchronizer: disconnect from server if cannot deserialize txn
2019-02-15 17:22:24 +01:00
SomberNight
7b8114f865
synchronizer: allow server not finding txn sometimes
...
User has wallet file with history that includes some txid; corresponding
raw tx is not in the "transactions" dict in the file however.
When the synchronizer starts up, it requests this "missing" txn from
the server... but what if the server does not know about it?
Maybe it was reorged and is not in the new best chain,
and not even in mempool. This was not handled previously.
fix #5122
2019-02-14 20:54:55 +01:00
ThomasV
f60d1e7cb6
fix variable name in contrib/sign_version
2019-02-13 23:25:58 +01:00
ThomasV
c725c05947
update make_download
2019-02-13 23:19:34 +01:00
ThomasV
87c596fa1d
prepare release 3.3.4
2019-02-13 22:23:30 +01:00
ThomasV
0e78e15fa4
update locale submodule
2019-02-13 22:20:56 +01:00
ThomasV
4e9dd679ab
add contrib/sign_version
2019-02-13 21:46:48 +01:00
SomberNight
5387c6d5f6
trezor: during device init hide some options behind an "expert" button
2019-02-13 20:35:24 +01:00
SomberNight
7bbec04a06
trezor: implement "seedless" mode (option during initialization)
2019-02-13 20:35:23 +01:00
SomberNight
2867c2ef7a
update release notes
2019-02-13 20:23:54 +01:00
SomberNight
ec86850a2e
trezor: fix minor error handling issue
...
AttributeError: 'TrezorFailure' object has no attribute 'message'
2019-02-13 18:33:48 +01:00
SomberNight
e2eb051eed
keystore bip39: minor clean-up
2019-02-13 15:03:32 +01:00
ghost43
c8562f5362
network: reintroduce network.debug ( #5093 )
...
network.debug and interface.debug were removed during the asyncio-aiorpcx
network-rewrite.
2019-02-12 20:23:43 +01:00
SomberNight
086372f68a
wallet get_full_history: add from/to_height info to summary
2019-02-12 19:38:15 +01:00
SomberNight
019884a98b
network: follow-up 38ab7ee554
2019-02-12 19:23:58 +01:00
SomberNight
2174fc0676
cli history: add option to filter by block height
2019-02-12 18:38:35 +01:00
SomberNight
38ab7ee554
network: catch untrusted exceptions from server in public methods
...
and re-raise a wrapper exception (that retains the original exc in a field)
closes #5111
2019-02-12 17:02:15 +01:00
SomberNight
fd62ba874b
kivy: rm dead code
2019-02-11 20:22:03 +01:00
SomberNight
026448837f
no more "import *"
...
fixes #5101
fixes #5105
2019-02-11 20:21:24 +01:00
SomberNight
8072ad1ad9
network broadcast_transaction: make error text clearer
2019-02-11 16:36:01 +01:00
SomberNight
ebeed4736f
qt utxo_list: show full prevout_n in outpoint column
...
previously, if prevout_n was >=10, the ":" char or even digits were cut
2019-02-10 21:20:44 +01:00
SomberNight
c23b869d3c
qt MyTreeView subclasses: change "headers" from list to dict
2019-02-10 21:13:53 +01:00
SomberNight
5aafcb2875
qt MyTreeView subclasses: use IntEnum for columns
2019-02-10 21:00:08 +01:00
SomberNight
cd097d6bb8
qt history list: update_tx_mined_status was not updating 'date' for tx
...
fixes #5096
2019-02-10 06:36:58 +01:00
ThomasV
eb96d422f7
import version module
2019-02-09 12:15:46 +01:00
SomberNight
d78537c8c4
rerun freeze_packages
2019-02-08 19:19:02 +01:00
SomberNight
df9087970b
update block header checkpoints
2019-02-08 16:38:59 +01:00
SomberNight
699562c78d
bump libsecp256k1 version
2019-02-08 16:17:52 +01:00
ThomasV
01eaf0fe4e
Merge pull request #5052 from JeremyRand/utxolist-for-loop
...
Refactor for loop in UTXOList
2019-02-08 15:53:28 +01:00
ThomasV
b06b8753e6
fix #5088
2019-02-08 12:59:06 +01:00
ThomasV
1da1f0bfea
fix #4984
2019-02-08 11:17:48 +01:00
ThomasV
8f4967f7d0
qt wizard: select_storage
2019-02-08 09:10:07 +01:00
ThomasV
beb9f63274
follow-up prev
2019-02-08 08:27:23 +01:00
ThomasV
58c2c15266
follow up 6fb974227b
2019-02-08 08:21:18 +01:00
SomberNight
fc72e661de
requirements: set min version for aiohttp
2019-02-08 02:24:44 +01:00
SomberNight
89bb49e117
mac build: install pinned pip and setuptools earlier
...
also add --no-use-pep517 option for pyinstaller (see 4b560250a6 )
2019-02-07 20:19:07 +01:00
SomberNight
2c71b9da0c
icons: instead of symlinks, just mv "icons" dir
...
symlinks are really inconvenient on Windows
(when running from cloned source)
follow-up #5055
2019-02-07 20:01:52 +01:00
SomberNight
9beabc0311
fix prev: run make_locale before building android apk
2019-02-07 17:57:15 +01:00
SomberNight
ba08b2279d
kivy build: test and document that make_locale is to be run first
2019-02-07 16:45:09 +01:00
ThomasV
6fb974227b
fix #5082
2019-02-07 13:56:11 +01:00
ThomasV
6ade5903dc
network: fix send_multiple_requests
2019-02-07 13:30:14 +01:00
SomberNight
7bb3e5336a
trezor: PIN could not be disabled
...
fixes #5078
2019-02-06 15:50:57 +01:00
ThomasV
4ed8787433
remove 'util.py' from scripts
2019-02-05 20:33:50 +01:00
ThomasV
8f2a730b3b
add more details values to history
2019-02-05 18:27:01 +01:00
SomberNight
d6986347e6
qt icons: update remaining QIcon() constructors
...
follow-up #5053
2019-02-05 00:59:09 +01:00
SomberNight
a5ddb42bfd
win/mac binaries: fix qt icons
...
follow-up #5055
2019-02-04 22:34:59 +01:00
SomberNight
2de7fd5466
wine build: small clean-up in prepare-wine.sh
2019-02-04 20:27:04 +01:00
SomberNight
001b815c18
wine build: upgrade wine, nsis, python
...
wine-specific hack no longer needed with new wine version
2019-02-04 20:27:04 +01:00
SomberNight
5a1778b7fe
start using util.resource_path
2019-02-04 20:27:03 +01:00
SomberNight
67d080b34a
mv qt update checker to its own file
2019-02-04 20:27:03 +01:00
SomberNight
6926b8b2d4
qt update checker: handle --offline
2019-02-04 20:27:02 +01:00
SomberNight
68cd37282e
qt: set default "window icon" (only visible on Windows)
2019-02-04 20:27:02 +01:00
SomberNight
9e58d56e6d
qt qrwindow: rm dead code
2019-02-04 20:27:01 +01:00
SomberNight
8412b53ed5
wizard: copy/restore storage when stepping through the wizard
...
When interacting with wizard, there is a single shared storage instance.
If you go down the tree of dialogs, press "back" a couple times, go
down another branch of dialogs, etc, there are side-effects on storage,
which are never undone.
fixes #5057
fixes #4496
2019-02-04 20:27:01 +01:00
SomberNight
9013f6d59e
wizard: make 'stack' private
2019-02-04 20:27:00 +01:00
SomberNight
bc2a421d87
network: clean up broadcast_transaction
...
Handle all exceptions in network.py, instead of in gui code.
Send some exceptions to crash reporter; previously gui code
would suppress them.
2019-02-04 20:27:00 +01:00
ThomasV
76ff2f53c5
Merge pull request #5042 from SomberNight/appimage
...
binaries for Linux: AppImage
2019-02-04 19:16:15 +01:00
SomberNight
66de511828
travis: build appimage for linux
2019-02-03 23:45:34 +01:00
SomberNight
a754f9fe10
initial commit for building AppImages for Linux x86_64
2019-02-03 23:45:30 +01:00
SomberNight
47b07f19b9
build: factor out some utilities to build_tools_util.sh
2019-02-03 23:44:34 +01:00
SomberNight
ca931f476f
fix android build: pin buildozer and pin kivy.
...
old p4a did not work with new buildozer. kivy master crashes.
kivy latest release has runtime issues (orientation was landscape).
these versions seem to work.
also updated dockerfile to more closely match p4a master.
2019-02-03 23:40:49 +01:00
SomberNight
43487910c7
qt network dialog: use intenum for columns
2019-02-03 20:04:33 +01:00
ThomasV
905e271db9
remove phishing server
2019-02-03 12:28:59 +01:00
SomberNight
52d602b6c1
network: fix get_servers to not modify default list
2019-02-02 20:10:12 +01:00
SomberNight
add3b36f32
build: replace remaining "python setup.py install" with "pip install"
2019-02-02 08:07:48 +01:00
ThomasV
819c3b81e3
Merge pull request #5055 from SomberNight/fix_qt_icons_when_pkg_installed
...
fix: qt icons not available when installed as python package
2019-02-02 06:26:47 +01:00
SomberNight
4fa87d8595
fix: qt icons not available when installed as python package
...
follow-up #5053
2019-02-01 23:32:24 +01:00
SomberNight
7ea01e9e91
qt inline icons: change mouse-over cursor
2019-02-01 21:57:18 +01:00
ghost43
7266ecc2b8
contrib/make_tgz: small improvements. ( #5040 )
2019-02-01 21:20:45 +01:00
ThomasV
f846d1d59a
Merge pull request #5039 from SomberNight/tx_version_bump_to_2
...
transaction: change default version to 2
2019-02-01 20:48:18 +01:00
ThomasV
f05aabd802
Merge pull request #5053 from SomberNight/qt_icons_file_rm
...
rm qt icons file
2019-02-01 20:47:16 +01:00
SomberNight
16bac5fd73
rm qt icons file
...
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons
based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
SomberNight
185d02d9df
delete snap file
...
we don't distribute snaps; not sure if the file is useful for anyone
it's already not working because it references python 3.5
2019-02-01 19:46:20 +01:00
SomberNight
3ad6f738bd
util: rm hfu, cleaner bh2u
2019-02-01 19:02:02 +01:00
JeremyRand
8716bc8cfb
Refactor for loop in UTXOList
...
This refactor makes UTXOList somewhat easier to subclass.
2019-02-01 06:42:57 +00:00
SomberNight
7f3de8241c
qt/hww: temporarily bundle our own version of safetlib.qt.pinmatrix
...
until safetlib releases a new version that includes b1eab3dba4
closes #4960
2019-01-31 20:58:04 +01:00
SomberNight
e7d3fd32fb
contrib/freeze_packages.sh: should hard fail if there is an error
...
exceptions raised by find_restricted_dependencies.py were getting ignored
2019-01-31 19:44:04 +01:00
SomberNight
3ca1b710d6
build: use sha256sum instead of md5sum
2019-01-31 17:01:00 +01:00
SomberNight
d4967faf28
wine build: pin wine signing key. minor refactoring.
2019-01-31 16:37:27 +01:00
SomberNight
c399693049
qt contact list: context menu fixups
...
fixes #5048
fixes #5049
follow-up 9cff42328d
2019-01-31 12:13:31 +01:00
SomberNight
9bbea9bf2f
wallet: implement wait_for_address_history_to_change API
2019-01-30 21:30:25 +01:00
SomberNight
55e6830cfc
android build: update pinned python-for-android. use newer google NDK.
...
fixes #5045
2019-01-30 19:30:36 +01:00
SomberNight
0f0cee422e
trezor and clones: sign tx version too
2019-01-30 12:03:52 +01:00
SomberNight
27299092df
hardware cmdline handler: print messages to stderr (take 2)
...
follow-up 5613f9b903
button_request should not call show_error as error dialogs in Qt block
the GUI thread.
2019-01-29 17:25:02 +01:00
ThomasV
0429fe5960
Merge pull request #5031 from spesmilo/daemon_error_forwarding
...
daemon: forward TypeError trace to client
2019-01-29 09:37:30 +01:00
Janus
2737744bfe
daemon: forward TypeError trace to client
2019-01-29 02:07:10 +01:00
SomberNight
4c6379a936
linux sdist: try to exclude some more garbage files from release tarball
2019-01-28 18:15:05 +01:00
SomberNight
dcd3d6c3d1
linux sdist: rm dead file from MANIFEST.in
2019-01-28 17:36:47 +01:00
SomberNight
15bc097f55
gitignore: update old path
2019-01-28 17:35:52 +01:00
SomberNight
501e725a47
kivy readme: note about running on linux desktop
...
closes #5037
2019-01-28 15:26:46 +01:00
SomberNight
d820f9ad37
transaction: change default version to 2
2019-01-28 15:11:03 +01:00
duckartes
f9b0c66843
Update: README.rst ( #5036 )
...
Correct filename paths under Creating Binaries.
2019-01-27 18:15:37 +01:00
SomberNight
31c08db909
qt update notifications: make url clickable; prevent multiple dialogs
2019-01-27 14:42:37 +01:00
ThomasV
138c98d7d8
add 'get' command to CLI
2019-01-26 16:50:51 +01:00
SomberNight
53310690a5
version notifications: sig check would always fail on testnet
2019-01-26 15:30:30 +01:00
SomberNight
b085d7cc59
document linux release process
...
closes #5030
2019-01-25 19:14:28 +01:00
ThomasV
0f0bdfe7f0
update release notes
2019-01-25 19:09:29 +01:00
ThomasV
c4774d7a8e
update submodules
2019-01-25 18:46:29 +01:00
SomberNight
0bfda7c8c7
validate version update announcements using "bitcoin address" message signing
2019-01-25 18:16:56 +01:00
Johann Bauer
34c99c3b36
[Qt] Add optional update notifications
2019-01-25 18:16:32 +01:00
ThomasV
5613f9b903
hardware cmdline handler: print messages to stderr
2019-01-25 18:16:03 +01:00
SomberNight
4b560250a6
fix wine build: pyinstaller failed to install with new pip
...
see pypa/pip#6163
2019-01-25 16:46:17 +01:00
ThomasV
4be4444d6b
prepare release 3.3.3
2019-01-25 12:06:19 +01:00
sajolida
889d133abd
Give visual feedback while starting ( #4997 )
...
See https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
2019-01-25 02:33:54 +01:00
SomberNight
5f05469852
rerun freeze_packages
...
closes #4993
closes #5006
2019-01-25 02:06:30 +01:00
ThomasV
54eb89ccaf
Merge pull request #5026 from JeremyRand/utxolist-headers
...
Refactor UTXOList headers into class attribute
2019-01-24 13:47:58 +01:00
JeremyRand
b3d8a81e15
Refactor UTXOList headers into class attribute
...
This makes it more straightforward to subclass UTXOList.
2019-01-24 00:09:36 +00:00
ThomasV
920d4c2b27
simplify qr window
2019-01-23 17:17:13 +01:00
ThomasV
f994cd4a5d
draw qrcode with fixed framesize
2019-01-23 16:56:29 +01:00
SomberNight
f2ad116b0b
wizard: better hww debug messages when unpaired_device_infos fails
...
[DeviceMgr] scanning devices...
[DeviceMgr] failed to create client for ledger at b'0002:0007:00': OSError('open failed',)
[DeviceMgr] error getting device infos for ledger: open failed
^ GUI did not contain any info about failure
2019-01-21 18:44:36 +01:00
SomberNight
5fc715cdee
commands: add convert_xkey for converting between {x,y,z}|{pub,prv}
2019-01-20 15:49:42 +01:00
SomberNight
9cff42328d
qt contact list: fix copying address, sort order
...
closes #5015
2019-01-19 23:11:21 +01:00
SomberNight
e39e2ed8f1
fix typo
...
follow-up #5011
closes #5014
2019-01-19 17:50:22 +01:00
ThomasV
c995d5364e
Merge pull request #5011 from SomberNight/tx_broadcast_sanitize_response
...
network: sanitize tx broadcast response
2019-01-19 11:27:48 +01:00
SomberNight
5403ae7687
network: sanitize tx broadcast response
2019-01-18 20:25:21 +01:00
SomberNight
7ffd928e80
wallet: add comment
2019-01-17 17:19:08 +01:00
SomberNight
d77e4d8f5d
exception formatting: use repr(e) instead of str(e) in messages
...
repr(e) is more useful
2019-01-17 17:16:19 +01:00
SomberNight
44a2ceab3c
qt history list: fix minor sorting issue
...
closes #4989
2019-01-17 17:09:22 +01:00
ThomasV
4e10f9e301
Merge pull request #5007 from cculianu/fix_codesign_electrum
...
[MacOS] Fixed code signing on macos to code sign *all* embedded binaries
2019-01-17 16:22:31 +01:00
SomberNight
c7f3adb67e
trezor: fix minor string formatting re translations
...
closes #4996
2019-01-16 19:11:04 +01:00
ghost43
dc19cf1fa1
wallet: randomise locktime of transactions a bit. also check if stale. ( #4967 )
2019-01-16 18:51:59 +01:00
chris-belcher
d5c8a0e0d0
Add flag --skipmerklecheck ( #4957 )
...
The --skipmerklecheck optional flag makes Electrum tolerate invalid
merkle proofs from the server. This is useful for building Electrum
servers that need a minimum amount of storage, though of course users
should only enable it if they completely trust the connected server.
2019-01-16 18:48:10 +01:00
Calin Culianu
5ec330680e
[MacOS] Fixed code signing on macos to codesign all embdedded binaries
...
This was pulled from Electron Cash #1110
2019-01-16 10:58:44 +02:00
Johann Bauer
0caf8e30cd
Revealer: Fix typo
2019-01-12 22:06:47 +01:00
Johann Bauer
019566b383
Change string formatting to improve translation
...
For example, "Hide Console" would be "Konsole anzeigen" in German.
Currently, translators can only show "Anzeigen Konsole" which doesn't
make much sense.
2019-01-12 21:58:21 +01:00
Romano
c60583293a
[Docker] fix gnupg2 and dirmngr
2019-01-12 21:32:52 +01:00
Johann Bauer
424430723b
[Revealer] Fix spelling mistake
2019-01-08 17:22:53 +01:00
SomberNight
2f789468ea
requirements: lower bound for btchip-python
2019-01-07 11:00:50 +01:00
Tom Kneiphof
8fd84f77c7
Fix ledger transaction version ( #4991 )
2019-01-07 10:49:10 +01:00
SomberNight
4d0030363b
interface: catch more SOCKS exceptions
2019-01-04 11:00:48 +01:00
SomberNight
fd5ad9ac70
qt network dialog: detect Tor proxy dynamically
...
keep thread running to detect changes
2019-01-04 10:58:59 +01:00
SomberNight
192ec8596d
trezor: fix matrix recovery
...
closes #4983
2019-01-04 10:15:26 +01:00
Johann Bauer
bde655ae00
Qt: Show pointer cursor for status bar buttons
2019-01-01 20:39:27 +01:00
ThomasV
549d71fb0b
complete release notes
2018-12-28 13:43:18 +01:00
SomberNight
bd1f7b539e
qt: don't import PyQt5.Qt
...
related #4960
2018-12-26 03:58:50 +01:00
SomberNight
ccec45a564
qt: fix address list context menu race
...
closes #4961
2018-12-24 19:03:10 +01:00
SomberNight
0bce96d2de
qt crash report: fix formatting
...
follow-up 5dc240d4ed
2018-12-24 18:52:03 +01:00
ThomasV
5469e3668e
fix #4958
2018-12-23 10:02:19 +01:00
SomberNight
dac5af8eca
trustedcoin: friendlier error msg for invalid otp when signing
2018-12-22 09:06:30 +01:00
ThomasV
30845ee776
prepare release 3.2.2
2018-12-21 22:41:12 +01:00
ThomasV
649f8414a9
update icons submodule
2018-12-21 22:32:57 +01:00
Johann Bauer
d0a1bae68f
[Qt] Fix wrong orientation of finger in clock icons
...
Closes : #4954
2018-12-21 21:57:23 +01:00
SomberNight
5dc240d4ed
qt: show_message and friends display plaintext by default
2018-12-21 20:46:47 +01:00
SomberNight
5248613e9d
gui: prepend broadcast_transaction errors with explanatory message
2018-12-21 20:44:38 +01:00
SomberNight
b491a30dd9
kivy network dialog: update server and proxy properly
...
Previously "proxy" would only get updated when closing and reopening
the network dialog. "server" would only get updated after successful
connection establishment to specified server.
2018-12-21 16:59:43 +01:00
SomberNight
1d303fa9d2
win build: rm win_inet_pton
...
was needed by PySocks; and we no longer use PySocks
also, it seems the functionality it provided is now part of Python stdlib since 3.4
https://docs.python.org/3/library/socket.html#socket.inet_pton
related: #2358
2018-12-20 18:06:16 +01:00
SomberNight
744bfc1eeb
util.profiler: simplify
...
follow-up 6192bfce46
closes #4904
2018-12-20 17:09:58 +01:00
ghost43
7773443c17
network: put NetworkTimeout constants together ( #4945 )
...
* network: put NetworkTimeout constants together
* fix prev
2018-12-20 16:49:17 +01:00
SomberNight
43461a1866
qt history: fix exporting history
...
closes #4948
2018-12-20 16:46:58 +01:00
ThomasV
85b712967f
prepare release 3.3.1
2018-12-20 13:24:35 +01:00
ThomasV
b1b6b250d1
kivy: do not request PIN for watching-only wallets
2018-12-20 13:23:46 +01:00
ThomasV
2e078493a7
kivy: improve context menu
2018-12-20 12:43:31 +01:00
ThomasV
96b66b7e4f
kivy: use on_state instead of on_release
2018-12-20 12:19:54 +01:00
ThomasV
58a9fa0ad5
kivy: use default scroll_distance and scroll_timeout
2018-12-20 11:32:01 +01:00
ghost43
8e5331e5b2
Merge pull request #4932 from SomberNight/revealer_cleanup_20181215
...
revealer: clean-up, allow restoring v0
2018-12-20 04:24:21 +01:00
SomberNight
caae9f8a6a
revealer: warning re version 0 now includes URL
2018-12-20 04:21:40 +01:00
SomberNight
1b7672f70e
qt: fix invoices tab
...
closes #4941
2018-12-20 01:09:16 +01:00
SomberNight
fc18912ecd
release notes: mention 2fa, shorten qt
2018-12-19 21:24:38 +01:00
SomberNight
4225e79456
win build: wine upstream gpg key weirdness
2018-12-19 21:22:41 +01:00
ThomasV
df15571b82
osx build: revert to python 3.6.4
2018-12-19 18:37:44 +01:00
ThomasV
383b517405
update submodule (follow-up prev commit)
2018-12-19 18:35:15 +01:00
ThomasV
1ee8d6a380
Merge branch 'master' of github.com:spesmilo/electrum
2018-12-19 18:28:53 +01:00
ThomasV
b2d635060c
update submodule
2018-12-19 18:28:34 +01:00
SomberNight
d5591da682
qt history: consider column is hidden in context menu
2018-12-19 17:01:20 +01:00
SomberNight
f0f73380a2
qt history: fix refresh bug ("verified"/fee histogram interplay)
2018-12-19 16:47:26 +01:00
ThomasV
0247802479
update submodules
2018-12-19 13:29:50 +01:00
ThomasV
4360d07918
Merge pull request #4938 from SomberNight/mac_build_qr_scanner_old_xcode
...
mac: build qr scanner using old xcode
2018-12-19 12:03:41 +01:00
SomberNight
ba33bc4ad8
plugins: fix hook/attr name collision in close()
...
Revealer plugin has method "password_dialog"
"password_dialog" is also a hook name, but revealer.password_dialog is not a hook
2018-12-19 02:10:47 +01:00
SomberNight
bec1860197
mac build: build qr scanner on separate machine
2018-12-18 22:05:44 +01:00
SomberNight
f54c387172
mac build: bump python version
2018-12-18 22:05:42 +01:00
SomberNight
f160f4bf67
mac build: use old xcode to build qr scanner on El Capitan
2018-12-18 22:05:02 +01:00
SomberNight
fa33d1880c
win build: bump python version
2018-12-18 21:41:29 +01:00
SomberNight
ba4af29bf8
rerun freeze_packages
2018-12-18 21:01:16 +01:00
SomberNight
8d1cb3c36a
bump pyqt version in binaries
...
closes #4777
2018-12-18 20:52:01 +01:00
SomberNight
8f5f0e46aa
keystore: fail sooner if unsupported version
...
follow-up #4937
2018-12-18 19:57:58 +01:00
ThomasV
fa389a4e06
Merge pull request #4937 from SomberNight/revert_password_v2
...
keystore: revert KDF change
2018-12-18 19:35:57 +01:00
SomberNight
0c9a03ac54
keystore: revert KDF change from #4838
...
making the KDF expensive is blocked on #4909
2018-12-18 15:37:29 +01:00
SomberNight
c59ac49fea
fix greenaddress plugin: follow-up 75f6ab9133
2018-12-17 13:41:00 +01:00
SomberNight
f0868f5a51
revealer: warning re version 0 vulnerability
2018-12-15 09:26:54 +01:00
SomberNight
e7e9f8e7f2
revealer: fix unlucky hex seed causing crash
2018-12-15 09:05:12 +01:00
SomberNight
f969edcf50
revealer: split some core parts out into separate file
...
for easier testing
2018-12-15 08:52:00 +01:00
SomberNight
94afd7a9ea
revealer: clean-up noise-generation. support regeneration of v0 again
2018-12-15 08:13:30 +01:00
SomberNight
91ef367176
revealer: fix path madness
...
don't use translated strings in file system paths!
2018-12-15 01:12:59 +01:00
ghost43
5fd83722d8
Merge pull request #4916 from tiagotrs/master
...
revealer: new interface
closes #4540
closes #4676
2018-12-15 01:11:14 +01:00
SomberNight
e1ba962fe1
revealer: clean-up prev and fixes
2018-12-15 01:07:35 +01:00
tiagotrs
ff2cdf9f16
small fixes, simplification/improvement of texts
2018-12-15 00:48:44 +01:00
tiagotrs
b41a83ceda
new hook/interface ref #4540
2018-12-15 00:48:40 +01:00
SomberNight
0657bb1b36
test_wallet_vertical: add segwit 2fa test
2018-12-14 23:01:52 +01:00
SomberNight
664b0c234e
wizard: fix imported address wallets
...
assertion added in 9350709f13 was failing
2018-12-14 22:50:25 +01:00
ThomasV
1e8b34e63e
rerun freeze_packages
2018-12-14 08:57:31 +01:00
ThomasV
27caa683fe
kivy: show synchronization status in the balance field
2018-12-14 08:27:03 +01:00
ThomasV
75f6ab9133
rm requests from greenaddress plugin
2018-12-14 07:41:26 +01:00
ThomasV
95cb2fbebf
remove requests from requirements
2018-12-14 07:19:26 +01:00
SomberNight
8b775fd24a
contrib: import 'requests' in try-except
2018-12-13 23:25:52 +01:00
SomberNight
78f5afff74
use certifi directly instead of requests
2018-12-13 23:11:59 +01:00
SomberNight
c09ac41b27
ssl: use certifi explicitly for aiohttp and electrum-server connections
...
fixes ssl issues on Android
2018-12-13 22:54:53 +01:00
ThomasV
7a4270f5a4
Qt: camera icon
2018-12-13 17:21:56 +01:00
SomberNight
67b2aebed6
android build: use rebased p4a fork
...
86eeec7c19
2018-12-13 16:23:58 +01:00
Calin Culianu
14363f8f2f
[Qt] Got rid of qt.util.Timer class and instead replaced the functionality with the more efficient QTimer. Also added disconnection from the timer on window close.
...
(cherry picked from 19a21eb08d )
2018-12-13 16:00:44 +01:00
ThomasV
3184d6f369
simplify previous commit
2018-12-13 12:10:36 +01:00
SomberNight
ef94af950c
wallet: try detecting internal address corruption
2018-12-12 20:50:53 +01:00
SomberNight
9bbfd610be
qt: don't flash QWidgets on startup before main window is visible
...
Consider wallet without password set. Using Qt GUI.
When starting the app, before the main window appears, small artefacts
("minimised" windows?) would appear very briefly and then disappear.
2018-12-12 19:58:13 +01:00
SomberNight
363dd12a2a
qt: try even harder not to crash whole app on first start
2018-12-11 21:29:23 +01:00
ThomasV
dd848304e6
Merge pull request #4880 from spesmilo/2fa_segwit
...
2fa segwit (from ghost43's PR)
2018-12-11 18:33:41 +01:00
ThomasV
4681ac8c23
CLI deserialize: always force full parse
2018-12-11 13:58:05 +01:00
ThomasV
502a4819b6
trustedcoin: do not set wallet.plugin in constructor
2018-12-11 13:08:10 +01:00
ThomasV
467e40b555
trustedcoin: serialize using PARTIAL_TXN_HEADER_MAGIC
2018-12-11 11:46:31 +01:00
ThomasV
040b5b3f88
trustedcoin: fix get_xkeys
2018-12-11 09:59:39 +01:00
SomberNight
84519752c3
trustedcoin: fix prev. remove temp xpubs.
2018-12-11 09:28:35 +01:00
ThomasV
852f2a0d65
trustedcoin: do not require wallet file upgrade
2018-12-11 09:28:35 +01:00
SomberNight
7b90d69443
trustedcoin: p2wpkh billing addresses
2018-12-11 09:28:35 +01:00
SomberNight
eeea4fcb31
rename 2fa non-segwit type to "legacy 2fa" and make segwit the default
2018-12-11 09:28:35 +01:00
ThomasV
df59a43300
fix test
2018-12-11 09:28:35 +01:00
ThomasV
5a93bf054e
2fa segwit (from ghost43's PR)
2018-12-11 09:28:35 +01:00
SomberNight
0ec7005f90
qt history: data() should return QVariant
...
the docs says so,
and also HistoryList.create_menu() was crashing sometimes re "Copy {}"
2018-12-10 19:42:31 +01:00
SomberNight
4e7b2f3ea3
qt history: use IntEnum for column indices
2018-12-10 19:25:38 +01:00
ghost43
53b64a6367
Merge pull request #4915 from spesmilo/qabstractitemmodel
...
use QAbstractItemModel in History tab
2018-12-10 18:10:00 +01:00
SomberNight
0ddccd56c7
interface: fix only-genesis regtest case
2018-12-10 17:46:37 +01:00
SomberNight
4791c7f424
qt history: fix toggling fiat capital gains
2018-12-10 16:53:46 +01:00
SomberNight
b0631f90f8
qt history: fix slowness
...
arghhhhh finalllllllllllly figured it out...
2018-12-10 16:48:55 +01:00
ThomasV
e35ed17200
remove call to undefined method refresh_headers
2018-12-10 13:07:03 +01:00
ThomasV
059fb51893
reintroduce profiler
2018-12-10 10:18:24 +01:00
SomberNight
ca1043ffda
qt history list: hide columns sooner
...
while wallet was starting up "hidden columns" were visible
2018-12-10 09:31:53 +01:00
SomberNight
5be6966462
qt history list: allow filtering by (partial) txid
2018-12-10 09:31:52 +01:00
SomberNight
0d755b86ab
qt address dialog: HistoryModel needs reference to correct HistoryList
...
refresh() was hiding/showing the headers of the main HistoryList
2018-12-10 09:31:52 +01:00
SomberNight
a99b92f613
qt history list: optimise fee histogram induced refresh
2018-12-10 09:31:51 +01:00
SomberNight
696db310a5
qt history list: optimise update_item (tx mined status)
2018-12-10 09:31:50 +01:00
SomberNight
b1e15751d6
qt history list: "status"-based sort should also tie-break on height
2018-12-10 09:31:50 +01:00
SomberNight
65e8eef87f
qt history list: use OrderedDictWithIndex for txns
2018-12-10 09:31:49 +01:00
SomberNight
8bb930dd04
fix OrderedDictWithIndex
...
setitem() would modify the dict of the class. oops.
2018-12-10 09:31:49 +01:00
SomberNight
3c3fac7ca4
qt history list: fix shortcut in refresh()
2018-12-10 09:31:48 +01:00
SomberNight
5e61ad09c1
qt addresses list: fix filtering
2018-12-10 09:31:48 +01:00
SomberNight
48e119b59e
qt history: minor clean-up and sanity checking
2018-12-10 09:31:47 +01:00
SomberNight
e023d8abdd
qt history list: sorting of first column now considers txpos
...
same block txns were in unnatural order, maybe sort is not stable?
2018-12-10 09:31:47 +01:00
SomberNight
1c0c21159b
qt history list: performance optimisations
2018-12-10 09:31:46 +01:00
Janus
d2ddb255ef
QAbstractItemModel: Release Notes and Address List fiat bug fix
2018-12-10 09:31:46 +01:00
Janus
3960070a50
QAbstractItemModel: fix sorting, QAbstractItemDelegate usage, QVariant usage
2018-12-10 09:31:45 +01:00
Janus
4eb4b341db
QAbstractItemModel: initial version, filter not done
2018-12-10 09:31:39 +01:00
SomberNight
5b9b6a931d
qt network dialog: fix NodesListWidget if there is fork
...
undo part of 5473320ce4
2018-12-10 08:04:54 +01:00
SomberNight
9607854b67
network: fix switching interface (restart old one)
...
follow-up b3ff173b45
connection_down was killing the already restarted old interface
2018-12-10 08:03:42 +01:00
SomberNight
62e352a2a8
network: don't let _maintain_sessions die from CancelledError
...
as then the network would get paralysed and no one can fix it
2018-12-09 20:04:42 +01:00
SomberNight
b3ff173b45
interface: change close() implementation
...
was getting on lightning branch in some circumstances
RecursionError: maximum recursion depth exceeded while calling a Python object
2018-12-09 20:02:00 +01:00
SomberNight
762082e13d
wine build: dedupe PYTHON_VERSION
2018-12-09 07:17:37 +01:00
ghost43
f59a4f85db
win/mac build: strip parts of pyqt5 from binaries to reduce size ( #4901 )
...
When bumping pyinstaller to 3.4, binary sizes had increased drastically.
The main reason seems to be that pyinstaller is pulling in "all" of qt.
based on Electron-Cash/Electron-Cash@4b09969594
2018-12-09 05:09:28 +01:00
benma
6c20340338
bitbox: fix seed command ( #4906 )
...
Entropy required to be 64 bytes.
2018-12-08 17:02:24 +01:00
SomberNight
0294844c11
labels plugin qt: only update corresponding window; disconnect signal
2018-12-08 06:56:18 +01:00
SomberNight
258b504000
qt main window: unregister network callbacks
2018-12-08 06:31:28 +01:00
SomberNight
c9482b5ea2
fix prev
2018-12-07 20:59:19 +01:00
SomberNight
c017f788ac
wallet: TxMinedInfo (merged TxMinedStatus and VerifiedTxInfo)
2018-12-07 20:47:28 +01:00
Janus
e1f4865844
digitalbitbox, trustedcoin: proxied http client
...
use common cross-thread HTTP method, which is put in network.py,
since that is where the proxy is. TrustedCoin tested successfully,
but DigitalBitbox can't be tested completely due to #4903
before this commit, digitalbitbox would not use any proxying
2018-12-07 19:19:40 +01:00
Janus
0169ec880c
digitalbitbox: make constant strings
2018-12-07 19:18:33 +01:00
Janus
9a3f2e8fcc
digitalbitbox: fix stretch_key bytes/str confusion
2018-12-07 18:41:40 +01:00
SomberNight
31a5d0c2f0
tweak release notes for 3.3
2018-12-07 04:32:17 +01:00
SomberNight
503bd357f4
requirements: bump python-trezor to 0.11
2018-12-07 04:06:51 +01:00
SomberNight
8c3920a0db
hw: check_libraries_available now gets version of incompatible libs
...
previously we would return early and the user would
just see "missing libraries"
2018-12-06 19:39:58 +01:00
ghost43
1546d65ebe
Merge pull request #4875 from matejcik/trezor-0.11
...
WIP: Trezor 0.11
2018-12-06 19:38:51 +01:00
SomberNight
20fa7fc2f7
trezor: fix sign_transaction prev_tx
2018-12-06 19:37:12 +01:00
SomberNight
9e86bc586c
trezor: only confirm passphrase when creating wallet
...
but not when decrypting
2018-12-06 19:37:11 +01:00
SomberNight
605982a2b7
android build: less verbose buildozer logs
2018-12-06 17:25:00 +01:00
SomberNight
2f7573850e
fix prev
2018-12-06 16:05:35 +01:00
SomberNight
8999e92f76
android build: fix warning re ndk_api
...
"NDK API target was not set manually, using the default of 21 = min(android-api=28, default ndk-api=21)"
2018-12-06 13:43:24 +01:00
SomberNight
a62e5d39ca
android build: add "how to deploy apk on phone" to readme
2018-12-06 05:10:24 +01:00
SomberNight
993374dce7
travis: build android apk
2018-12-06 05:09:08 +01:00
SomberNight
e8a8a17217
test_wallet_vertical: offline sign with old seed
2018-12-05 18:55:19 +01:00
matejcik
8e681c1723
trezor: update name (TREZOR -> Trezor)
2018-12-05 15:44:24 +01:00
matejcik
43acd09df8
trezor: support outdated firmware notifications
...
Outdated firmware error messages were originally raised from
create_client, which would mean that a client for an outdated device
would not be created.
This had a number of undesirable outcomes due to "client does not exist"
being conflated with "no device is connected".
Instead, we raise in setup_client (which prevents creating new wallets
with outdated devices, BUT shows them in device list), and python-trezor
also raises on most calls (which gives us an error message when opening
wallet and/or trying to do basically anything with it).
This is still suboptimal - i.e., there's currently no way for Electrum to
claim higher version requirement than the underlying python-trezor, and
so minimum_firmware property is pretty much useless ATM.
2018-12-05 14:26:19 +01:00
matejcik
8571cafcc8
trezor: call get_xpub with correct argument
...
`creating` indicates that this is a new wallet. Which is always the case
in `setup_device`
2018-12-05 14:24:32 +01:00
SomberNight
c3deb16a7d
exchange rate: fix coinbase
...
closes #4897
2018-12-05 12:26:03 +01:00
SomberNight
cc0db41879
qt history: speed up ensure_fields_available (faster startup)
2018-12-04 22:24:32 +01:00
SomberNight
e35f2c5bed
qt history list: fix #4896
2018-12-04 17:27:02 +01:00
SomberNight
923a9c36cb
util: Satoshis and Fiat should not be namedtuples
...
undo part of 37b009a342
due to json encoding problems
2018-12-04 16:44:50 +01:00
SomberNight
960855d0aa
wallet history fees: only calculate fees when exporting history
...
it's expensive, and it slows down startup of large wallets a lot
2018-12-04 16:17:22 +01:00
ThomasV
ebea5b0159
follow-up 5473320ce4: do not call get_full_history in constructor
2018-12-04 12:26:14 +01:00
ThomasV
bd5c82404d
do not block load_wallet with watching_only warning
2018-12-04 11:52:31 +01:00
ThomasV
5ae9365f77
Merge pull request #4895 from benma/bitbox
...
plugins/digitalbitbox: compatibility with firmware v5.0.0
2018-12-04 11:19:00 +01:00
Marko Bencun
92a9cda4fc
plugins/digitalbitbox: compatibility with firmware v5.0.0
2018-12-03 22:11:36 +01:00
SomberNight
059beab700
qt history list: small clean-up
2018-12-03 19:12:36 +01:00
SomberNight
ea235a1468
qt dark theme: use correct QR code icon (light/dark)
2018-12-03 17:51:05 +01:00
matejcik
8973bb6f71
Merge branch 'master' into trezor-0.11
2018-12-03 17:00:22 +01:00
SomberNight
d69ef890c0
downgrade qdarkstyle for now
...
see ColinDuquesnoy/QDarkStyleSheet#123
2018-12-03 16:04:17 +01:00
Janus
0677ce6d52
qt: avoid app.palette().text().color(), doesn't work on dark style
2018-12-03 15:54:21 +01:00
Janus
72957f4d51
qt_standardmodel: only use proxymodel when appropriate
2018-12-03 15:35:54 +01:00
Janus
5473320ce4
qt: use QStandardItemModel
2018-12-03 15:35:54 +01:00
SomberNight
9350709f13
wallet creation: take care not to write plaintext keys to disk
...
when creating imported privkey wallets the privkeys
were written to disk unencrypted first, then overwritten with ciphertext
2018-12-03 13:02:14 +01:00
SomberNight
ff454ab29d
cli restore: fix imported privkeys with password
...
closes #4894
2018-12-03 12:46:12 +01:00
ThomasV
e1fb75a81d
Merge pull request #4892 from preserveddarnell/patch-2
...
Update README.rst
2018-12-03 09:44:53 +01:00
ThomasV
dc46149f1c
Merge pull request #4893 from cculianu/fix_tx_desc_coins_tab
...
UI: Make Coins Tab -> Details TX Dialog show TX Description (label)
2018-12-03 09:08:30 +01:00
Calin Culianu
4386799fb0
follow-up
2018-12-02 15:20:32 +02:00
Calin Culianu
d2374d62aa
UI Pet Peeve: Make Coins Tab -> Details pop up a tx dialog that actually includes the tx description as seen in UTXOList (if available)
2018-12-02 14:53:44 +02:00
Ken
2f4b9aa1f0
Update README.rst
2018-12-01 21:28:46 -05:00
SomberNight
74f6ac27af
wizard/hw: cap transport string
...
follow-up 32af83b7ae
2018-11-30 20:45:54 +01:00
Janus
ec5f406f49
plugins: labels: dump response if malformed sync server response
2018-11-30 19:16:07 +01:00
SomberNight
fe6367cbcd
network: validate donation address for server
2018-11-30 18:56:35 +01:00
SomberNight
ed22f968f9
text gui: fix network event handler
2018-11-30 17:18:06 +01:00
SomberNight
73e2b09ba8
blockchain: check best chain on disk is consistent with checkpoints
...
had a corrupted mainnet datadir that had testnet blockchain_headers file
(I had probably corrupted it myself but electrum could not recover from it)
2018-11-30 16:36:37 +01:00
ThomasV
2484c52611
Merge pull request #4838 from SomberNight/keystore_pw_hash2b
...
keystore: stronger pbkdf for encryption
2018-11-30 11:48:03 +01:00
ThomasV
1165d3f330
update version number
2018-11-30 11:23:01 +01:00
ThomasV
86e42a9081
release notes for 3.3
2018-11-30 11:22:40 +01:00
SomberNight
bddea809ec
storage/blockchain: use os.replace
2018-11-30 04:08:02 +01:00
ThomasV
863ee984fe
wallet: cache NaN coin prices, clear cache on new history
2018-11-29 20:47:26 +01:00
SomberNight
ee287740a7
coldcard: fix p2pkh signing for new fw (1.1.0)
...
PSBT was serialised incorrectly but old fw did not complain
2018-11-29 20:28:27 +01:00
ThomasV
1253e3db1d
Merge pull request #4873 from SomberNight/android_docker
...
android docker build
2018-11-29 16:34:49 +01:00
SomberNight
124d2e23b7
fix travis macOS build
2018-11-29 13:24:44 +01:00
ThomasV
f4513c12eb
follow-up
2018-11-29 11:47:02 +01:00
ThomasV
f0a59f06cd
fix module path
2018-11-29 11:46:34 +01:00
ThomasV
d7bf8826fc
rename contrib/build-osx as contrib/osx. Move QRReader submodule there.
2018-11-29 11:39:57 +01:00
Calin Culianu
db89286ec3
[macOS] Added QR scanner facility using platform-native helper app.
2018-11-29 10:15:51 +01:00
SomberNight
d0e6b8c89d
hw: fix passphrase dialog with confirmation
...
closes #4876
2018-11-28 20:54:57 +01:00
SomberNight
243a0e3cf1
android docker: make_apk optionally takes "release" as arg
2018-11-28 19:40:29 +01:00
SomberNight
505cb2f65d
build-wine: update git version
2018-11-28 16:44:15 +01:00
SomberNight
99325618a6
wallet: add FIXME re fiat coin_price calculation
2018-11-28 15:52:38 +01:00
ThomasV
fc2972e977
Merge pull request #4869 from cculianu/add_macos_codesign
...
[macOS] Added optional code signing capability to the OSX build scripts.
2018-11-28 14:02:29 +01:00
ThomasV
04571d3b20
Merge pull request #4724 from un1t/master
...
use system language by default
2018-11-28 13:05:42 +01:00
ThomasV
d062548e41
Merge pull request #4861 from SomberNight/blockchain_fork_ids
...
blockchain: generalise fork handling and follow most work chain
2018-11-28 12:54:57 +01:00
SomberNight
e12af33626
wallet: cache more in get_tx_fee
...
closes #4879
2018-11-28 12:35:53 +01:00
SomberNight
4a7ce238fd
qt history list: fix sort order of fiat columns
2018-11-27 21:32:55 +01:00
SomberNight
d4d5e32c91
qt history list: fix Qt.UserRole collision
2018-11-27 21:15:31 +01:00
ThomasV
c5b8706225
simplify test
2018-11-27 18:34:36 +01:00
ThomasV
6bf48d0506
Merge pull request #4872 from spesmilo/qt_fiat_fixes
...
qt history view custom fiat input fixes
2018-11-27 18:16:05 +01:00
Janus
37b009a342
qt history view custom fiat input fixes
...
previously, when you submitted a fiat value with thousands separator,
it would be discarded.
2018-11-27 17:00:26 +01:00
matejcik
b040db26a7
drop trezor/client.py from build specs
2018-11-27 16:51:49 +01:00
matejcik
c33c907330
trezor: update to trezor 0.11.0
2018-11-27 15:34:19 +01:00
matejcik
5411ad9633
plugins can also check maximum library version
2018-11-27 15:32:33 +01:00
SomberNight
a34d42492d
android docker build
2018-11-27 03:53:22 +01:00
ghost43
12c6a4043b
Merge pull request #4864 from SomberNight/android_build_2018nov
...
android: build apk using new python3 p4a toolchain
2018-11-26 22:02:52 +01:00
SomberNight
b21064f16f
android: don't use external storage
...
so that we don't need the extra permission.
also because phones these days have enough internal storage for
the headers; and maybe it's better even for security reasons to
store it there.
no upgrade path is provided for the headers stored on external storage,
we will litter the filesystem and leave them there. they will be
downloaded again into internal storage.
2018-11-26 17:54:07 +01:00
SomberNight
29b697df1a
android: runtime permission dialog for camera
2018-11-26 17:54:07 +01:00
SomberNight
f095b35663
android: build apk using new python3 p4a toolchain
2018-11-26 17:54:05 +01:00
Calin Culianu
d296a1be65
[macOS] Added optional code signing capability to the OSX build scripts.
2018-11-26 13:36:51 +02:00
SomberNight
a53dded50f
bitcoin: avoid floating point in int_to_hex
2018-11-26 01:34:23 +01:00
SomberNight
d7c5949365
prefer int.from_bytes over int('0x'+hex, 16)
2018-11-26 01:16:26 +01:00
SomberNight
67abea567f
rerun freeze packages
2018-11-22 19:41:06 +01:00
SomberNight
0dd3a58a63
requirements: also accept aiorpcx 0.10.x
2018-11-22 19:37:56 +01:00
SomberNight
f04e5fbed6
crypto: fix pkcs7 padding check
...
related: ricmoo/pyaes#22
in practice, the only strings we would incorrectly accept are
(certain length of) all zero bytes
2018-11-22 18:21:19 +01:00
SomberNight
65ce3deeaa
blockchain: chain hierarchy based on most work, not length
2018-11-22 17:13:43 +01:00
SomberNight
141ff99580
blockchain.py: generalise fork ids to get rid of conflicts
2018-11-22 16:57:22 +01:00
SomberNight
a8e6eaa247
blockchain: fix difficulty retarget
...
"target" is a 256 bit int, but the "bits" field in the block headers
that is used to represent target is only 32 bits.
We were checking PoW against the untruncated target value, which is a
slightly larger value than the one that can actually be represented,
and hence we would have accepted a slightly lower difficulty chain
than what the consensus requires.
2018-11-22 16:52:51 +01:00
SomberNight
55963bd092
network: oneserver should be bool
...
fix #4858
2018-11-20 11:59:06 +01:00
SomberNight
36f64d1ad9
bitcoin/ecc: some more type annotations
2018-11-18 22:07:27 +01:00
SomberNight
5376d37c24
history export: include tx fee
...
closes #3504
2018-11-18 16:46:07 +01:00
SomberNight
32af83b7ae
wizard/hw: show transport type when listing HWDs
2018-11-16 19:03:25 +01:00
SomberNight
eba97f74b4
decorate some methods with @profiler to debug slow startup
2018-11-16 14:39:22 +01:00
ghost43
4d62963efe
qt: count wizards in progress ( #4349 )
...
fixes #4348
2018-11-14 22:39:49 +01:00
SomberNight
f767d41409
tests: spanish test case for mnemonic.py, and refactoring
2018-11-14 18:58:27 +01:00
Calin Culianu
75e30ddc9d
Show description (label) in TxDialog screen when opened from History ( #4775 )
2018-11-14 16:43:58 +01:00
SomberNight
e1c66488b1
paymentrequest: don't show PaymentAck to user
...
mainly because the main "merchant" using bip70 is bitpay, and they
are failing all the PaymentAcks due to the tx is using RBF...
no need to confuse users.
follow-up 1686a97ece
2018-11-14 16:33:41 +01:00
ThomasV
f7f4fef156
Merge pull request #4827 from SomberNight/android_oneserver
...
implement oneserver option for kivy
2018-11-14 16:13:05 +01:00
SomberNight
e059867314
paymentrequest: be explicit about only allowing "addresses"
2018-11-14 16:04:43 +01:00
ThomasV
a266de6735
PrintError: display verbosity filter
2018-11-14 13:16:08 +01:00
SomberNight
e1b85327be
transaction: clean-up multisig_script
2018-11-14 00:37:03 +01:00
SomberNight
e04e8d2365
plugins: when loading plugins, use newer importlib mechanism
...
fixes #4842
2018-11-11 23:55:34 +01:00
SomberNight
48b0de7871
keystore: stronger pbkdf for encryption
2018-11-10 16:36:41 +01:00
SomberNight
aceb022f9d
crypto: more type annotations
2018-11-10 13:30:34 +01:00
SomberNight
a6a003a345
RBF batching: fix logic bug
2018-11-09 22:47:41 +01:00
SomberNight
2ab8234e9c
RBF batching: smarter fee handling
2018-11-09 20:04:06 +01:00
SomberNight
d905f0e55e
RBF batching: for now, let user deal with fee problems (honour slider)
2018-11-09 19:15:46 +01:00
SomberNight
436f6a4870
qt history export: include fiat value in csv
2018-11-09 18:48:12 +01:00
SomberNight
71ac3bb305
RBF batching: some fixes
2018-11-09 17:56:42 +01:00
ThomasV
f55db2f90b
add batch_rbf option to Qt GUI
2018-11-09 17:29:31 +01:00
ThomasV
2b8d801b36
if possible, batch new transaction with existing rbf transaction
2018-11-09 16:33:29 +01:00
SomberNight
bd32b88f62
introduce UserFacingException
...
we should not raise generic Exception when wanting to communicate with
the user. it makes distinguishing programming errors and messages hard,
as the caller will necessarily need to catch all Exceptions then
2018-11-08 19:46:15 +01:00
SomberNight
dace2e5495
trezor: don't let bridge transport failing block all other transports
...
[trezor] connecting to device at bridge:hid...
[trezor] connected to device at bridge:hid...
Traceback (most recent call last):
File "...\electrum\electrum\base_wizard.py", line 255, in choose_hw_device
u = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices)
File "...\electrum\electrum\plugin.py", line 501, in unpaired_device_infos
client = self.create_client(device, handler, plugin)
File "...\electrum\electrum\plugin.py", line 374, in create_client
client = plugin.create_client(device, handler)
File "...\electrum\electrum\plugins\trezor\trezor.py", line 124, in create_client
client = self.client_class(transport, handler, self)
File "...\electrum\electrum\plugins\trezor\client.py", line 7, in __init__
ProtocolMixin.__init__(self, transport=transport)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 444, in __init__
self.init_device()
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 454, in init_device
self.features = expect(proto.Features)(self.call)(init_msg)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 115, in wrapped_f
ret = f(*args, **kwargs)
File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 129, in wrapped_f
client.transport.session_begin()
File "...\Python36-32\lib\site-packages\trezorlib\transport\__init__.py", line 42, in session_begin
self.open()
File "...\Python36-32\lib\site-packages\trezorlib\transport\bridge.py", line 69, in open
raise TransportException('trezord: Could not acquire session' + get_error(r))
trezorlib.transport.TransportException: trezord: Could not acquire session (error=400 str=wrong previous session)
[DeviceMgr] error getting device infos for trezor: trezord: Could not acquire session (error=400 str=wrong previous session)
2018-11-08 17:07:05 +01:00
SomberNight
47b6d3c52c
wizard: make native segwit (bech32) the default for bip39/hw
2018-11-08 13:01:40 +01:00
ThomasV
3d4773b161
wizard: make segwit/bech32 the default choice during wallet creation
2018-11-07 15:03:54 +01:00
SomberNight
7d114ff32d
cpfp: don't reuse address
2018-11-07 14:48:33 +01:00
ThomasV
39fb5b8f58
use blockstream.info as default block explorer
2018-11-07 12:38:29 +01:00
neoCogent
6d5b28a9c5
add blockstream.info as explorer option ( #4829 )
2018-11-07 02:18:00 +01:00
SomberNight
8b61d18a9f
transaction.serialize_output: use namedtuple fields
2018-11-06 17:04:12 +01:00
SomberNight
5d52dc204c
coldcard: fix spending when there is no change
...
follow-up 9037f25da1
2018-11-06 16:17:18 +01:00
SomberNight
1686a97ece
bip70 PRs: use aiohttp instead of requests. use proxy. small fixes.
2018-11-05 19:31:17 +01:00
SomberNight
1b46866e34
qt: re sweeping, minor clean-up
2018-11-05 01:53:35 +01:00
SomberNight
a89e67eeed
network: trivial clean-up
2018-11-04 19:25:23 +01:00
SomberNight
160bc93e26
implement oneserver option for kivy
...
closes #4826
2018-11-03 17:21:38 +01:00
SomberNight
7a46bd1089
network: minor clean-up
2018-11-03 17:11:08 +01:00
SomberNight
908c979338
network: update hardcoded mainnet servers
2018-11-02 20:38:26 +01:00
SomberNight
1a5c77aa82
follow-up prev
2018-11-02 20:37:37 +01:00
SomberNight
e37da62a1c
fix most "scripts"
...
related: #4754
2018-11-02 20:14:59 +01:00
SomberNight
5c4a6c0f2b
rm network.add_job
...
current implementation is prone to race, and is not used anyway
2018-11-02 16:06:47 +01:00
SomberNight
c2ecfaf239
move event loop construction to daemon
2018-11-01 16:30:03 +01:00
SomberNight
ca8eae919f
daemon: clarify error print
2018-10-31 19:59:07 +01:00
SomberNight
0862fdb9a9
plugins: somewhat clearer exception is loading plugin fails
...
see #4817 (issuecomment-434778055)
2018-10-31 18:33:28 +01:00
SomberNight
386e0d560e
wizard,hw: tell user about errors during plugin init
...
see #4817 (issuecomment-434765570)
2018-10-31 17:58:47 +01:00
SomberNight
4f7283a3b0
expose electrum version as __version__
2018-10-31 16:21:04 +01:00
SomberNight
1c63bca2c7
follow-up prev
2018-10-30 19:19:46 +01:00
SomberNight
5b4fada2a0
fix some network.get_transaction calls
...
see #4814 (issuecomment-434392195)
2018-10-30 19:07:37 +01:00
SomberNight
f53b480f1c
wallet: more powerful add_input_info
...
tangentially related: #4814
also recognise that input is_mine if tx was not fully parsed
but we have the prevout UTXO
2018-10-29 21:34:44 +01:00
SomberNight
f819e9b6f4
openalias: minor clean-up
2018-10-29 17:09:23 +01:00
SomberNight
af232223ee
windows build script: add note to build from fresh clone
2018-10-29 15:48:04 +01:00
SomberNight
5e0179dac4
qt console: expose more refs, and fix auto-complete for >2 depth
2018-10-29 00:20:45 +01:00
SomberNight
9037f25da1
kill old-style namedtuples
2018-10-28 00:28:29 +02:00
SomberNight
34569d172f
wallet: make importing thousands of addr/privkeys fast
...
fixes #3101
closes #3106
closes #3113
2018-10-27 17:36:10 +02:00
SomberNight
917b7fa898
network shutdown safety belts
2018-10-26 22:43:33 +02:00
SomberNight
416b687054
storage: add a sanity check
...
see #4803
2018-10-26 19:31:20 +02:00
SomberNight
78258a3a95
fix #4802
2018-10-26 18:45:36 +02:00
SomberNight
bcdb0c46fc
update to aiorpcx 0.9 and require it
2018-10-26 17:06:42 +02:00
SomberNight
263c9265ae
rerun freeze packages
2018-10-26 16:56:23 +02:00
SomberNight
92d16e8b10
follow-up prev: unshallow no longer needed
2018-10-26 15:56:08 +02:00
SomberNight
2aefc8440a
travis: make sure to have latest tag
...
The Win/Mac build scripts name the binaries using "git describe --tags",
so reproducibility requires git to find the latest tag.
By default, Travis uses depth=50.
2018-10-26 15:34:46 +02:00
SomberNight
791e0e1a67
move relayfee and dust_threshold to bitcoin.py
2018-10-25 23:08:59 +02:00
SomberNight
99d18a48f2
types: make some import conditional
2018-10-25 23:01:53 +02:00
SomberNight
082a83dd85
rename crypto.Hash to sha256d
2018-10-25 22:28:24 +02:00
SomberNight
a88a2dea82
split bip32 from bitcoin.py
2018-10-25 22:20:33 +02:00
SomberNight
c61e13c1e9
add more block explorers, and change defaults
2018-10-25 18:27:41 +02:00
Andrew Zhuk
07a06b5d15
Update util.py ( #4797 )
...
Adding Bitupper Explorer to the list
2018-10-25 17:09:52 +02:00
SomberNight
361ffc0620
correctly handle bitcoin URIs if GUI is already running
...
see #4796
2018-10-25 00:18:14 +02:00
SomberNight
0e6160bf2d
follow-up prev: bad idea to eval translated string
2018-10-23 03:01:23 +02:00
SomberNight
b68729115a
qt wallet information: added keystore type
2018-10-23 02:54:54 +02:00
SomberNight
2a60a701bf
qt wallet information: show has_seed and watching_only
2018-10-22 23:47:34 +02:00
SomberNight
2d352bc3f0
transaction.BIP69_sort: use namedtuple fields
2018-10-22 20:43:31 +02:00
SomberNight
c4e09fa874
simplify Plugins constructor
2018-10-22 18:21:38 +02:00
SomberNight
81cc20039e
more type annotations in core lib
2018-10-22 16:41:25 +02:00
SomberNight
6958c0ccc3
config: reject non-json-serialisable writes
...
see #4788
2018-10-21 14:58:55 +02:00
SomberNight
ef2a6359e4
fix SSL log spam on py3.7
...
based on kyuupichan/electrumx@83813ff1ac
see pooler/electrum-ltc#191
2018-10-21 03:09:47 +02:00
SomberNight
637e65efe3
network.stop: fix await
2018-10-20 23:17:10 +02:00
ghost43
c47533f6cf
Merge pull request #4784 from Coldcard/fix4729
...
Fix Coldcard plugin's p2wpkh-p2sh support (see issue #4729 )
2018-10-19 22:27:46 +02:00
SomberNight
bf18e2bbc9
follow-up prev
2018-10-19 22:24:42 +02:00
SomberNight
10a4c7a6ed
wallet.mktx: add new args: rbf, nonlocal_only
...
used on lightning branch
2018-10-19 20:48:48 +02:00
SomberNight
e8bc025f5c
verifier: fix race in __init__
2018-10-19 18:10:04 +02:00
Peter D. Gray
14b4955a6f
Fix p2wpkh-p2sh support per issue #4729
2018-10-18 12:38:47 -04:00
Calin Culianu
1526fd3722
Removal of macOS Info.plist. It isn't being used by anything. ( #4773 )
2018-10-14 14:12:25 +02:00
SomberNight
2cc77c1c7d
rm system config sample
...
system-level configs are no longer supported since 04a1809969
2018-10-14 05:13:56 +02:00
SomberNight
60f8cf665e
dnssec: trivial clean-up
2018-10-14 04:23:42 +02:00
SomberNight
0e59bc1bc5
network: "switch unwanted fork" should check what fork we are on..
...
follow-up #4767
2018-10-14 04:23:10 +02:00
SomberNight
1af225015a
fix some type annotations involving tuples
2018-10-13 05:16:36 +02:00
SomberNight
7c4d6c6801
fix #4771
2018-10-13 04:22:53 +02:00
SomberNight
5afdc14913
util: small clean-up re format_satoshis
...
related #4771
2018-10-13 04:21:07 +02:00
SomberNight
8fa6bd2aac
network: add_job
2018-10-12 19:03:36 +02:00
ThomasV
e573c6d385
Merge pull request #4770 from SomberNight/kill_aiosafe
...
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions
2018-10-12 18:53:29 +02:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions
2018-10-12 18:36:48 +02:00
SomberNight
ab441a507a
readme: use 'python3 -m pip install' to install
2018-10-12 17:02:38 +02:00
SomberNight
372921b423
mv NetworkJobOnDefaultServer to util
...
break ref cycles
2018-10-12 16:09:41 +02:00
脇山P
9ce3814d8b
build-wine: update git version ( #4769 )
2018-10-12 11:44:34 +02:00
ThomasV
684e69763a
Merge pull request #4767 from SomberNight/auto_jump_forks
...
network: auto-switch servers to preferred fork (or longest chain)
2018-10-12 10:50:47 +02:00
ThomasV
cd5152a02d
Merge pull request #4765 from SomberNight/cli_restore_cmd
...
cli/rpc: 'restore' and 'create' commands are now available via RPC
2018-10-12 10:48:09 +02:00
SomberNight
1233309ebd
cli/rpc: 'restore' and 'create' commands are now available via RPC
2018-10-11 20:57:15 +02:00
SomberNight
37206ec08e
network: auto-switch servers to preferred fork (or longest chain)
...
If auto_connect is enabled, allow jumping between forks too.
(Previously auto_connect was only switching servers on a given fork,
not across forks)
If there is a preferred fork set, jump to that (and stay);
if there isn't, always jump to the longest fork.
2018-10-11 20:07:19 +02:00
SomberNight
1ef804c652
small import clean-up
2018-10-11 16:30:30 +02:00
ThomasV
cd5453e477
Merge pull request #4753 from SomberNight/synchronizer_rewrite
...
restructure synchronizer
2018-10-10 20:46:17 +02:00
SomberNight
150e27608b
wallet: rm electrum_version field
2018-10-10 20:26:12 +02:00
ThomasV
e975727075
follow-up prev commit
2018-10-10 19:26:02 +02:00
ThomasV
bb9871ded7
simplify prev commit
2018-10-10 19:24:24 +02:00
ThomasV
f037f06e74
Merge pull request #4758 from SomberNight/qt_fork_icon
...
qt network status: display 'fork' in icon when chain split is detected
2018-10-10 19:18:11 +02:00
SomberNight
87b05e1c9e
network: change broadcast_transaction api
...
raise exceptions instead of weird return values
closes #4433
2018-10-10 15:56:41 +02:00
ThomasV
c7833b8bc0
Merge pull request #4727 from SomberNight/refresh_gui_f5
...
qt: refresh gui with "F5"
2018-10-10 10:53:00 +02:00
Felix Yan
ad503daaca
Fix some typos in RELEASE-NOTES ( #4762 )
2018-10-09 16:28:27 +02:00
SomberNight
cc18f66793
network: don't save negative ETA fee estimates
...
-1 means bitcoind could not give an estimate
2018-10-09 12:03:38 +02:00
Mark B Lundeberg
508793b010
qt transaction_dialog: normal close if user presses Esc
...
(Electron-Cash/Electron-Cash#890 )
2018-10-09 01:14:33 +02:00
SomberNight
dc1a31d802
fix tests
...
follow-up 70cca3bad9
2018-10-07 18:43:35 +02:00
SomberNight
f3f2534877
qt status: display "loading wallet" temporarily
...
this will likely only be visible for large wallets;
it gets overwritten by update_status()
2018-10-07 17:59:32 +02:00
SomberNight
70cca3bad9
fix #4759
2018-10-07 17:50:52 +02:00
SomberNight
b37695f9c8
linux launcher madness
...
see #4300
2018-10-06 01:58:30 +02:00
Johann Bauer
1d7bf698f2
Windows: Update copyright notice in installed apps
2018-10-05 16:39:41 +02:00
SomberNight
decb8bfd52
qt network status: display 'fork' in icon when chain split is detected
2018-10-05 00:16:06 +02:00
SomberNight
d759546b32
qt console: fix word wrap
2018-10-03 18:26:09 +02:00
SomberNight
02f108d927
restructure synchronizer
...
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00
SomberNight
788b5b04fe
ledger: always use finalizeInput in sign_transaction
...
related #4749
2018-10-02 15:52:24 +02:00
SomberNight
a61953673a
fees: add 1-2 s/b static options
2018-10-02 15:44:09 +02:00
SomberNight
da9d1e6001
network: ensure there is a main interface
...
scenario with previous code:
auto_connect enabled, there is only one server in regtest environment.
client started before server; client would not switch to server after it is started.
2018-10-01 18:16:37 +02:00
SomberNight
7dd4032cce
daemon: call self.start in __init__, and allow not to listen on jsonrpc
2018-10-01 17:56:51 +02:00
SomberNight
4653a1007c
daemon: more convenient constructor for scripts
2018-10-01 15:49:26 +02:00
Johann Bauer
3f4e632cc4
Travis: Fix crowdin upload
2018-10-01 13:20:05 +02:00
SomberNight
626828e980
fix sweeping
2018-10-01 05:16:03 +02:00
SomberNight
4d43d12abf
transaction: don't convert p2pk to p2pkh address when displaying
...
also closes #4742
2018-10-01 04:58:26 +02:00
SomberNight
ab1ec57429
trezor and clones: rm dead code
...
see Electron-Cash/Electron-Cash#872
see Electron-Cash/Electron-Cash#874
2018-09-30 02:10:17 +02:00
SomberNight
8aebb8249a
keepkey: full segwit support
...
ported from trezor plugin
needs new fw to work (5.8??)
fixes #3462
2018-09-30 01:29:27 +02:00
SomberNight
70c32590a9
hw plugins: fix only_hook_if_libraries_available
...
follow-up f9a5f2e183
2018-09-30 00:25:36 +02:00
SomberNight
ce5cc135cd
transaction: make get_address_from_output_script safer
...
closes #4743
2018-09-29 19:47:55 +02:00
SomberNight
53fd6a2df5
transaction: always sort i/o deterministically
...
this was previously the caller's responsibility; now it's done implicitly when creating a txn
2018-09-28 19:17:45 +02:00
SomberNight
5e4a4ae16b
minor clean-up (prints/types/imports)
2018-09-28 17:58:46 +02:00
SomberNight
32d5305295
fix daemon.load_wallet
2018-09-28 16:43:25 +02:00
SomberNight
071bc27016
setup.py: rm deprecated 'imp'. dedupe min py version
2018-09-28 02:47:36 +02:00
SomberNight
12e79ecd60
qt tx dialog: make input/output fields expand
...
based on Electron-Cash/Electron-Cash@169c137211
2018-09-27 21:44:18 +02:00
SomberNight
3e2c5e8656
network.best_effort_reliable: force DC if req times out; retry on new iface
2018-09-27 21:15:07 +02:00
SomberNight
4984890265
follow-up prev: make best_effort_reliable react faster to disconnects
2018-09-27 20:04:36 +02:00
SomberNight
6b8ad2d126
fix some CLI/RPC commands
2018-09-27 18:01:25 +02:00
SomberNight
3b9a55fab4
rerun freeze packages
2018-09-26 19:33:12 +02:00
SomberNight
c4f3fbaca0
labels: fix potential threading issues
...
also handle --offline
2018-09-25 21:23:44 +02:00
SomberNight
deda6535e0
bump min aiorpcx to 0.8.2
2018-09-25 19:22:37 +02:00
SomberNight
33d14e4238
some import clean-up in qt
2018-09-25 18:15:28 +02:00
SomberNight
9d7cf12244
follow-up prev: fix tests
2018-09-25 17:00:43 +02:00
SomberNight
952e9b87e1
network: clean-up. make external API clear. rm interface_lock (mostly).
2018-09-25 16:44:39 +02:00
SomberNight
7cc628dc79
synchronizer: fix adding duplicate addresses race
2018-09-24 17:37:09 +02:00
Ilya Shalyapin
4c8103af3b
move get_default_language to gui.qt.util
2018-09-23 14:11:50 +05:00
SomberNight
3be5b4b00f
network: fix some threading issues
2018-09-20 21:07:31 +02:00
SomberNight
1294608571
synchronizer: offload cpu-heavy address generation to other thread
2018-09-20 20:16:03 +02:00
SomberNight
172ddf4aaf
wallet: synchronize_sequence cleaned up a bit
2018-09-20 20:04:50 +02:00
SomberNight
55b582511e
fix deprecation warnings in regexes
2018-09-20 18:31:17 +02:00
SomberNight
e4fd5ec1ae
tox: add python 3.7 to envlist
...
previous CI build was complaining
2018-09-20 18:25:46 +02:00
SomberNight
002b8a99e2
synchronizer: make 'add' thread-safe, and some clean-up
2018-09-20 18:11:26 +02:00
SomberNight
eccb8ec2d6
normalize wallet file paths
...
fix #4020
fix #4126
2018-09-20 01:21:42 +02:00
SomberNight
61b5ce0451
fix import error
2018-09-20 01:20:13 +02:00
SomberNight
d50b36d314
daemon: suppress pop wallet failure
...
follow-up 3ec0ceba3e
related: #4126
2018-09-20 00:55:09 +02:00
SomberNight
9586157479
qt: refresh gui with "F5"
2018-09-19 22:12:02 +02:00
SomberNight
cedd518aea
mark 'blockchain_headers' file as sparse on windows
...
based on fyookball/electrum@647a6cc26d
2018-09-19 22:09:54 +02:00
SomberNight
855a70bc66
network: new trigger 'blockchain_updated'
...
follow-up af63913189
needed to update history tab when new blocks come,
to refresh the number of confirmations (icons/tooltips)
2018-09-19 21:56:09 +02:00
SomberNight
cbd91ba5b1
synchronizer: fix race
...
The synchronizer would sometimes not send 'wallet_updated' triggers
if it was fast enough to do all the work between two 0.1 sec ticks.
(is_up_to_date() would return True both before and after)
2018-09-19 21:41:10 +02:00
SomberNight
8ee1f140d8
interface: split run_fetch_blocks
...
The 'continue' in the middle was too easy to miss.
We want a 'network_updated' trigger from every interface,
not just the fastest.
2018-09-19 20:30:54 +02:00
SomberNight
f9a5f2e183
fix #4698
2018-09-19 20:02:03 +02:00
SomberNight
8caab35d90
trezor: re-enable bridge transport
...
It was disabled in 680df7d6b6 due to #4421 ,
but that has since been fixed.
Also related is #4060 ; and now that that is closed, the bridge transport
is not proxied anyway.
2018-09-19 18:14:55 +02:00
SomberNight
9161e8c8f4
interface: refuse to overwrite blockchain of main interface
...
in case of conflicting forks
2018-09-19 17:56:42 +02:00
SomberNight
7e1a784fca
follow-up prev: fix race between load_wallet and network events
...
[127.0.0.1] Exception in wrapper_func : AttributeError 'ElectrumWindow' object has no attribute 'wallet'
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/util.py", line 839, in f2
return await f(*args, **kwargs)
File "/home/user/wspace/electrum/electrum/interface.py", line 245, in wrapper_func
return await func(self, *args, **kwargs)
File "/home/user/wspace/electrum/electrum/interface.py", line 260, in run
await self.open_session(ssl_context, exit_early=False)
File "/home/user/wspace/electrum/electrum/interface.py", line 357, in open_session
await group.spawn(self.monitor_connection())
File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 241, in __aexit__
await self.join(wait=self._wait)
File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 214, in join
raise task.exception()
File "/home/user/wspace/electrum/electrum/address_synchronizer.py", line 173, in job
await group.spawn(self.synchronizer.main())
File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 241, in __aexit__
await self.join(wait=self._wait)
File "/usr/local/lib/python3.6/dist-packages/aiorpcx/curio.py", line 214, in join
raise task.exception()
File "/home/user/wspace/electrum/electrum/synchronizer.py", line 181, in main
self.wallet.network.trigger_callback('wallet_updated', self.wallet)
File "/home/user/wspace/electrum/electrum/network.py", line 267, in trigger_callback
callback(event, *args)
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 300, in on_network
if wallet == self.wallet:
AttributeError: 'ElectrumWindow' object has no attribute 'wallet'
2018-09-19 17:44:52 +02:00
SomberNight
96b699e534
synchronizer: fix refresh bug
2018-09-19 16:35:30 +02:00
SomberNight
6f0dceb152
fix #4726
...
follow-up 88fc62e8f7
2018-09-19 15:26:03 +02:00
ghost43
924ee1a672
Merge pull request #4725 from joren485/unreachable_return
...
Remove unreachable return statement
2018-09-19 13:09:49 +02:00
Joren Vrancken
ae501ca8ed
Remove unreachable return statement
2018-09-19 11:35:29 +02:00
Ilya Shalyapin
d840804818
use system language by default
2018-09-19 13:07:19 +05:00
SomberNight
adc91eb75e
interface: hostname cannot be empty
2018-09-18 20:21:10 +02:00
SomberNight
916cdebacb
network: send out update trigger when stopping/starting network
2018-09-18 19:27:33 +02:00
SomberNight
a2ed08615c
minor.. move imports out of functions
2018-09-18 18:07:12 +02:00
SomberNight
39db32c3ce
follow-up prev
2018-09-18 17:59:02 +02:00
SomberNight
af63913189
network triggers: rm 'updated'; more fine-grained instead
...
rm 'interfaces'
add 'wallet_updated', add 'network_updated'
2018-09-18 16:49:48 +02:00
SomberNight
fef15f9c02
wallet: minor opt in get_history
2018-09-18 16:41:56 +02:00
SomberNight
825d7c2cbd
interface: subscribe to headers in run_fetch_blocks
...
so that 'monitor_connection' is already running while waiting for first header
2018-09-18 15:40:32 +02:00
ThomasV
3ec0ceba3e
add option to leave daemon running after GUI is closed
2018-09-18 12:05:37 +02:00
SomberNight
67d3d6b5b5
qt: don't update tabs in ElectrumWindow.__init__ directly
2018-09-18 04:19:12 +02:00
SomberNight
01246b0d97
wallet/verifier: when adding into unverified_tx, don't remove from verifier
...
Not needed since aee2d8e120
And was never really working I guess (race..)
Also, during normal initial history sync, it caused the verifier to request
proofs multiple times.
2018-09-18 03:48:14 +02:00
SomberNight
533bd97a05
qt HistoryList.update_item: perf optimisation
2018-09-18 03:19:24 +02:00
SomberNight
c8f82c71c9
wallet: small perf optimisation in add_transaction
2018-09-18 02:14:23 +02:00
SomberNight
11bf084a1f
network triggers: 'verified' notification now includes wallet
...
this is a performance optimisation.
measurements using a large wallet with 11k txns:
syncing XPUB for the first time takes 10 seconds. leaving window open, and
syncing same XPUB again in new window takes 30 seconds. in third window,
it takes ~50 seconds. then ~70s. presumably scaling linearly.
this is due to the history_list.update_item call being CPU-heavy.
now all of them take 10 seconds.
2018-09-18 01:40:34 +02:00
SomberNight
24ec7ce6b8
qt network dialog: maybe fix refresh bug
2018-09-17 22:31:31 +02:00
SomberNight
7221fb3231
interface: further simplifications for fork resolution
2018-09-17 22:30:25 +02:00
SomberNight
b3a2bce213
interface: simplify fork resolution logic
2018-09-17 22:30:21 +02:00
SomberNight
435efb47d0
wallet: lock in get_addr_io, get_tx_delta, get_tx_value
...
probably fixes #4716
2018-09-17 18:50:47 +02:00
SomberNight
1b95cced5d
verifier: perf optimisations
...
blockchain.read_header is expensive. do cheap tests first
on a wallet with 11k txns, that is synced except for spv proofs,
finishing sync now takes 80 sec instead of 180 sec
2018-09-17 18:31:25 +02:00
SomberNight
e5e3ac0364
fix #4720
2018-09-17 14:44:01 +02:00
SomberNight
aee2d8e120
verifier: fix a race during reorgs
...
related: 41e088693d
If our guess of a txn getting confirmed at the same height in the new chain
as it was at in the old chain is incorrect, there is a race between the
verifier and the synchronizer. If the verifier wins, the exception will cause
us to disconnect.
2018-09-17 03:35:25 +02:00
SomberNight
dcab22dcc7
verifier: small clean-up
2018-09-16 22:21:49 +02:00
SomberNight
78488ebcbf
aiosafe safety belts
...
traceback.print_exc was raising, and self.exception did not got set,
and the whole trace was lost. arghhhh
2018-09-16 22:17:20 +02:00
SomberNight
4360a785ad
blockchain: blockchains_lock needed to write/iterate global dict
2018-09-16 18:26:40 +02:00
SomberNight
7dc5665ab1
interface: faster bootstrap of backwards search
2018-09-16 18:18:49 +02:00
SomberNight
4d502eb2bf
qt tx notifications: wait until sync finishes
...
Comment is no longer relevant. Also, actually it was incorrect.
Each txn is only downloaded once, though 'added' multiple times to the wallet.
The triggers are only sent out by the Synchronizer, once, when downloaded.
The actual reason for the inconsistency was that get_wallet_delta can only
give complete results once the wallet is synced.
2018-09-16 09:40:07 +02:00
SomberNight
9c919e6478
interface: fix off-by-one in request_chunk
...
was harmless; usually we just downloaded an extra individual header after the chunk
2018-09-16 09:01:53 +02:00
SomberNight
1d711eeadc
interface: split up 'step'; binary search of headers
2018-09-16 08:29:01 +02:00
SomberNight
58a5346d72
network: switch lagging interface
2018-09-16 07:59:36 +02:00
SomberNight
27e42b4826
interface: if header is on other chain already, just switch (regression)
2018-09-16 07:42:25 +02:00
SomberNight
3fc9326c43
interface: try hard not to infinite loop while getting headers
2018-09-16 07:35:11 +02:00
SomberNight
da23e71db1
interface: block header search simplifications
2018-09-16 07:34:05 +02:00
SomberNight
ab94a47b8e
network: mv request_chunk to interface
...
this is a bugfix: the old code always tried to connect the chunk to
network.blockchain(). the correct behaviour is to connect to the
blockchain of the interface.
2018-09-16 06:09:14 +02:00
SomberNight
1635bc8cb3
blockchain: use HEADER_SIZE named constant instead of magic numbers
2018-09-16 03:06:21 +02:00
SomberNight
a9197236a2
change 'new_transaction' notification to include wallet
2018-09-16 02:48:13 +02:00
SomberNight
2453872a09
synchronizer: rm redundant 'updated' notification
2018-09-16 02:31:56 +02:00
SomberNight
6f5a4a5502
fix prev: rm incorrect assert
2018-09-15 08:23:49 +02:00
SomberNight
482259df8b
interface: further clean-up in 'step'
2018-09-15 07:26:36 +02:00
SomberNight
beb37aafc5
interface: clean-up 'step'; backwards search
2018-09-15 06:44:18 +02:00
SomberNight
2a958499b6
fx: disable checking mime type in get_json
...
looking at you, CoinDesk..
2018-09-15 00:30:43 +02:00
SomberNight
f38ec93ae9
qt fx settings: restore selected exchange in combobox if list changes
2018-09-14 23:07:13 +02:00
SomberNight
6ccd83397c
fx: asyncio.Event is not thread-safe; also the 'timeout' field was removed
2018-09-14 23:01:28 +02:00
SomberNight
d1f11f5fe9
fix #4717
2018-09-14 16:12:47 +02:00
Filip Gospodinov
f05f3b430a
build-wine: fix locale path
...
`$i` already contains `locale/`.
2018-09-14 14:37:14 +02:00
Filip Gospodinov
bdecef0eaf
contrib: bump pyinstaller to 3.4
...
PyInstaller 3.4 highlights:
* patch for deterministic builds by electrum
* improved support for Qt5-based applications
* added support for Python 3.7
2018-09-14 14:29:19 +02:00
SomberNight
2bd5e0f25d
packaging: check in make_tgz if packages folder exists
...
related: #4714
2018-09-13 23:29:44 +02:00
SomberNight
2e61359d50
network: stop pending connections when stopping network
2018-09-13 21:20:55 +02:00
SomberNight
23f56ffa8a
network: avoid infinite reconnect loop to same server
2018-09-13 21:02:37 +02:00
SomberNight
e4bd445a38
network.new_interface: clarify how timed out interfaces are closed
2018-09-13 20:50:32 +02:00
SomberNight
64ab8222f7
interface: if request times out, no need to dump trace
2018-09-13 20:17:58 +02:00
SomberNight
819044221b
verifier: need to wait for reorg
...
fixes race between verifier and block header download.
scenario: client starts, connects to server. while client was offline,
there was a reorg. txn A was not mined in the old chain, but is mined
after reorg. client subscribes to addresses and starts downloading headers,
concurrently. server tells client txn A is mined at height H >= reorg height.
client sees it has block header at height H, asks for SPV proof for txn A.
but the header the client has is still the old one, the verifier was faster
than the block header download (race...). client receives proof. proof is
incorrect for old header. client disconnects.
2018-09-13 19:00:21 +02:00
SomberNight
78e9152723
network: get_servers to always include recent servers
2018-09-13 16:06:41 +02:00
SomberNight
43664d5f11
fixes for stdio/text gui
2018-09-13 15:11:28 +02:00
SomberNight
1f14894c43
network: add server to recent_servers only after checks
2018-09-13 03:45:21 +02:00
SomberNight
a9fcf2fabf
bump min aiorpcx to 0.8.1
2018-09-13 01:21:53 +02:00
SomberNight
c93d137c5e
interface: minor clean-up split out _set_proxy from init
2018-09-13 01:20:20 +02:00
SomberNight
c40468a8d3
interface: disable bw rate limiting done by aiorpcx
2018-09-12 22:58:36 +02:00
SomberNight
2e18e3c62b
adapt to aiorpcx 0.8.1: rm report_crash kwarg from group.spawn
2018-09-12 22:09:59 +02:00
SomberNight
a3fb865db0
follow-up prev
...
this is already running inside interface.group
2018-09-12 21:22:46 +02:00
SomberNight
6452582a17
network: batch requests in request_server_info
2018-09-12 21:18:08 +02:00
SomberNight
e7fa42ce3e
wallet: don't write to disk when switching servers
2018-09-12 20:25:13 +02:00
SomberNight
cad4fb80c1
interface: throttle messages
2018-09-12 20:17:12 +02:00
SomberNight
47a97279af
rename CustomTaskGroup to SilentTaskGroup
2018-09-12 19:24:58 +02:00
SomberNight
2039c07a2d
interface.mark_ready: handle cancellation
2018-09-12 18:45:15 +02:00
SomberNight
1419a5c60d
interface: change how GracefulDisconnect is handled
2018-09-12 18:43:50 +02:00
SomberNight
6f7a065081
bump aiorpcx version
2018-09-12 18:43:07 +02:00
SomberNight
3842205b8a
keystore: add note regarding xpubkeys
2018-09-12 18:22:34 +02:00
SomberNight
152c6abb86
network: fix another race in session.subscribe
...
key in session.subscriptions does not imply key in session.cache
2018-09-12 16:58:15 +02:00
SomberNight
9505a203d8
util: rm dead network code
2018-09-12 16:57:12 +02:00
ThomasV
15b21abc99
fix fee_histogram notifications
2018-09-12 12:56:51 +02:00
ThomasV
ce4608ae76
add help text to bump fee dialog
2018-09-12 12:18:27 +02:00
SomberNight
8cd08cc0fa
network: rm dead code; simplify
2018-09-12 01:40:54 +02:00
SomberNight
ab3c3c5ed7
interface: small clean-up
2018-09-11 22:16:30 +02:00
SomberNight
a5b3f809ce
blockchain.py: add type annotations
2018-09-11 22:14:57 +02:00
SomberNight
014c0d3a41
network: update UI when downloading chunks
2018-09-11 21:44:17 +02:00
SomberNight
518c6280e9
interface: minor clean-up re timeouts
2018-09-11 21:23:37 +02:00
SomberNight
6b9a83ae80
don't test with python 3.5
...
also, typing is no longer needed (part of stdlib from 3.5)
2018-09-11 21:10:47 +02:00
SomberNight
bed35a65c7
bump min python to 3.6
2018-09-11 21:04:36 +02:00
SomberNight
9ffd2de492
Merge branch 'aiorpcx'
2018-09-11 20:52:58 +02:00
SomberNight
ecc296cf67
fix race in session.subscribe
2018-09-11 20:39:16 +02:00
SomberNight
8b8ca14c6d
move get_index from network to session
2018-09-11 20:37:53 +02:00
SomberNight
e829d6bbcf
wallet: put Sync and Verifier in their own TaskGroup, and that into interface.group
2018-09-11 20:24:01 +02:00
SomberNight
19d4bd4837
simplify prev
2018-09-11 18:28:59 +02:00
SomberNight
4e0d179937
rate limit txn notifications in qt
2018-09-11 18:13:52 +02:00
Janus
09dfb0fd1d
fix off-by-one error when syncing from genesis w/o checkpoints
2018-09-11 17:16:37 +02:00
ThomasV
3b6af914e1
add multiplexing capability to NotificationSession, simplify interface
2018-09-11 17:06:41 +02:00
SomberNight
1728dff576
fix prev: that's not how you use the context manager...
2018-09-11 12:25:57 +02:00
SomberNight
557334aa36
interface: introduce tip_lock
2018-09-11 11:44:49 +02:00
SomberNight
20957ac4d9
follow-up prev
2018-09-11 02:43:54 +02:00
Calin Culianu
a4396f4f13
Fixed potential bug when clicking in History List on slow wallet synch
2018-09-11 02:38:57 +02:00
SomberNight
19e244a85e
interface: rm unnecessary writes to self.tip
2018-09-10 19:47:36 +02:00
SomberNight
54cc822227
network: send out 'interfaces' event on new_interface
...
network dialog was not always showing up-to-date data
2018-09-10 19:03:06 +02:00
SomberNight
e2338581eb
broadcast_transaction: introduce async variant
2018-09-10 18:39:10 +02:00
SomberNight
b279d351d8
interface.session: add default timeout to send_request
2018-09-10 17:12:05 +02:00
SomberNight
fffec71fb3
kivy fx: make sure displayed fiat values get updated
2018-09-10 16:43:04 +02:00
SomberNight
3e3d387161
fix kivy: follow-up 3d424077fd
2018-09-10 15:18:11 +02:00
ThomasV
061231494d
revert rm requests
2018-09-10 13:26:50 +02:00
ThomasV
e8f87d2e62
remove requests and pysocks from requirements
2018-09-10 13:06:48 +02:00
SomberNight
526319630e
network: minor fix in switch_to_interface
2018-09-10 02:30:27 +02:00
SomberNight
999ae1f713
test_mnemonic: add foreign lang tests
2018-09-10 02:03:42 +02:00
SomberNight
6b2509b106
interface.run: catch OSError instead of subtypes
2018-09-10 01:09:35 +02:00
SomberNight
b2547601a5
rm dead code
2018-09-10 01:08:51 +02:00
SomberNight
97ea4679a7
network: fix monkey-patching in set_proxy
2018-09-10 01:08:28 +02:00
SomberNight
3d424077fd
introduce NetworkParameters namedtuple
2018-09-10 00:59:53 +02:00
SomberNight
ecf4ea9ba7
move (de)serialize_server to interface; and use it
2018-09-09 23:08:44 +02:00
SomberNight
b381a7fdbf
follow-up prev
2018-09-09 22:02:42 +02:00
SomberNight
48a5b8527a
split up interface.run
2018-09-09 21:16:48 +02:00
SomberNight
096b3e6026
network.maintain_sessions: rm redundant 'update' notifications
2018-09-09 05:32:07 +02:00
SomberNight
e3fb991b1b
clean-up network start/stop a bit
2018-09-09 05:05:08 +02:00
SomberNight
cdca74aa39
move max_checkpoint from network to constants
2018-09-09 05:00:09 +02:00
SomberNight
2f224819ac
interface: small clean-up
2018-09-09 01:15:06 +02:00
SomberNight
57cac47944
fix synchronizer: ask for missing txns on start
...
Previously it could happen that a wallet was fully synced,
except it had missing transactions, and it would not recover from this state.
2018-09-08 22:44:14 +02:00
SomberNight
86733279f6
docker-wine: update package versions
...
the previous version is no longer available. hopefully these versions are "lts"
ref: 6899ca2527
2018-09-08 19:57:20 +02:00
SomberNight
c5bedbd3ef
wallet: only do fiat history computations if specifically enabled
2018-09-08 19:38:38 +02:00
SomberNight
77d86f074f
verifier: don't try to request same chunk multiple times
2018-09-08 19:11:02 +02:00
SomberNight
b33b2c0945
synchronizer: more batching
2018-09-08 18:38:58 +02:00
SomberNight
c49e563881
verifier: if we fail to verify SPV proof, disconnect from server
2018-09-08 18:10:21 +02:00
SomberNight
4a88ca1a3a
fix --offline option for fx and trustedcoin
2018-09-08 17:56:29 +02:00
SomberNight
86bc59cd60
update mainnet block header checkpoints
2018-09-08 17:32:28 +02:00
Dzhelil Rufat
c9ffffc526
Remove unneccessary imports from the unit testing directory. ( #4699 )
2018-09-08 17:24:23 +02:00
SomberNight
57e66324cb
batch fee estimates
2018-09-08 15:36:16 +02:00
SomberNight
ddee03d324
interface.run: catch more exceptions
2018-09-08 02:15:51 +02:00
SomberNight
136df7e5ee
wallet: recreate Synchronizer and Verifier when switching servers
...
not that nice but solves races
2018-09-08 01:34:33 +02:00
SomberNight
32528d6aa6
rm dupe code
2018-09-08 01:10:41 +02:00
SomberNight
64a03c245c
small timeout change
...
(re KeyError: can happen after proxy settings change)
2018-09-08 00:25:38 +02:00
SomberNight
7500b1fbee
detect lost connection
...
supersedes #4697
2018-09-07 20:26:45 +02:00
SomberNight
56c3c76d8b
follow-up 26172686b8
2018-09-07 19:54:26 +02:00
SomberNight
fd40dee337
make sure to retry nodes for network
2018-09-07 19:35:35 +02:00
SomberNight
26172686b8
restructure synchronizer/verifier <--> interface coupling
2018-09-07 19:34:28 +02:00
SomberNight
1fa07c920c
network: restore previous API for broadcast_transaction
2018-09-07 17:07:15 +02:00
Janus
52b877ac3d
network: add singleton accessor classmethod, port trustedcoin to aiohttp
2018-09-07 11:35:16 +02:00
ThomasV
8f4b57f718
run freeze_packages
2018-09-06 18:49:37 +02:00
Janus
617103bb2a
labels: fix saving single label
2018-09-06 18:30:24 +02:00
SomberNight
dc51e82f54
fx: don't dump trace if getting rates fails
2018-09-06 18:25:23 +02:00
Johann Bauer
e5cd2ed52f
Goldcard: Change spelling mistake
2018-09-06 18:15:44 +02:00
ThomasV
96fb75ffc6
Merge pull request #4685 from toxeus/locale
...
build-wine: avoid untracked changes in submodule
2018-09-06 17:59:25 +02:00
SomberNight
8467f95a28
rm @profiler from Transaction.estimated_size
...
in certain situations, estimated_size is called hundreds of times, flooding the log
2018-09-06 17:51:13 +02:00
ThomasV
8fe066707a
rm import
2018-09-06 17:47:10 +02:00
SomberNight
77aefdfe71
gitignore: add kivy atlas
2018-09-06 17:46:50 +02:00
Janus
573760daf0
remove generated kivy theming
2018-09-06 17:25:11 +02:00
ThomasV
73bf7a92a2
Merge pull request #4690 from spesmilo/aiorpcx-fx
...
asyncio: port exchange_rate and labels to aiohttp
2018-09-06 17:18:55 +02:00
Janus
be50394f11
aiorpcx: increase crash reporter timeout, avoid is_running in kivy
2018-09-06 17:18:26 +02:00
SomberNight
0ad504bdf0
interface: catch many common exceptions explicitly
2018-09-06 16:45:43 +02:00
Janus
6e80ba7b4f
asyncio: labels, crash_reporter, fx: migrate requests use to aiohttp
2018-09-06 16:18:45 +02:00
ThomasV
5ef04a039b
move NotificationSession
2018-09-06 15:53:41 +02:00
ThomasV
234273809a
set interface.session before marking as ready
2018-09-06 15:44:11 +02:00
SomberNight
0142e0fa22
fix 'daemon load_wallet' over RPC for python > 3.5.3
...
related: #3764
2018-09-06 15:14:35 +02:00
Janus
d367199553
async block headers: remove BlockHeaderInterface and Conn classes, make self.height a local
2018-09-06 14:17:45 +02:00
Janus
9c363db440
async block headers: avoid duplicate tip fields, handle electrumx server skipping blocks
2018-09-06 14:17:44 +02:00
SomberNight
4d95452ae7
wallet: partial fix for race in on_default_server_changed
2018-09-06 14:17:44 +02:00
SomberNight
2187615c08
verifier: request proofs in batches
2018-09-06 14:17:43 +02:00
Janus
c89020725b
address synchronizer: fetch initial addresses from wallet
2018-09-06 14:17:43 +02:00
SomberNight
14a032a0b1
disconnect from servers on exception
2018-09-06 14:17:42 +02:00
SomberNight
3f0d79f07d
blockchain.py: better handling of missing headers. more restrictive verify_chunk.
2018-09-06 14:17:42 +02:00
SomberNight
2157eae499
fix request_chunk
2018-09-06 14:17:41 +02:00
Janus
e9ceeb85af
async block headers
2018-09-06 14:17:41 +02:00
Janus
19387ff911
aiorpcx: simplify open_session
2018-09-06 14:17:39 +02:00
Janus
f12074397f
aiorpcx: reintroduce periodic fee updates
2018-09-06 14:17:39 +02:00
SomberNight
a4ffa0b22a
interface: clean-up proxy username/pw handling
2018-09-06 14:17:38 +02:00
SomberNight
6700364ac8
interface: fix cert handling
...
notably os.unlink cannot be inside the "with open"
2018-09-06 14:17:38 +02:00
Janus
9543a108be
aiorpcx: revive some maintain_sockets code, reintroduce NODES_RETRY_INTERVAL and SERVER_RETRY_INTERVAL usage, and fix --oneserver
2018-09-06 14:17:37 +02:00
ThomasV
5117a520ae
fix start_network
2018-09-06 14:17:37 +02:00
Janus
9bfb5fe71f
address synchronizer: use aiorpcx session object in network's interface,
...
request, fees
2018-09-06 14:17:36 +02:00
Janus
8f36c9167d
aiorpcx: remove callback based code, add session to Interface
2018-09-06 14:17:29 +02:00
Janus
b120584f97
aiorpcx address synchronizer
2018-09-06 14:11:36 +02:00
Janus
f733cb8947
aiorpcx: socks support
2018-09-06 14:11:36 +02:00
ThomasV
c53caecd1e
fix else statement
2018-09-06 14:11:35 +02:00
Janus
89a01a6463
aiorpcx: pin certificates
2018-09-06 14:11:35 +02:00
Janus
8080a713b2
aiorpcx: pass ssl context, sleep after connecting
2018-09-06 14:11:34 +02:00
Janus
97ea0fc439
aiorpcx: replace network loop with asyncio and try to maintain ten sessions
2018-09-06 14:11:20 +02:00
SomberNight
40ceabff79
rm redundant function from util
2018-09-05 18:36:13 +02:00
SomberNight
69a204d726
fix #4657
2018-09-05 18:30:53 +02:00
SomberNight
44fbd8330b
update gitignore
2018-09-05 18:07:24 +02:00
SomberNight
ecbbfdd10c
rerun freeze packages
2018-09-05 15:58:39 +02:00
ThomasV
951fd8a47f
bump apk version number
2018-09-05 15:33:31 +02:00
SomberNight
1e3c3a528c
attempt at fixing wallet syncing crash
...
fix #3998
fix #4689
2018-09-05 15:22:57 +02:00
Janus
73e367dc3b
wallet: don't cache NaN coin price
...
if NaN coin price is cached, historial acquisition prices are not shown
correctly since the historial prices are requested after the full
history is initially shown. As such, "No data" will be shown, even
though the user required using historical pricing.
2018-09-05 14:38:43 +02:00
Calin Culianu
0da1e904fe
macOS: Add missing URI handler( #4557 )
...
Backport from Electron Cash -- fix missing bitcoin: URI types form macOS Info.plist
2018-09-04 22:38:38 +02:00
Filip Gospodinov
6c7bfe613f
contrib: remove git describe workaround ( #4683 )
...
`git describe` fails if no tag can be found, leading
to the whole build script to fail. This is not always
desired. To prevent `git describe` from failing in
this case the `--always` flag can be passed which
causes a short commit hash to be output when a tag
is not present.
2018-09-04 22:32:46 +02:00
SomberNight
e9f1888321
include plugins in win/mac binaries
2018-09-04 17:06:42 +02:00
Filip Gospodinov
9220545e60
build-wine: avoid untracked changes in submodule
...
The locale output file can simply be output in the folder
where it's actually needed. This also saves a recursive copy.
This makes `.gitignore` in the electrum-locale submodule
obsolete.
2018-09-04 16:53:53 +02:00
SomberNight
1ec71cbaca
follow-up prev
...
fix #4078
2018-09-04 16:42:08 +02:00
SomberNight
7d84409628
fix #4078
2018-09-04 16:31:35 +02:00
SomberNight
bc35c82619
update submodules
2018-09-04 13:38:49 +02:00
ThomasV
28c49d2c48
update submodules
2018-09-03 15:39:45 +02:00
ThomasV
56e7ba41c4
prepare release 3.2.3 and release notes
2018-09-03 14:57:29 +02:00
SomberNight
1bb1fc37f4
network: don't ask for block -1 if server is on wrong chain
2018-08-30 19:25:42 +02:00
Filip Gospodinov
c42f0dac53
test_bitcoin: fix decorators for running tests twice ( #4669 )
...
This bug is triggered if ecc_fast._libsecp256k1 and/or
crypto.AES are not present.
Before, if the first test would have raised an exception
it would have been implicitly caught by returning from
the finally block and hence this effectively masks the
test's outcome. Now, the exception is properly propagated
causing the test to fail if an exception is raised.
2018-08-30 18:53:14 +02:00
SomberNight
6ee689345f
fix -v syntax
...
After the introduction of arguments for -v, it would sometimes incorrectly consume the CLI cmd as its argument.
This change keeps the old "-v" syntax working, at the cost of having to provide the arguments without a whitespace directly after -v (and the args need to be single letters).
2018-08-30 18:37:03 +02:00
RGauthamRam
aac7a34405
Update __init__.py ( #4668 )
...
Resolving the issue #4363
2018-08-30 16:35:01 +02:00
ghost43
c99007bda7
setup.py: add 'gui' extra. potentially build Qt icons files ( #4647 )
2018-08-30 16:16:14 +02:00
SomberNight
1b19cdd0f4
transaction.py: fix script_GetOp for malformed scripts
...
related fyookball/electrum#829
2018-08-28 20:17:21 +02:00
SomberNight
0137626a63
wallet restore: remove dead code. add log lines.
2018-08-28 18:20:35 +02:00
ThomasV
c25baf3dd7
Merge pull request #4659 from spesmilo/22nd_century_certs
...
x509: handle dates in the 22nd century
2018-08-27 16:13:38 +02:00
Janus
262d431ff5
x509: handle dates in the 22nd century
2018-08-24 14:56:58 +02:00
SomberNight
91c369e392
hw wallets: generalise 'minimum_library' for those that provide a version number
2018-08-23 18:31:14 +02:00
ghost43
9279f30363
Merge pull request #4470 from Coldcard/ckcc
...
Support for new hardware wallet: Coldcard
2018-08-23 16:51:52 +02:00
tiagotrs
2a5f108d4a
change prng, add warning against encrypting multiple secrets ( #4649 )
...
* substitute python prng generator with hmac_drbg
* add warning, change version
* brick cards version 0
* separate python-drbg module, include tests and license
* import to match PEP 8
* fix line break, minor changes in wording
* fixes noise_seed formatting errors
* fix import, include license exclude tests drbg module
2018-08-22 22:25:12 +02:00
SomberNight
04c1b522d6
minor fixes for prev
...
use TxOutputHwInfo namedtuple
warn user if device is set to wrong chain
undo parts of prev re testnet. fix p2wpkh.
testnet support. and minor stuff
2018-08-22 21:52:28 +02:00
Peter D. Gray
0bcea80bdf
Support for new hardware wallet: Coldcard
...
build-wine/deterministic.spec: add Coldcard plugin and ckcc-protocol dependancy
Require version 0.7.2 of ckcc-protocol (window fixes)
Rework import paths to new standards
Updated icons
New minimum version, for latest PSBT constants
Upgrade to final PSBT (BIP 174) standard encoding
Remove log noise
Show bootloader version number as well
Handle case where libraries are missing better
Remove noise about missing packages, for rest of world
Add reference to ckcc-protocol module/data
Remove dead code
Beef up the README more
Slightly better looking
Add version numbers and upgrade firmware feature
Split out DFU support into own file
First pass at adding Coinkite Coldcard hardware wallet to Electrum
2018-08-22 21:43:03 +02:00
SomberNight
bc6010303a
fix #4651
2018-08-22 17:05:48 +02:00
SomberNight
7044f1145f
ecc_fast: clarify fallback message
2018-08-17 16:01:03 +02:00
ghost43
941df4153b
wallet: try to plug gap limit for change addresses ( #4530 )
2018-08-15 14:33:12 +02:00
SomberNight
f3f5b8a5d6
fix #4312
2018-08-15 13:43:19 +02:00
SomberNight
db834800c0
wine-build: clarify to use docker for reproducible builds. move parts of readme.
2018-08-15 13:22:24 +02:00
SomberNight
3089edd3a2
wallet: remove method get_num_tx
2018-08-14 21:54:11 +02:00
SomberNight
f7166e95c4
wallet: move get_depending_transactions to AddressSynchronizer
...
and resolve TODO
2018-08-14 21:53:05 +02:00
SomberNight
b7178f2d21
coinchooser: small clean-up (use TxOutput.value)
2018-08-14 21:50:59 +02:00
SomberNight
88fc62e8f7
fix #4626
2018-08-14 19:38:19 +02:00
SomberNight
5f3408dd70
transaction.py: introduce TxOutputHwInfo namedtuple
2018-08-14 19:15:15 +02:00
SomberNight
b4b1de088a
move TrezorClient.expand_path to bitcoin.py
...
and allow its input to end with a '/' slash
2018-08-14 18:19:16 +02:00
SomberNight
52a4810752
trezor: add "show address" option in addresses tab context menu for all trezors
...
in case of a multisig wallet, with multiple trezors, previously only one of the trezors could be used
2018-08-14 15:02:31 +02:00
SomberNight
93578d9be2
wallet: is_mine should not depend on history keys
...
this makes clear_history work
2018-08-14 14:59:55 +02:00
SomberNight
820316e745
safe_t: disable udp transport as it was interfering with trezor emulator
2018-08-14 13:33:32 +02:00
ThomasV
e7ef4aa4f6
Merge pull request #4611 from tiagotrs/master
...
fix Revealer hidpi related bug #4576 , and make PNGs the same size
2018-08-13 11:21:08 +02:00
Johann Bauer
deee29228e
Travis: Use 3.7 to run tests too
2018-08-09 20:42:48 +02:00
tiagotrs
576c2718c8
Merge branch 'master' of https://github.com/spesmilo/electrum
2018-08-07 16:38:06 +02:00
tiagotrs
91bcc5f560
fix problems with hidpi monitors issue #4576 , ensure PNGS are precise the same size.
2018-08-07 16:33:58 +02:00
zebra-lucky
059a4fff5c
fix ecc_fast.py for win64 ( #4606 )
2018-08-05 22:30:58 +02:00
SomberNight
a7cfa56621
cosigner pool: don't block gui
2018-08-03 20:53:56 +02:00
SomberNight
9228cb5b8e
wallet: override get_addresses in Imported_Wallet so that clear_history works
2018-08-03 19:56:35 +02:00
SomberNight
2a9f5db576
blockchain.py: fix: chunks in checkpoint region were not getting saved if we were on a fork
2018-08-03 19:06:23 +02:00
SomberNight
531cdeffa9
blockchain.py: rename 'checkpoint' to 'forkpoint'
2018-08-03 18:25:53 +02:00
SomberNight
7307c800d7
small optimisations for history tab refresh (and related)
2018-08-03 16:12:41 +02:00
SomberNight
6b42e8448c
address_synchronizer: cache local_height in some cases
2018-08-03 16:10:36 +02:00
SomberNight
cf14d7b346
wallet: change meaning of is_used
2018-08-03 16:02:37 +02:00
SomberNight
6192bfce46
util.profiler: prepend class name to prints
2018-08-02 15:38:01 +02:00
ThomasV
194ee395e7
Merge pull request #4596 from SomberNight/txoutput_namedtuple
...
transaction: introduce TxOutput namedtuple
2018-08-02 12:49:51 +02:00
SomberNight
2eb72d496f
transaction: introduce TxOutput namedtuple
2018-08-01 19:10:08 +02:00
SomberNight
f64062b6f1
add --noonion option to filter out onion servers
...
closes #4531
2018-07-31 20:25:53 +02:00
ghost43
32f5feff8f
Merge pull request #4538 from SomberNight/verifier_reorgs_st18
...
verifier: better handle reorgs (and storage upgrade)
2018-07-31 19:37:46 +02:00
SomberNight
a29e2218c8
wallet: introduce namedtuples TxMinedStatus and VerifiedTxInfo
2018-07-31 17:10:15 +02:00
SomberNight
41e088693d
verifier: better handle reorgs (and storage upgrade)
2018-07-31 15:51:05 +02:00
SomberNight
861640949e
kivy: on tx broadcast, truncate error message
...
related #4593
2018-07-31 14:03:08 +02:00
SomberNight
c9c8b7656d
follow-up prev. sanity check OP_RETURN outputs
...
based on 86c63a3a08
2018-07-31 13:03:34 +02:00
SomberNight
e1b2195cf7
fix #4591 : pay to OP_RETURN on trezor
2018-07-31 12:30:43 +02:00
SomberNight
629b9cb3b5
fee estimation: split eta_to_fee into two methods
2018-07-30 19:15:05 +02:00
SomberNight
8e69174374
logging: self.print_error should not print without -v flag
2018-07-29 04:29:19 +02:00
SomberNight
eaf72aa951
network: handle one-block-long fork
...
also add fixme about incorrect behaviour in case of a fork height higher than our local chain tip
2018-07-29 04:00:02 +02:00
ghost43
0d05b84dc3
network: handle reorg (sooner) in case of multiple forks at given height ( #4537 )
2018-07-29 03:56:10 +02:00
Jean-Christophe Rona
02c30e3d52
Add support for Archos Safe-T mini hardware wallet ( #4445 )
...
commit 10c46477f3a6f2fbc0596345511e0994253081eb
Author: SomberNight <somber.night@protonmail.com>
Date: Wed Jul 25 19:40:05 2018 +0200
backport changes of trezor plugin
commit 213619e880f709188c1ea6272758896748e681a8
Merge: a855b75b6 6899ca252
Author: Jean-Christophe Rona <jc@rona.fr>
Date: Wed Jul 25 18:45:19 2018 +0200
Merge branch 'master' into safe-t-mini
commit a855b75b6f5af5f707c4680d0bac79eb66a85ace
Author: Jean-Christophe Rona <rona@archos.com>
Date: Wed Jul 25 18:37:12 2018 +0200
Safe-T: Switch to safet 0.1.3 to remove the rlp dependency
commit 9bee44ca33289158c91c03d47dec45de6577f17b
Author: SomberNight <somber.night@protonmail.com>
Date: Wed Jul 18 14:01:10 2018 +0200
safe-t: bump min fw to 1.0.5
older fw has a bug when restoring from seed
commit 01816607e8ba308cb5cff96b5fb844e4f6b8fcc1
Author: SomberNight <somber.night@protonmail.com>
Date: Wed Jul 18 13:57:17 2018 +0200
safe-t: fix rlp version to avoid eth stuff
commit 430206bea1fa10b762ff953fbc7652ce0d0e939d
Merge: a999ae266 b4b862b0c
Author: SomberNight <somber.night@protonmail.com>
Date: Wed Jul 18 13:29:41 2018 +0200
Merge branch 'master' into pr/4445
commit a999ae266f499f180946d53d4e860cc871d562ab
Author: Jean-Christophe Rona <rona@archos.com>
Date: Tue Jun 19 14:18:03 2018 +0200
Safe-T mini: Remove supported coins
This is not really useful there.
commit 7922df1031b2c4b132f7f9c90232480b5bf9585c
Author: Jean-Christophe Rona <rona@archos.com>
Date: Tue May 29 16:43:37 2018 +0200
Safe-T mini: Add support for the Safe-T mini
2018-07-25 20:11:04 +02:00
SomberNight
6899ca2527
docker-wine: update a package version
...
the previous version is no longer available. this suggests that it's difficult to reproduce old builds.
not sure about long term solution.
2018-07-24 20:23:33 +02:00
SomberNight
a799a00dc5
fix #4577
2018-07-24 18:57:49 +02:00
SomberNight
579d48cf0c
follow-up a830747f83
...
on_history expects fewer arguments than what the fee_histogram callback gives
2018-07-24 18:25:22 +02:00
SomberNight
61aa19539c
some packaging clean-up
2018-07-24 17:32:18 +02:00
SomberNight
53130da682
storage: factor out 'JsonDB'
2018-07-23 19:59:10 +02:00
SomberNight
d2abaf54e8
verifier: small refactor
2018-07-23 19:59:05 +02:00
SomberNight
89aa9eb0a7
revealer: minor fix and clean-up
2018-07-22 19:40:10 +02:00
SomberNight
a830747f83
kivy: update history screen on fee histogram
...
related: #4573
2018-07-21 23:23:25 +02:00
SomberNight
4284f4feb3
fix #4575
2018-07-21 23:09:46 +02:00
SomberNight
f8e13c5c33
kivy: use correct i18n
2018-07-21 16:15:45 +02:00
SomberNight
281805a0a4
linux sdist: 'typing' was not included, which is needed on py3.4
...
not making typing conditioned on py version as then freeze_packages would not pick it up.
2018-07-20 16:38:18 +02:00
SomberNight
f7dce426cb
fix #4574
2018-07-19 19:52:06 +02:00
SomberNight
597295e359
address_synchronizer fixes
...
is_mine: wallet expects get_address_index to work
imported wallets: history did not include addr keys after creation
deterministic wallets: get_addresses() should be sorted in derivation order
2018-07-19 18:16:23 +02:00
SomberNight
801d3113ab
wine build: remove pgp.mit.edu from keyservers
...
sometimes slow, and does not return all the pubkeys asked for (so build fails)
2018-07-19 14:53:04 +02:00
SomberNight
cb6bde49b4
fix some wine build failures on branches/forks
2018-07-19 14:36:30 +02:00
SomberNight
0100af9389
fix #4572
2018-07-19 13:59:38 +02:00
SomberNight
01193be241
logging: when not giving args to -v, log everything, as before
2018-07-19 13:55:05 +02:00
SomberNight
cc77ba523f
fix minor undefined stuff in address_synchronizer
2018-07-19 13:47:49 +02:00
Janus
1fb0b6d7bd
plugins/ledger: just hardcode BTCHIP_DEBUG to False
2018-07-19 13:33:57 +02:00
Janus
f9f6ea4365
commands: tolerate lack of argument to 'verbosity'
2018-07-19 12:43:53 +02:00
ThomasV
b96b5af101
fix imports
2018-07-19 10:25:46 +02:00
ThomasV
0025073b24
move more methods from wallet to address_synchronizer
2018-07-19 10:15:22 +02:00
Janus
780b2d067c
Whitelist classes in verbose (-v) option
2018-07-19 01:21:33 +02:00
SomberNight
8f17f38b02
trezor/kk: when using old fw, wizard did not display instructions properly
2018-07-18 20:17:03 +02:00
ThomasV
0186f09c27
Merge pull request #4567 from SomberNight/issue_4566
...
bip39 passphrases with multiple spaces
2018-07-18 18:54:59 +02:00
SomberNight
aa86440866
fix #4566 : bip39 passphrases with multiple spaces
2018-07-18 18:42:04 +02:00
Yura Pakhuchiy
27b36486df
Trezor: fix spending coinbase outputs ( #4565 )
...
Attempt to spend coinbase output results in error:
a bytes-like object is required, not 'str'
2018-07-18 17:39:32 +02:00
SomberNight
e5661156f0
follow-up e3888752d6
2018-07-18 15:32:26 +02:00
ThomasV
bdb8220a1a
Merge pull request #4563 from spesmilo/remove_pbkdf2
...
remove pbkdf2 dependency, use stdlib instead
2018-07-18 14:49:36 +02:00
Janus
1e715113ab
remove pbkdf2 dependency, use stdlib instead
2018-07-18 14:34:59 +02:00
tiagotrs
b4b862b0cc
add warning that seed extension will not be included in the backup ( #4555 )
2018-07-18 13:15:31 +02:00
ThomasV
e3888752d6
separate address synchronizer from wallet
2018-07-18 11:18:57 +02:00
ghost43
69dc762a5a
Merge pull request #4560 from marceloneil/fix/electrum/localization
...
localization: fix download link + badge
2018-07-18 10:52:58 +02:00
Marcel O'Neil
21204fc552
localization: fix download link + badge
2018-07-17 22:09:04 -04:00
ThomasV
4b74f9c7fb
Merge pull request #4553 from marceloneil/fix/electrum/tests-in-coverage
...
Remove test files from coverage
2018-07-16 07:22:31 +02:00
Marcel O'Neil
c856633b9c
remove test files from coverage
2018-07-16 00:58:41 -04:00
Johann Bauer
cf7caa7ef9
Don't measure coverage for files in gui or plugins
2018-07-15 19:25:28 +02:00
ThomasV
8ba70ee0e4
Merge pull request #4524 from toxeus/docker
...
build-wine: allow local testing
2018-07-15 11:21:32 +02:00
ThomasV
88eb2390e6
Merge branch 'master' into docker
2018-07-15 11:13:51 +02:00
SomberNight
8bb59fcc3c
follow-up prev: fix bug in fee_to_depth, and typo and tests
2018-07-14 19:02:41 +02:00
SomberNight
b8ab36546d
mempool fees: increase estimate by max precision of histogram
...
related: #4551
2018-07-14 18:45:02 +02:00
ThomasV
f8ee203225
rm deprecated info about apk version
2018-07-13 18:57:04 +02:00
SomberNight
b44aca1654
network: disconnect from server on incorrect header length
...
fix #4522
2018-07-13 18:11:48 +02:00
Janus
87f6aa09df
log failure to import plugins or plot module
2018-07-13 15:24:16 +02:00
Janus Troelsen
b29c2a0abd
Correct path to kivy Readme.md
2018-07-13 15:08:00 +02:00
ThomasV
77940148fa
fix paths in buildozer/makefile
2018-07-13 14:45:08 +02:00
Janus
1cc1c8a051
restructuring: add missing import
2018-07-13 14:19:02 +02:00
Janus
097ac144d9
file reorganization with top-level module
2018-07-13 14:01:37 +02:00
Randy Brito
30a7952cbb
Show fiat options from api.bitcoinvenezuela.com
...
Adding the options to be able to select BitcoinVenezuela.com fiat exchange rates in the Preferences. Certificate validation has been fixed.
2018-07-12 23:47:13 +02:00
SomberNight
5d462f9555
win binaries: bump python version to 3.6.6
2018-07-12 18:33:43 +02:00
SomberNight
e3d8edd0a0
rerun freeze packages
2018-07-12 18:33:43 +02:00
SomberNight
0ddbd2e575
restrict PyQt version to <5.11 for binaries, as 5.11 raises min MacOS version to 10.11
...
see spyder-ide/qtpy#155
2018-07-12 18:33:42 +02:00
ThomasV
94dc214982
Merge pull request #4541 from haarts/preliminaries
...
Preliminaries
2018-07-12 10:12:45 +02:00
Harm Aarts
3f4687d3e4
Improve logging
2018-07-12 09:51:31 +02:00
Harm Aarts
73896bad72
Remove unused is_up_to_date network method
2018-07-12 09:51:31 +02:00
Harm Aarts
48356a03e6
Rename 'r' to 'response'
2018-07-12 09:51:31 +02:00
Harm Aarts
b1cd260aa9
Minor linter nits
2018-07-12 09:51:31 +02:00
Harm Aarts
eb44ef327d
Reduce indentation level
...
This makes the method easier to read.
Skip negative tx heights too. A transaction height can be negative too, see the
wallet modules TX_HEIGHT_LOCAL and TX_HEIGHT_UNCONF_PARENT constants.
2018-07-12 09:50:50 +02:00
SomberNight
358722b9cc
fix #4533
2018-07-11 15:25:05 +02:00
Johann Bauer
40a43afa12
Add OXT.me block explorer
...
Closes : #4441
2018-07-10 21:52:06 +02:00
SomberNight
a51940fac0
fix #4529
2018-07-10 18:07:52 +02:00
Janus
04432fe93e
use python3 in scripts shebang, fix #4519
2018-07-10 13:49:51 +02:00
Filip Gospodinov
73fee2fefa
build-wine: allow local testing
...
Before, it was only possible to test commits that are
on Github (pull request or merged). Now, changes can be
tested locally too.
This introduces the risk that a release could be built
containing uncommitted changes which by definition breaks
deterministic builds. Fortunately, this will always be
detected because the version string is created using
`git describe --tags --dirty`.
Also, retire $TARGET variable because it decouples the
build scripts from the commit revision to be built. This
is a problem for deterministic builds.
2018-07-10 13:33:46 +02:00
SomberNight
586aee45eb
fix #4508 : pin down wine deps in docker win build
2018-07-09 17:52:02 +02:00
Filip Gospodinov
dc6fb04ffe
docker: simplify README.md ( #4521 )
2018-07-09 14:50:37 +02:00
SomberNight
7e0b470ca2
regenerate testnet checkpoints
...
old ones were made before 8bcefe6cfa
2018-07-09 14:09:42 +02:00
SomberNight
c6ccdbef90
fix #4503
2018-07-08 02:22:28 +02:00
SomberNight
c33363c1e5
fix #4042
2018-07-07 23:26:00 +02:00
Filip Gospodinov
5fde89b689
Dockerfile: don't suppress error message ( #4509 )
...
The `-qq` flag will suppress helpful output in case
of an error.
2018-07-06 18:26:18 +02:00
Johann Bauer
27fc715182
Revert "Travis: Test with Python 3.7"
...
This reverts commit 9f6373a89e .
2018-07-06 16:06:26 +02:00
Johann Bauer
9f6373a89e
Travis: Test with Python 3.7
2018-07-06 15:46:52 +02:00
SomberNight
f7c8e5a33b
fix #4497
2018-07-04 16:04:04 +02:00
SomberNight
92e510f8aa
synchronizer: remove warning about improperly sorted histories
...
Not sure if it is still useful but in its current form it was giving false positives all the time.
Specifically, the expected sorting is: confirmed txns in blockchain order + mempool txns in arbitrary order.
The "sorted" invocation puts mempool txns at the beginning, so the warning is always triggered if there is any unconfirmed history.
2018-07-03 21:41:40 +02:00
SomberNight
75a85a8161
network: disconnect from server on malformed header subs
...
closes #4478
2018-07-03 17:17:20 +02:00
SomberNight
8b1051fa24
fix #4418
2018-07-03 11:01:29 +02:00
ThomasV
83974cd0a8
Merge pull request #4490 from SomberNight/trustedcoin_color_outputs
...
colour 2fa billing outputs in Qt tx dialog
2018-07-03 08:47:15 +02:00
ThomasV
0ad013f144
Merge pull request #4492 from SomberNight/config_v3_baseunits
...
follow-up re #4491 , do config upgrade to keep base unit settings on kivy
2018-07-03 08:46:05 +02:00
SomberNight
46fd7c3d8b
follow-up re #4491 , do config upgrade to keep base unit settings on kivy
2018-07-02 22:52:20 +02:00
SomberNight
1635c149bd
fix #4491
2018-07-02 22:50:19 +02:00
SomberNight
ceba4af01a
synchronizer: test txid of received tx
2018-07-02 21:38:39 +02:00
SomberNight
eefcc60d98
color 2fa billing outputs in Qt tx dialog
2018-07-02 14:23:14 +02:00
Johann Bauer
9ebeb51153
Send Python version in crash reports
2018-07-02 13:41:34 +02:00
ThomasV
186f9f09b7
sign.sh: rm signed dir
2018-07-02 09:19:02 +02:00