Commit Graph

194 Commits

Author SHA1 Message Date
Johan T. Halseth
7077d19589
lnd: add Authenticate method
Adds a global Authenticate method that can be used to get the
atuhentication options needed to call the grpc server.

Currently meant only for used with the mobile bindings, so we use the
admin macaroon.
2019-12-18 10:28:22 +01:00
Johan T. Halseth
27337dc973
lnd+rpcserver: use same serverOpts for custom listeners
Earlier we used emtpy grpc server options if custom listeners were set.
This was done to disable TLS. Now, we reuse the same server options as
for the regular listeners, in a move towards enabling TLS also here.
2019-12-18 10:28:22 +01:00
Johan T. Halseth
f0bd4e775b
Merge pull request #3775 from halseth/mobile-listener-signal
[mobile] make Ready signal for custom listeners
2019-12-17 12:26:04 +01:00
Joost Jager
61e114f201
autopilot: take channel min htlc from config 2019-12-11 00:17:10 +01:00
Johan T. Halseth
dc6c040803
lnd: make Ready signal for custom listeners
This allows the caller to know when lnd is ready to accept RPC calls,
which is inmportant for mobile applications where eveything happens in
process.
2019-11-29 11:59:01 +01:00
Olaoluwa Osuntokun
84c73f3025
Merge pull request #3740 from guggero/rest-client-receive-size
lnd: increase max message receive size for REST proxy
2019-11-19 17:15:24 -08:00
Oliver Gugger
4cd06465ea
lnd: increase max message receive size for REST proxy 2019-11-18 14:06:14 +01:00
Oliver Gugger
dbbb169e06
lnd: use TLS code from cert package 2019-11-18 09:44:54 +01:00
Oliver Gugger
bfe10376f3
lnd: prepare TLS code for extraction 2019-11-14 10:23:35 +01:00
Joost Jager
6c6bbdd365
signal: initialize interceptor explictly 2019-11-12 19:16:22 +01:00
Oliver Gugger
3ca2c363fe
lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
Oliver Gugger
94f49192cf
lnd: refactor sub logger setup to use new rotating log writer 2019-10-14 14:56:31 +02:00
Wilmer Paulino
b63ed5ad56
config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00
Wilmer Paulino
194a9dea81
multi: support sync freelist option within btcwallet 2019-10-04 12:19:40 -04:00
Lars Lehtonen
259b5b253d
lnd: stdlib context 2019-09-28 16:07:37 -07:00
nsa
4d02100e12
fundingmanager+server: adding ChannelAcceptor to the fundingmanager 2019-09-25 12:07:30 -04:00
nsa
c2a6c86e6b
rpcserver: adding ChannelAcceptor bidirectional streaming 2019-09-25 12:07:30 -04:00
Johan T. Halseth
fa21601d07
lnd+cmd/lnd/main: add ListenerCfg to Main
ListenerCfg allows passing custom listeners to the main method, to be
used for the wallet unlocker and rpc server. If these are set these will
be used instead of the regular RPC listeners.
2019-09-05 09:22:54 +02:00
Johan T. Halseth
2562fdbdda
lnd+rpcserver: extract listener setup into closure 2019-09-05 09:22:54 +02:00
Johan T. Halseth
d2435a4dc3
Merge pull request #3059 from champo/rpc_drop
lnd: close the wallet unlock grpc server
2019-08-26 14:18:33 +02: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
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
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
4e8fb4d32b
Merge pull request #3337 from carlaKC/I3336-removeregtestsyncwait
lnd: Add regtest exception for wait to sync on startup
2019-07-23 15:38:27 -07:00
carla
280b28941d lnd: Add regtest exception for wait to sync on startup 2019-07-23 07:43:24 -04:00
Johan T. Halseth
2bef62b467
lnd: remove global var access from genCertPair
Instead pass the optional strings as slices to the method.
2019-07-22 09:26:25 +02:00
Olaoluwa Osuntokun
e2a35ae089
Merge pull request #3237 from orbitalturtle/auto-regenerate-cert
Unit test for autoregenerating expired cert pairs
2019-07-19 17:21:27 -07:00
Wilmer Paulino
0d3ef43c92
lnd: log error if any throughout initialization
In this commit, we establish a new pattern to always log errors before
returning them to the higher level caller, which then prints the error
to stdout/stderr. Errors returned are usually lowercase, but we decide
not to apply this rule here as these errors should not be chained
forward.
2019-07-17 14:24:21 -07:00
Wilmer Paulino
e147445c08
lnd: prevent panic on nil neutrino cleanup
A cleanup closure is not included when an error is returned, causing the
defer to execute and triggering the following panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x105da38]

goroutine 1 [running]:
github.com/lightningnetwork/lnd.Main(0x2083e40, 0xc0004f6db0)
	/home/user/lnd/lnd.go:208 +0x2bfa
main.main()
	/home/user/lnd/cmd/lnd/main.go:14 +0x26
2019-07-15 13:32:37 -07:00
Turtle
f958555ce3 Lnd + server_test: Add unit test for TLS cert autoregeneration 2019-07-11 00:10:55 -04:00
Johan T. Halseth
601773958d
lnd: fallback to localhost if failing getting hostname
Needed on some versions of Android.
2019-07-08 14:00:25 +02:00
Conner Fromknecht
ea311649b4
lnd: use distinct pubkey for watchtowers and server 2019-06-20 17:04:04 -07:00
Conner Fromknecht
59c9418eca
lnd+rpcserver: thread watchtower into subserver configs 2019-06-20 17:04:04 -07:00
Olaoluwa Osuntokun
a53323205c
Merge pull request #3133 from cfromknecht/wt-polish
watchtower: integrate altruist watchtower and watchtower client
2019-06-14 21:34:10 +02:00
Conner Fromknecht
985ac7f5b7
lnd: integrate companion watchtower 2019-06-13 19:54:20 -07:00
Conner Fromknecht
d2f3d5ef6c
server: add watchtower client 2019-06-13 19:54:18 -07:00
Turtle
f0b2abaec8 lnd: regenerate TLS certs when they expire 2019-06-13 20:40:56 -04:00
Johan T. Halseth
4806003b74
Merge pull request #2704 from MDrollette/multiple-opts
config: allow adding multiple tls ips and domains
2019-05-22 08:59:19 +02:00
Danny Paz
6fd5ef88b6 add litecoin regtest configuration to lnd
regtest change to chainregistry for default port number

merge w/ master
2019-04-26 21:14:26 -07:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Johan T. Halseth
9d1e1db42e
lnd: move main method to cmd/lnd/main.go 2019-04-23 20:56:33 +02:00
Conner Fromknecht
ab4a6750cc
Merge pull request #1865 from ExchangeUnion/litecoin-simnet
config: Experimental support for Litecoin/simnet
2019-04-19 14:43:47 -07:00
Valentine Wallace
1179895d20 chainregistry+lnd: remove unused cleanUp variable 2019-04-16 14:16:56 -07:00
Joost Jager
cf42719c45
lnd+rpcserver: refactor TLS configuration
This commit restructures the creation of various tls related object. It
also fixes a bug where wildcard IP addresses where only instantiated for
the main RPC server and not the WalletUnlocker service.
2019-04-04 14:18:18 -07:00
Conner Fromknecht
63b15fd8fb
lnd: pass CLI reject+channel cache sizes to channeldb Open 2019-04-01 16:34:30 -07:00
Olaoluwa Osuntokun
c5933d45fb
server: feed through any SCBs on start up to be restored
In this commit, we modify the server to serve the role as the agent
which will carry out the SCB restoration protocol if the Init/Unlock
methods include a set of channels to be recovered.
2019-03-28 17:53:26 -07:00
Olaoluwa Osuntokun
10910318a2
lnd: extract neutrino initialization to new function 2019-03-13 17:20:38 -07:00
Wilmer Paulino
1fe6599fd8 lnd+chainregistry: initialize neutrino light client before wallet setup
In this commit, we slightly refactor the startup of lnd when running
with a Neutrino light client backend. We'll now begin syncing our
backend as soon as lnd starts and passes all configuration checks. Since
this is all done before lnd's wallet setup, the light client will be
syncing in the background while the user notes/inputs their wallet seed.
This is done in order to provide a better UX from the point of the user,
such that most of the chain will already be synced by the time they get
to deposit funds into the wallet.
2019-03-13 16:46:50 -07:00
Matt Drollette
261558aad6 config: allow adding multiple tls ips and domains 2019-03-10 13:53:37 -05:00
Joost Jager
3545685177
invoicesrpc: create sub server
Sub server implementation is still empty. This is a preparatory
step for adding invoice functionality.
2019-02-01 09:42:35 +01:00