Commit Graph

3841 Commits

Author SHA1 Message Date
ThomasV 5598b04c8b fix regtest/start_bitcoind.sh: createwallet needs to be called 2021-01-16 15:15:38 +01:00
ThomasV 7619949b2f fix #6674: raise exceptions if dscancel or cpfp create dust or negative output. 2021-01-14 19:44:15 +01:00
ThomasV be438bdd60 check_password_for_directory: skip non-files 2021-01-14 14:59:14 +01:00
ThomasV 1e4fa83098 Kivy: use the same password for all wallets
When the app is started, the password is checked against all
wallets in the directory.

If the test passes:
 - subsequent wallet creations will use the same password
 - subsequent password updates will be performed on all wallets
 - wallets that are not storage encrypted will encrypted
   on the next password update (even if they are watching-only)

This behaviour is restricted on Android, with a 'single_password' config variable.
Wallet creation without password is disabled if single_password is set
2021-01-13 12:24:19 +01:00
ThomasV 9406541456 kivy wizard: verify seed extension 2021-01-13 11:18:34 +01:00
ThomasV 620a6aaf99 kivy: fix confirm_seed_dialog (broken in 77e0d3745e) 2021-01-13 11:07:48 +01:00
ThomasV 3cb68b10b9 remove broken payment requests. fixes #6350 2021-01-12 14:57:31 +01:00
ThomasV 66d31305e4 kivy: minor fix (follow-up 94708f63e4) 2021-01-12 12:23:01 +01:00
ThomasV 641968fcf8 Wizard: do not ask seed type, default to segwit
segwit addresses are widely supported today.
2021-01-12 11:03:21 +01:00
ThomasV 94708f63e4 invoices and requests: rm 3 seconds delay 2021-01-12 10:59:41 +01:00
ThomasV a2122a8c19 auto-remove paid invoices from GUI
- delay 3 seconds in GUI
 - kivy remove 'delete' buttons from send/receive screens
2021-01-12 10:59:41 +01:00
ThomasV 90abfda12b add unconfirmed state for onchain invoices and requests 2021-01-12 10:59:11 +01:00
ThomasV d50a8d1b84 Qt: rename incoming/outgoing payments to send/receive queue. fixes #6711 2021-01-12 10:56:05 +01:00
ThomasV b2be29b508 follow-up previous commit (variable name) 2021-01-11 15:51:52 +01:00
ThomasV ad91257729 pass blacklist to lnrouter.find_route, so that lnrouter is stateless (see #6778) 2021-01-11 15:19:50 +01:00
ThomasV 9d7a317404 fix tests (follow-up 3f5c1a0171) 2021-01-11 13:40:41 +01:00
ThomasV 47027b6646 Merge pull request #6476 from brianddk/deserialize_serialize
Correct errors in command 'serialize(deserialize(pbst))'
2021-01-11 13:15:14 +01:00
ThomasV d5c360a958 simplify lnrouter API 2021-01-11 12:49:35 +01:00
ThomasV 805c5a2120 upfront_shutdown_script: rm dead code, fix test 2021-01-11 12:30:49 +01:00
bitromortac bd178fbed5 lnpeer: remove unused imports, code cleanup 2021-01-11 11:37:14 +01:00
bitromortac e555ea650e lnpeer: add unit test for upfront shutdown script 2021-01-11 11:37:14 +01:00
bitromortac 673f89f0d2 scripts: add Lightning feature analysis script 2021-01-11 11:37:14 +01:00
bitromortac 5a72df2bb4 lnrater: suggest nodes compatible with our LN features 2021-01-11 11:37:14 +01:00
bitromortac f7e5c2d3b0 lnworker: enable upfront shutdown script 2021-01-11 11:37:14 +01:00
bitromortac 6b90a2d36c lnpeer: implement upfront shutdown script logic
Upfront shutdown script is a script provided on channel opening,
which will be used by the peer to enforce us closing to this script
on collaborative channel close.
2021-01-11 11:37:14 +01:00
bitromortac e5458bb534 wallet_db: migrate to upfront shutdown scripts 2021-01-11 11:37:14 +01:00
bitromortac cf6e3e4efa lnwire: add upfront shutdown script tlvs 2021-01-11 11:37:14 +01:00
bitromortac 863fe031f0 lnpeer: await on_message handlers to raise exceptions 2021-01-11 11:36:38 +01:00
SomberNight 2eb02931ae hw plugins: log exception at import time (but only if interesting)
related: https://github.com/spesmilo/electrum/issues/6928
2021-01-11 00:05:23 +01:00
ThomasV de903103da pass daemon to Commands instance in qt console. fixes #6926 2021-01-10 11:43:00 +01:00
SomberNight 2ec548dda3 ChannelDB: avoid duplicate (host,port) entries in ChannelDB._addresses
before:
node_id -> set of (host, port, ts)
after:
node_id -> NetAddress -> timestamp

Look at e.g. add_recent_peer; we only want to store
the last connection time, not all of them.
2021-01-09 19:56:05 +01:00
SomberNight 9a803cd1d6 ChannelDB: fix get_last_good_address 2021-01-09 18:41:41 +01:00
Peter D. Gray e829f2a0bc plugins/coldcard/coldcard.py: include derivation path for each part of multisig (for v3.2.1 of firmware) 2021-01-08 13:16:54 -05:00
Peter D. Gray a810bc50be plugins/coldcard/README.md: updates and cleanup 2021-01-08 13:16:13 -05:00
SomberNight d86138a1a5 storage: speed up write() by using faster compression setting
Re total runtime of WalletDB.write() and file size on disk,
for a large encrypted wallet, compare:

before (zlib level=6):
file size 16_670 KB
JsonDB.dump 0.5099 sec
zlib.compress 1.3280 sec
ECPubkey.encrypt_message 0.1720 sec

after change (zlib level=1):
file size 17_527 KB
JsonDB.dump 0.5344 sec
zlib.compress 0.5320 sec
ECPubkey.encrypt_message 0.1837 sec
2021-01-06 21:27:10 +01:00
Malcolm Smith 67ae678137 storage/db: use faster JSON encoder settings when wallet is encrypted
The standard json module has an optimized C encoder, but that doesn't
currently support indentation. So if you request indentation, it falls
back on the slower Python encoder.

Readability doesn't matter for encrypted wallets, so this disables
indentation when the wallet is encrypted.

-----

based on https://github.com/Electron-Cash/Electron-Cash/commit/b2399b6a3e3e39ddd82ffc432bb1ca07f2aab454

For a large encrypted wallet, compare:
before change:
JsonDB.dump 1.3153 sec
zlib.compress 1.281 sec
ECPubkey.encrypt_message 0.1744 sec

after change:
JsonDB.dump 0.5059 sec
zlib.compress 1.3120 sec
ECPubkey.encrypt_message 0.1630 sec

Co-authored-by: SomberNight <somber.night@protonmail.com>
2021-01-06 21:14:56 +01:00
SomberNight 13c45bd798 qt send tab: mention frozen balance if "not enough funds" in more cases
fixes #6912
2021-01-06 03:05:13 +01:00
SomberNight 4b5616ff14 qt BlockingWaitingDialog: try harder to get label drawn (refresh bug) 2021-01-06 02:29:59 +01:00
SomberNight 85f76523b6 qt tx dialog: use WaitingDialog for network requests in __init__ 2021-01-06 02:27:17 +01:00
SomberNight 422f7ad110 qt tx dialog: fix visual artifact when opening (widget parenting issue) 2021-01-06 02:24:51 +01:00
ThomasV 177766ac37 lnpeer: fix a comment 2021-01-04 12:39:24 +01:00
ThomasV 07b08738a8 kivy wizard: checkum bip39 seeds, because the virtual keyboard imposes the English wordlist 2021-01-02 16:38:05 +01:00
ThomasV b2ab2a9f6a wizard: call on_restore_seed, on_restore_bip39 through self.run. fixes #6895 2021-01-02 14:24:11 +01:00
ThomasV 77e0d3745e fix #4326 2021-01-02 11:48:15 +01:00
ThomasV 7e36770a06 fix #6605 2020-12-31 13:00:24 +01:00
ThomasV eb6eac9254 fix reserve_sat in local_config. see #6896 2020-12-31 08:44:26 +01:00
ThomasV d70431c0e7 lnchannel.available_to_spend: return zero if frozen or not active. Without this, the channel details window displays can_send/can_receive values that are inconsistent with the main window 2020-12-30 11:51:02 +01:00
ThomasV b29cdc02da Require gossip_queries in LNWallet (follow-up f83d2d9fee)
- workaround lnd bug https://github.com/lightningnetwork/lnd/issues/3651
 - also reduces bandwidth usage
2020-12-28 15:41:42 +01:00
ThomasV c478f3bb91 channel backups: fix exception in raised after channel is force closed
Traceback (most recent call last):
  File "/opt/electrum/electrum/util.py", line 1056, in wrapper
    return await func(*args, **kwargs)
  File "/opt/electrum/electrum/lnwatcher.py", line 183, in on_network_update
    await callback()
  File "/opt/electrum/electrum/lnwatcher.py", line 200, in check_onchain_situation
    keep_watching = await self.do_breach_remedy(funding_outpoint, closing_tx, spenders)
  File "/opt/electrum/electrum/lnwatcher.py", line 377, in do_breach_remedy
    sweep_info_dict = chan.sweep_ctx(closing_tx)
  File "/opt/electrum/electrum/lnchannel.py", line 227, in sweep_ctx
    our_sweep_info = self.create_sweeptxs_for_our_ctx(ctx)
  File "/opt/electrum/electrum/lnchannel.py", line 216, in create_sweeptxs_for_our_ctx
    return create_sweeptxs_for_our_ctx(chan=self, ctx=ctx, sweep_address=self.sweep_address)
  File "/opt/electrum/electrum/lnchannel.py", line 321, in sweep_address
    assert self.lnworker.wallet.is_mine(addr)
AssertionError
2020-12-27 18:11:42 +01:00
ThomasV 39fc72dad6 add paste button to qt payto_e. fixes #6878 2020-12-27 12:01:43 +01:00