SomberNight
004acb906d
ecc: abstract away some usage of python-ecdsa: randrange
2020-02-11 16:41:45 +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
SomberNight
a6dd17bfef
fix daemon (don't close instantly)
...
follow-up 37747d7469
2020-01-11 00:04:00 +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
SomberNight
a5a7c205e3
trivial: add a few log lines for startup
2019-12-10 23:31:58 +01:00
SomberNight
9d0ae2f95b
adapt to aiohttp 4.0
...
related: #5753
2019-12-10 22:55:11 +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
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
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
a35421ab71
qt settings: create services tab for both watchtower and payserver
2019-09-22 17:12:48 +02:00
ThomasV
1ecbafb920
add SSL context to watchtower server
2019-09-13 12:26:27 +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
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
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
ThomasV
103a37b0ca
add wallet_path to kwargs in run_cmdline
2019-09-09 09:58:16 +02:00
ThomasV
d5d9f5b46c
fix #5618
2019-09-08 12:06:21 +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
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
ThomasV
28da62f51b
add PayServer settings to settings_dialog
2019-09-05 14:43:27 +02:00
ThomasV
9d595f1fe1
fix websocket messages
2019-09-05 11:45:28 +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
ThomasV
54776ca1d9
disable http server by default
2019-09-04 13:07:44 +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
7f870f5e09
replace daemon 'start' subdommand with -d
2019-09-02 19:04:08 +02:00
SomberNight
0534f937ab
local jsonrpc: log exceptions daemon-side
2019-09-01 18:23:01 +02:00
ThomasV
9cfeadea70
Turn daemon subcommands into RPCs
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
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
b81feb6550
daemon: simplify get_fd_or_server
2019-08-20 09:03:12 +02:00
ThomasV
b2f61bdc06
use aiohttp + jsonrpcserver in watchtower
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
ThomasV
842fff832f
enable lightning through command line option
2019-08-20 09:03:11 +02:00
ThomasV
3abe30e9d8
basic watchtower synchronization
2019-08-20 09:03:11 +02:00
ThomasV
632f11d5da
watchtower: add watch_channel rpc
2019-08-20 09:03:11 +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
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
ThomasV
680b129b4a
remote watchtower: initial commit
2019-08-20 09:03:10 +02:00
ThomasV
08448fd2f0
add lnworker in start_network
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
SomberNight
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
SomberNight
12b98fa251
wizard: fix regression: unencrypted wallets were not getting upgraded
...
fixes #5177
2019-03-04 17:23:43 +01:00
SomberNight
43583c1e28
daemon: make sure wallet paths are standardised everywhere
2019-03-04 02:49:41 +01:00