Commit graph

12039 commits

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