Commit Graph

8136 Commits

Author SHA1 Message Date
Conner Fromknecht
4f730076c9
Merge pull request #3380 from Roasbeef/rpc-error-interceptors
rpc: add unary+streaming interceptors to log all errors
2019-08-07 12:16:46 -07:00
Johan T. Halseth
21baa7bf18
multi: fix linter errors 2019-08-07 10:53:10 +02:00
Johan T. Halseth
3207c8a736
make: change linter gometalinter->golangci-lint 2019-08-07 10:53:09 +02:00
Olaoluwa Osuntokun
ed954785b2
rpc: add unary+streaming interceptors to log all errors
Not all errors that occur when serving client requests in the gRPC
server are logged. As a result, at times, we can be lacking critic
information that can be used to debug issues that pop up. With this PR,
we create a basic streaming+unary interceptor that will log all errors
that occur when servicing calls.

The current format looks something like this in the logs when an error
occurs:

```
[ERR] RPCS: [/lnrpc.Lightning/SendCoins]: decoded address is of unknown format
```
2019-08-06 19:41:41 -07:00
Olaoluwa Osuntokun
e44445e952
Merge pull request #3354 from carlaKC/peernotify-addpeernotifierservice
Peernotifier: Add Peer Notifier package
2019-08-06 19:34:25 -07:00
Wilmer Paulino
8ca2c79bfe
rpc: expose graph synced status within GetInfo 2019-08-06 17:56:56 -07:00
Wilmer Paulino
977c139f3c
discovery: handle graph synced status after stalled initial historical sync
This ensures that the graph synced status is marked true at some point
once a historical sync has completed. Before this commit, a stalled
historical sync could cause us to never mark the graph as synced.
2019-08-06 17:56:55 -07:00
Wilmer Paulino
af4234f680
discovery: allow the SyncManager to report whether the graph is synced 2019-08-06 17:56:54 -07:00
Olaoluwa Osuntokun
764099c091
REST: increase max msg size for REST proxy
Some time ago, we modified `lncli` to accept larger responses from the
server, up to 50MB. However, we failed to update the REST proxy, which
is in a sense, a client to the regular RPC server. As a result, users
can't currently hit the `/v1/graph` endpoint, as it'll fail with an
error.

In this PR, we update the proxy's dial options to allow it to receive
larger responses from the actual gRPC server. This is only a temporary
measure however, as we'll eventually want to expose some sort of
pagination for the end client.
2019-08-06 17:45:44 -07:00
Olaoluwa Osuntokun
9f0cfe2bee
Merge pull request #3377 from Roasbeef/update-sec-key
README: update link to security PGP key
2019-08-06 17:02:11 -07:00
Olaoluwa Osuntokun
6b0ce3090f
README: update link to security PGP key
In this commit, we update the link to the security PGP key to a gist. We
do this as recent DoS attacks against popular keservers have rendered
many of them unresponsive or only partially operating. As a temporary
measure, we link to a gist until an alternative solution is found.
2019-08-06 01:09:06 -07:00
Conner Fromknecht
c3aa46e08b
Merge pull request #3374 from halseth/ntfr-logger
[trivial] log: correct NTFR -> ntfrLog mapping
2019-08-05 12:41:24 -07:00
Johan T. Halseth
74f0c5f00f
log: correct NTFR -> ntfrLog mapping
Most likely because of a typo, NTFR was mapping to ntfnLog instead of
ntfrLog.

Originally added in 59e2be5306a77fff24bf2e8be1ba335247ef5beb
2019-08-05 15:21:59 +02:00
Juan Pablo Civile
88400f5b09 lnd: close the wallet unlock grpc server
The server was kept alive long after it stopped being used. This caused
problems for services using long-lived GRPC connections which might be
created before wallet unlocked. They got stuck connected to the wallet
unlock service needing a restart.
2019-08-03 17:22:56 -03:00
Olaoluwa Osuntokun
7767eecbb8 Merge pull request #3164 from joostjager/persistent-mc
routing: persistent mission control
2019-08-02 15:45:49 -07:00
Olaoluwa Osuntokun
6e9e0eaddd
Merge pull request #3359 from cfromknecht/flag-flip-no-historical-gossip
discovery: flag flip no historical gossip
2019-08-02 15:31:33 -07:00
Olaoluwa Osuntokun
9eb7237a2e
Merge pull request #3348 from wpaulino/max-cltv-expiry-config
htlcswitch: make max cltv expiry configurable and lower default
2019-08-02 14:00:17 -07:00
carla
4ceceda757 peernotifier: Add peer notifier package for peer online/offline events
This commit adds a peer notifier package which provides clients with
a subscription to peer online and offline events.
2019-08-02 10:15:28 -04:00
Joost Jager
7e7b620355
routing: persist mission control data 2019-07-31 08:44:00 +02:00
Olaoluwa Osuntokun
8c9c4b52e8
Merge pull request #3184 from wpaulino/wtclient-subserver
multi: add watchtower client RPC subserver
2019-07-30 17:26:22 -07:00
Conner Fromknecht
994719026f
config+server: add ignore-historical-filters CLI option
This commit adds the ignore-historical-filters CLI option, initially
defaulting to false. Users may use this option to prevent lnd from doing
historical gossip dumps to peers that set their `gossip_timestamp_range`
in the past. Enabling this option will result in lower bandwidth and
memory consumption. Down the road the plan is to make this default to
true.
2019-07-30 17:26:03 -07:00
Conner Fromknecht
8cebddfe50
discovery/gossiper: thread IgnoreHistoricalFilters to sync manager 2019-07-30 17:25:47 -07:00
Conner Fromknecht
a3e690e253
discovery/sync_manager: init all syncers with IgnoreHistoricalFilters 2019-07-30 17:25:31 -07:00
Conner Fromknecht
35a2de23a3
discovery/syncer: add flag to prevent historical gossip filter dump 2019-07-30 17:25:15 -07:00
Conner Fromknecht
4cb30001ac
Merge pull request #3356 from openoms/documentation
lnrpc: remove lncli subscribechannelevents
2019-07-30 16:57:44 -07:00
Olaoluwa Osuntokun
69c9e2b732
Merge pull request #3278 from Crypt-iQ/bbolt_options_0707
channeldb: specify freelist bbolt options by default
2019-07-30 16:52:28 -07:00
openoms
44a28fe75c lnrpc: remove lncli subscribechannelevents and add regenarated rpc.pb.go 2019-07-30 23:51:04 +01:00
Wilmer Paulino
0690c8f627
watchtower/wtclient: only reset iterator once we've exhausted all candidates
Doing so allows us to load balance sessions better amongst all of the
tower candidates.
2019-07-30 15:18:18 -07:00
Wilmer Paulino
0431701262
multi: only allow specifying towers to TowerClient through RPC
With the introduction of the WatchtowerClient RPC subserver, the lnd
configuration flag to specify private watchtowers for the client is no
longer needed and can lead to confusion upon users. Therefore, we remove
the flag completely, and only rely on the watchtower client being active
through a new --wtclient.active flag.
2019-07-30 15:18:17 -07:00
Wilmer Paulino
359b2049b6
watchtower: load persisted towers upon TowerClient creation
We do this as a convenience for WatchtowerClient users so that they do
not need to re-add towers upon restarts. We ensure not to re-add towers
that have been previously removed by determining whether it has any
lingering active sessions.
2019-07-30 15:18:17 -07:00
Wilmer Paulino
787986283c
cmd/lncli: add watchtower client commands 2019-07-30 15:18:16 -07:00
Wilmer Paulino
8f010abac5
multi: add watchtower client RPC subserver 2019-07-30 15:18:15 -07:00
Wilmer Paulino
c57128097e
watchtower/wtclient: extend TowerClient with CRUD operations for towers
In this commit, we extend the wtclient.Client interface with the
following methods:

  * AddTower
  * RemoveTower
  * RegisteredTowers
  * LookupTower
  * Stats

Care has been taken to ensure that any in-memory state updates are
_only_ performed after a successful database update.

These methods are currently unused, but they serve as a dependency for
the upcoming WatchtowerClient RPC subserver.
2019-07-30 15:18:13 -07:00
Wilmer Paulino
06d10d8100
watchtower/wtclient: extend TowerCandidateIterator to update candidates 2019-07-30 15:13:24 -07:00
Wilmer Paulino
1d73a6564f
watchtower: extend client databse with CRUD operations for towers
These operations are currently unused, but will be integrated into the
TowerClient at a later point as future preparation for the
WatchtowerClient RPC subserver, which will allow users to add, remove,
and list the watchtowers currntly in use.
2019-07-30 15:13:23 -07:00
Wilmer Paulino
56d66c80a1
watchtower: extend client db to filter sessions for a specific tower
This currently takes O(N) time as there does not exist an index of
active client sessions for each watchtower within the client's database.
This index is likely to be added in the future.
2019-07-30 15:13:22 -07:00
Wilmer Paulino
4abadc82f3
watchtower/wtclient: export clientStats 2019-07-30 15:13:21 -07:00
Wilmer Paulino
159883665d
wtclient: refactor client creation after database calls 2019-07-30 15:13:20 -07:00
Wilmer Paulino
76f9c9bd52
watchtower/wtclient: remove stale sessionQueue TODO
The state updates that are pending to be acked by the tower are already
loaded within newSessionQueue.
2019-07-30 15:13:17 -07:00
Conner Fromknecht
4722a67ebb
Merge pull request #3347 from guggero/ticker-tidy
ticker+queue: run go mod tidy
2019-07-30 14:52:25 -07:00
Joost Jager
3dc83d1b6b
routerrpc: embed routing config 2019-07-29 13:42:59 +02:00
Joost Jager
eb4e65e54f
channeldb: export route serialization 2019-07-29 13:42:57 +02:00
Joost Jager
67ddb72eab
lnwire: create failure message encode/decode functions 2019-07-29 09:38:38 +02:00
Joost Jager
9e26f0d079
routing: define payment result
This commit groups together all payment result data. It is a preparation
for historical payment results being retrieved from the database.
2019-07-29 09:38:36 +02:00
Joost Jager
1507ff6590
routing: extract timestamp from applying payment result
This commit prepares for timestamps being supplied from the database for
processing of historical payment results.
2019-07-29 09:38:34 +02:00
Joost Jager
b4a7665bae
routing: provide payment id to mission control 2019-07-29 09:38:32 +02:00
Joost Jager
334b6a3bfe
routing: move unreadable failure handling into mission control 2019-07-29 09:38:30 +02:00
Joost Jager
934ea8e78d
routing: move failure interpretation into mission control 2019-07-29 09:38:26 +02:00
Wilmer Paulino
24ca962f75
htlcswitch: lower max outgoing cltv expiry to one week worth of blocks
The current value was based on the previous default CLTV delta of 144
blocks. This has been lowered to 40 since lnd v0.6.0-beta, making the
current value of 5000 blocks a bit high. Lowering it to one week should
be more than enough to account for the other major lightning
implementations. Eclair currently has a default CLTV delta of 144, while
c-lightning's is 14.
2019-07-26 18:06:40 -07:00
Wilmer Paulino
87ff463abd
htlcswitch+lnd: make max cltv expiry configurable 2019-07-26 18:05:58 -07:00