Commit graph

11966 commits

Author SHA1 Message Date
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