Commit Graph

565 Commits

Author SHA1 Message Date
carla
2a614cc596
multi: add labels to lnd native transactions
Follow up labelling of external transactions with labels for the
transaction types we create within lnd. Since these labels will live
a life of string matching, a version number and rigid format is added
so that string matching is less painful. We start out with channel ID,
where available, and a transaction "type". External labels, added in a
previous PR, are not updated to this new versioned label because they
are not lnd-initiated transactions. Label matching can check this case,
then check for a version number.
2020-07-29 13:46:07 +02:00
Olaoluwa Osuntokun
6f208bce40
server+funding: use max values for csv delay and confs for wumbo channels 2020-07-10 16:27:17 -07:00
Olaoluwa Osuntokun
8177fed302
funding: allow incoming wumbo channel requests if wumbo is enabled 2020-07-10 16:27:15 -07:00
Olaoluwa Osuntokun
6243838444
server: remove unused globalFeatures variable
Everything is done through the feature manager now, so we don't need to
set these feature bits manually anymore.
2020-07-10 16:27:14 -07:00
Olaoluwa Osuntokun
5345069b16
server+lncfg: add new config flag to enable wumbo channels
In this commit, we add a new config flag to enable wumbo channels, with
the default being that nodes reject all wumbo channel attempts.
2020-07-10 16:27:13 -07:00
Wilmer Paulino
9e8c39d4a2
Merge pull request #971 from vctt94/addMaxValueFlag
Add max value in flight flag
2020-07-07 10:29:51 -07:00
Olaoluwa Osuntokun
3a2f3504a5
Merge pull request #4281 from Roasbeef/host-ann
netann: add new HostAnnouncer to support dynamic IPs via domains
2020-07-06 18:12:15 -07:00
Olaoluwa Osuntokun
ba3688c3b9
netann: add new HostAnnouncer to support dynamic IPs via domains
In this commit, we add a new sub-system, then `HostAnnouncer` which
allows a users without a static IP address to ensure that lnd always
announces the most up to date address based on a domain name. A new
command line flag `--external-hosts` has been added which allows a user
to specify one or most hosts that should be periodically resolved to
update any advertised IPs the node has.

Fixes #1624.
2020-07-06 17:30:08 -07:00
nsa
cbd54101f8 multi: remove peer.go, change all references to point to peer pkg 2020-07-06 19:16:07 -04:00
nsa
9be9d69349 multi: initialize peer with peer.Config 2020-07-06 19:16:07 -04:00
nsa
bf161c9835 peer+server: add HandleLocalCloseChanReqs to peer, call from server 2020-07-06 19:16:07 -04:00
nsa
0dda9e06ce multi: exporting PendingUpdate, ChannelCloseUpdate, ErrorBufferSize 2020-07-06 19:16:06 -04:00
nsa
ac72479b10 server.go: log DisconnectPeer errors, use public functions to access
peer internals.
2020-07-06 19:16:06 -04:00
vctt94
474ce4ae25 server: Add max value in flight to server 2020-07-02 15:49:19 -03:00
Joost Jager
24e3234dfa
invoices: optionally hold and auto-cancel keysend payments
Adds a new configuration flag to lnd that will keep keysend payments in
the accepted state. An application can then inspect the payment
parameters and decide whether to settle or cancel.

The on-the-fly inserted keysend invoices get a configurable expiry time.
This is a safeguard in case the application that should decide on the
keysend payments isn't active.
2020-06-27 09:54:11 +02:00
Roei Erez
0f50d8b2ed htlcswitch: introducing interceptable switch.
In this commit we implement a wrapper arround the switch, called
InterceptableSwitch. This kind of wrapper behaves like a proxy which
intercepts forwarded packets and allows an external interceptor to
signal if it is interested to hold this forward and resolve it
manually later or let the switch execute its default behavior.
This infrastructure allows the RPC layer to expose interceptor
registration API to the user and by that enable the implementation
of custom routing behavior.
2020-06-18 15:12:50 +03:00
Conner Fromknecht
d0d2ca403d
multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
Andras Banki-Horvath
0e3629e2c7 channeldb+lnd: make channeldb backend configurable
This commit adds support for user configured channeldb backend.
2020-05-22 11:26:25 +02:00
Oliver Gugger
36b90382d3
lnd+server+keychain: remove unused code 2020-05-20 09:07:21 +02:00
Oliver Gugger
535a22c590
server+brontide: use ECDH interface for brontide handshake 2020-05-20 09:06:56 +02:00
Oliver Gugger
ee74e4ba86
server+mod: use ECDH interface for sphinx router 2020-05-20 09:05:36 +02:00
Oliver Gugger
be890ef9be
lnd+server+netann: use signing interface in node signer 2020-05-20 09:05:35 +02:00
Oliver Gugger
7f1b865b53
multi: rename server's identityPriv to identityECDH 2020-05-20 09:05:14 +02:00
Oliver Gugger
7c1304b31c
peer: don't use global cfg 2020-05-14 16:18:02 +02:00
Oliver Gugger
4343f9e9a6
server+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger
7ce70321ac
fundingmgr+server: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger
85d5cdfbfd
multi: move global registeredChains to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger
3b2188d689
multi: move exported items to lncfg 2020-05-14 14:37:51 +02:00
Conner Fromknecht
20a776d703
Merge pull request #4194 from wpaulino/ignore-tor-inbound-reconnect
server: ignore reconnection for unadvertised inbound peers over Tor
2020-04-30 20:38:16 -07:00
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
Andras Banki-Horvath
633ea71ad1 lnd: time.Since instead of time.Now().Sub(...) 2020-04-24 19:15:08 +02:00
Andras Banki-Horvath
ed595adf59 lnd: one append instead of appends in a loop 2020-04-24 19:15:08 +02:00
Wilmer Paulino
c503b82e91
server: ignore reconnection for unadvertised inbound peers over Tor
A peer's remote address isn't known to us if we accepted the connection
over Tor, instead we know the address the onion service used to dial to
lnd. If said peer also doesn't have any advertised addresses, then we
don't have enough information to attempt a reconnect, so we avoid doing
so. Allowing the reconnection to happen isn't necessarily an issue, but
not allowing it prevents the configured SOCKS proxy from dialing to
private addresses.
2020-04-14 16:16:26 -07:00
Conner Fromknecht
37dca27a3d
htlcswitch: thread clock from switch to mailbox 2020-04-14 10:49:26 -07:00
Olaoluwa Osuntokun
8c2647de6b
Merge pull request #4172 from cfromknecht/witness-size
input: assert witness size constants
2020-04-10 16:45:04 -07:00
Conner Fromknecht
0f94b8dc62
multi: return input.Signature from SignOutputRaw 2020-04-10 14:27:35 -07:00
Joost Jager
47f9c1c3fd
routing: use routingGraph interface in payment session
Preparation for more test coverage of payment session.

The function findPath now has the call signature of the former
findPathInternal function.
2020-04-09 08:20:37 +02:00
nsa
ada0b78dfc lnd+server+watchtower: allow Standalone access to the tor controller
This commit lets the watchtower automatically create hidden services
by giving it a pointer to a TorController. The server was also slightly
refactored so that it was not the sole owner of the TorController.
2020-03-29 12:36:54 -04:00
Joost Jager
1a6b28553a
routing: stricter mission control state failure updates
This commit puts a mechanism in place to prevent a failure for a low
amount from being overwritten very soon after by a higher amount
failure.
2020-03-28 07:49:23 +01:00
Conner Fromknecht
4e793497c8
Merge pull request #2669 from cfromknecht/use-netann-in-discovery
netann+discovery+server: consolidate network announcements to netann pkg
2020-03-23 13:38:06 -07:00
Olaoluwa Osuntokun
071c7cbe78
lnd: convert to use new kvdb abstraction 2020-03-18 19:35:23 -07:00
Conner Fromknecht
f6c194c3cd
netann/node_announcement: consolidate signing logic 2020-03-17 16:25:02 -07:00
Conner Fromknecht
df44d19936
discovery/multi: move SignAnnouncement to netann 2020-03-17 16:23:01 -07:00
carla
54089febd6
peer+server: store errors for peers with open channels
Add an error buffer to the peer struct which will store errors for
peers that we have active channels with. We do not store these errors
with peers that we do not have channels open with to prevent peers from
connecting and costlessly spamming us with error messages. When the peer
disconnects, the error buffer is offloaded to the server so that we can
track errors across connections. When peers reconnect, they are created
with their historic error buffer.
2020-03-17 08:22:35 +02:00
Olaoluwa Osuntokun
4cb518c174
Merge pull request #4056 from wpaulino/tor-onion-store
tor+server: add OnionStore to AddOnionConfig with file-based implementation
2020-03-12 18:49:57 -07:00
Wilmer Paulino
e17ad8bc84
Merge pull request #4048 from wpaulino/tor-hashed-password
server+tor: add support for Tor HASHEDPASSWORD authentication method
2020-03-10 11:12:41 -07:00
Tomas Carnecky
018e8b5b97
server+tor: add support for Tor HASHEDPASSWORD authentication method
This provides users an alternative over the SAFECOOKIE authentication
method, which may not be as useful if users are connecting to a remote
Tor sevrer due to lnd not being able to retrieve the cookie file.
2020-03-10 10:32:44 -07:00
Olaoluwa Osuntokun
3dda93e30d
Merge pull request #3821 from halseth/pluggable-anchors-lnwallet
[anchor] pluggable anchor commitments
2020-03-09 19:49:05 -07:00
Johan T. Halseth
21126ab0f3
multi: optionally enable and signal anchor support
Defaults to disabled.
2020-03-09 12:59:34 +01:00
Johan T. Halseth
44756b5811
cfg: rename legacyprotocol to protocol
Since we are also going to use it for experimental new features.
2020-03-09 12:59:34 +01:00