Commit Graph

12510 Commits

Author SHA1 Message Date
SomberNight 2a4b516f16 qt receive tab: fix refresh bug on macOS
related: #4777
2020-05-14 20:24:21 +02:00
SomberNight 587f8df8ad binaries: update base docker image for wine/appimage 2020-05-14 20:24:17 +02:00
SomberNight aac770404f mac build: pin hashes of more build dependencies
namely pyinstaller
2020-05-14 20:24:14 +02:00
SomberNight d9b4270035 mac build: bump libusb version 2020-05-14 20:24:11 +02:00
SomberNight 7143e9199f binaries: bump python version (3.7.6->3.7.7) 2020-05-14 20:24:07 +02:00
SomberNight 55c8216738 binaries: update bundled PyQt version: 5.11.3 -> 5.14.2
Now that we increased the min supported macOS version re #6128 anyway.
Per https://github.com/spesmilo/electrum/issues/3685#issuecomment-508556343,
Qt 5.14 needs at least macOS 10.13
2020-05-14 20:24:03 +02:00
SomberNight a4bec80efe (trivial) log Qt version at startup 2020-05-14 19:15:50 +02:00
SomberNight f9de6a5354 tests: lnpeer: make debug htlc failure hooks more uniform 2020-05-14 19:15:32 +02:00
SomberNight 2b0ed9f406 (trivial) lnpeer: rm @log_exceptions from htlc_switch 2020-05-14 19:15:29 +02:00
SomberNight 095464b620 mac build: conform to macOS 10.15 Gatekeeper requirements
fixes #6128

some of this is based on:
https://github.com/metabrainz/picard/blob/e1354632d2db305b7a7624282701d34d73afa225/scripts/package/macos-notarize-app.sh
https://github.com/Electron-Cash/Electron-Cash/commit/1eb8b71e7d11141432f1c46629683a5a703795e2
https://github.com/Electron-Cash/Electron-Cash/commit/24e44e9784fa23fa9f408ce3f9489fac8568093b
https://github.com/Electron-Cash/Electron-Cash/commit/5abec73eee0cdeb725e3c5a989621ec4ccfb92a0
2020-05-14 17:09:08 +02:00
SomberNight 9baaf1afda commands: make 'wallet'-mangling in decorator less obscure, and fixes
- some commands expect a 'wallet_path' arg, while others expect 'wallet'
- 'wallet_path' in the end is supposed to be a str,
  'wallet' in the end is supposed to be an Optional[Abstract_Wallet]
- initially, in the decorator, 'wallet' can be a str, in which case
  the decorator replaces it with an Abstract_Wallet (from the daemon)
- Previously the decorator sometimes converted 'wallet_path' to 'wallet'.
  This was because when called from the CLI it was always given 'wallet_path' (and never 'wallet),
  while when called from JSON-RPC it was given either 'wallet' or 'wallet_path' (depending on command).
  Now, the CLI also behaves as JSON-RPC, and hence 'wallet_path' and 'wallet' are fully separate.
- A bug is fixed where, when a command that only optionally takes a 'wallet' (such as gettransaction),
  was called from the JSON-RPC with the arg present, it raised; and when called from CLI with the arg present
  the arg was not actually passed to the command.
- A bug is fixed where if one command calls another command (that both take a 'wallet'),
  it would raise (due to assuming 'wallet' is str and needs to be converted to Abstract_Wallet).
  This fixes #6154.

-----

$ ./run_electrum --testnet daemon -d
$ ./run_electrum --testnet load_wallet -w ~/.electrum/testnet/wallets/default_wallet

$ curl --data-binary '{"id":"curltext","jsonrpc":"2.0","method":"gettransaction","params":{"txid":"9f43ff71ea2594873e4e7d15e61254a3661ff2df1af76325c854d9aa199550ce"}}' http://user:pass@127.0.0.1:7777
{"jsonrpc": "2.0", "result": "0200000001caaac6b5eb916e3067d0224f942fb331ce1dcfb4031cfb479e7941dcf95e409801000000fdfe0000483045022100e2a508bb78c2172eb03f081a342454ba1d24669e959700973b1a742a4fedd0c302203174e06feda265031cf9aa0364d4a4eafb71b0c0a62e76be7795cfbb307b677a01483045022100d0e14564838fac754395158741d64c73da2b86e7900dfdc6a63c7492b232ba130220778e7e7c21d94ebcd340057302aeff7e9a797a3aa3e0ac4884e9ff27339ea6e9014c69522102091f0b4d8ab30016a5d1c088249e02883fad8160f06fa53588ad8598650a3e6221035f2f8263bb3608d6cc4ee03bd4cb8d65c4d70af71049f05fbfee4978832a1fd22103fe42dab58718ea0413f7c8de693cdeee22ce19b1dc34c0bbdd7a48245465c5a253aefdffffff01cb9f0700000000001976a914c13fd6294d1be7b9410a5538f4b4ef10fc594ee788ac802c1800", "id": "curltext"}

$ curl --data-binary '{"id":"curltext","jsonrpc":"2.0","method":"gettransaction","params":{"txid":"9f43ff71ea2594873e4e7d15e61254a3661ff2df1af76325c854d9aa199550ce", "wallet":"~/.electrum/testnet/wallets/default_wallet"}}' http://user:pass@127.0.0.1:7777
{"jsonrpc": "2.0", "error": {"code": -32000, "message": "'str' object has no attribute 'db'"}, "id": "curltext"}
2020-05-14 16:33:02 +02:00
SomberNight 21e637f543 network: validate server peers sent by main server
Data returned by the main server for request "server.peers.subscribe"
is of course untrusted input. Previously if it contained e.g. invalid port numbers
or IP addresses, it could kill the whole network taskgroup.
(this might have only affected master and not released versions,
which would only raise exceptions once the client actually tried to connect to an invalid host/port)
2020-05-13 19:28:35 +02:00
SomberNight 6d1acc929a kivy: fix "choose from peers" in network server-select popup
follow-up 9e57ae630b
fixes #6161
2020-05-13 19:05:07 +02:00
SomberNight 41aa50a3f3 coldcard: log exception traceback in create_client
related: https://github.com/Coldcard/ckcc-protocol/pull/9
2020-05-13 18:11:53 +02:00
ThomasV a3332dc72a show watchtower db size in GUI 2020-05-13 15:13:09 +02:00
ThomasV 594f13b6f7 appimage: update libudev-dev in Dockerfile 2020-05-13 10:55:08 +02:00
ThomasV d3fb68575d daemon.py: Add authentication to Watchtower.
Define abstract class AuthenticatedServer
2020-05-12 10:12:30 +02:00
ThomasV 2fed218452 follow-up prev commit (fix regtest) 2020-05-12 09:22:39 +02:00
ThomasV 8fb79196ba add_lightning_request command: return request object 2020-05-11 17:52:04 +02:00
SomberNight c034219c5a ln invoices: more relaxed filtering of chans to include route hints for
e.g. just because remote peer is temporarily offline, we might still want it
included in the invoice
2020-05-11 16:01:33 +02:00
ThomasV 1788e5c1c0 lnworker: catch exceptions raised in decode_msg 2020-05-11 10:31:49 +02:00
ThomasV 6aeab66463 fix #6157 2020-05-11 08:12:09 +02:00
ThomasV e2c2c89988 follow-up prev 2020-05-10 22:11:09 +02:00
ThomasV 0070e5036c follow-up previous commit 2020-05-10 21:45:10 +02:00
ThomasV 13317c2f51 fix callback name: request_status 2020-05-10 21:14:31 +02:00
ThomasV 87facaa781 payserver: do not allow create_invoice by default 2020-05-10 17:07:19 +02:00
ThomasV 11aaa0b66f Simplify services (watchtower, payserver):
- Do not expose services settings in GUI
 - Use a single netaddress configuration variable.
2020-05-10 14:52:50 +02:00
ThomasV 526c75ad53 lnrouter: blacklist channels for a limited time (see #6124) 2020-05-10 12:37:27 +02:00
ThomasV ac67f7ae30 discard channel updates too far in the future, or too close apart (see #6124) 2020-05-10 12:16:16 +02:00
ThomasV 1322fa6a08 Merge pull request #6152 from JeremyRand/rpc-error-exit-code
RPC client: exit code 1 if RPC server returned error
2020-05-10 12:01:33 +02:00
JeremyRand b72f8a8c9a RPC client: exit code 1 if RPC server returned error 2020-05-10 06:34:27 +00:00
ThomasV b891d3dc85 new command: get_ssl_domain 2020-05-09 10:33:18 +02:00
relativistic electron fbc539e2cc One can now click the back button in the show_xpub_and_add_cosigners wizard step 2020-05-07 10:19:48 +02:00
ThomasV 984da7515a fix #6125: detect self-payments 2020-05-06 12:58:55 +02:00
SomberNight 250c99d5b2 travis: use other "coveralls" package
see: https://github.com/z4r/python-coveralls/issues/74
2020-05-06 11:42:58 +02:00
SomberNight 619f8555f5 follow-up prev: trivial rename
Just realised that the "diamond" graph is actually defined in Graph Theory
but it has an extra edge. What we have here is apparently called a "square" graph.
Not that it matters much but might as well name it as such then...
2020-05-06 11:27:50 +02:00
SomberNight cc4029c335 test_lnpeer: add some multi-hop payment unit tests 2020-05-06 11:06:44 +02:00
SomberNight 7153e753d1 lnworker._pay: allow specifying path as argument
not exposed to CLI/etc yet but will be used in tests soon
2020-05-06 11:06:40 +02:00
SomberNight 63b18dc30f lnrouter: add PathEdge/LNPaymentPath for (node_id, scid) 2020-05-06 11:06:37 +02:00
SomberNight 04d018cd0f test_lnpeer: some clean-up, make it easier to add "num_node>2" tests 2020-05-06 11:06:33 +02:00
SomberNight 7951f2ed3b lnworker.pay: small clean-up 2020-05-06 04:02:59 +02:00
SomberNight 7d3eb5d4db (trivial) follow-up c1b1638615 2020-05-06 04:01:56 +02:00
SomberNight 62be1cc367 small clean-up re "extract preimage from on-chain htlc_tx"
related: #6122
2020-05-06 03:15:20 +02:00
ThomasV 5c05c06bf0 follow-up prev commit: fix test_lnpeer 2020-05-05 21:18:17 +02:00
ThomasV 7b44e27087 lnpay: return payment log, increase timeout 2020-05-05 18:32:43 +02:00
ThomasV d7b853f271 follow-up 8ba7e68064 2020-05-05 15:40:13 +02:00
ThomasV 887b643706 follow-up prev commit... 2020-05-05 09:58:50 +02:00
ThomasV a8c14e65ad follow-up prev commit 2020-05-05 09:57:01 +02:00
ThomasV 1529b07aa4 follow-up prev commit 2020-05-05 09:55:56 +02:00
ThomasV c1b1638615 fix htlc forwarding:
- persist fail_htlc error messages
 - do not rely on payment_hash in htlc_switch
2020-05-05 09:23:48 +02:00