Commit Graph

4398 Commits

Author SHA1 Message Date
Johan T. Halseth
e0560741b4
breacharbiter test: add TestBreachSecondLevelTransfer 2018-06-15 12:11:13 +02:00
Johan T. Halseth
60d9ae02c7
mock: protect mockSpendNotifier map by mutex 2018-06-15 12:11:13 +02:00
Johan T. Halseth
9aa55b164e
breacharbiter test: extract common init logic 2018-06-15 12:11:13 +02:00
yohei okada
7b37cbd2d9
htlcswitch: add basic table driven tests for ExpectedFee 2018-06-15 17:29:02 +09:00
Olaoluwa Osuntokun
d82ef41245
rpc: sort closed channels in order of ascending height 2018-06-14 17:14:39 -07:00
Oliver Gugger
8d6b49384a
config: add unix socket example to sample configuration 2018-06-14 08:19:10 +02:00
Oliver Gugger
9f0e39f881
lncli: add support for unix sockets 2018-06-14 08:19:10 +02:00
Oliver Gugger
c1b1dd96ef
lncfg: move configuration helper methods to new package 2018-06-14 08:19:09 +02:00
Oliver Gugger
460fa25871
config+lnd+server: add unix socket support 2018-06-14 08:19:09 +02:00
Olaoluwa Osuntokun
b5a228808b
Merge pull request #1375 from wpaulino/gossiper-cancel-block-epochs
discovery/gossiper: hold ref to block epoch stream and cancel when stopped
2018-06-13 22:16:52 -07:00
Wilmer Paulino
90a50bd893
peer: remove no longer needed block epoch 2018-06-13 19:23:44 -07:00
Wilmer Paulino
9ecfdb3c32
discovery/gossiper: hold ref to block epoch stream and cancel when stopped 2018-06-13 19:20:53 -07:00
Olaoluwa Osuntokun
6830024faf
Merge pull request #1367 from halseth/waitpredicate-interval
lntest/harness: add pollIntervall to WaitPredicate
2018-06-13 19:17:30 -07:00
Olaoluwa Osuntokun
1e8a5104ba
Merge pull request #1338 from Roasbeef/packet-queue-exit
htlcswitch: ensure the packet queue exits on stop
2018-06-13 19:17:12 -07:00
Olaoluwa Osuntokun
39f2739d84
Merge pull request #1229 from wpaulino/randomize-link-fee-updates
htlcswitch: randomize link fee updates
2018-06-13 19:11:48 -07:00
Olaoluwa Osuntokun
4a0d7b0244
Merge pull request #1374 from wpaulino/zero-amount-invoice-error
rpcserver: return err when paying 0 amt invoice and amt is not specified
2018-06-13 18:56:04 -07:00
Wilmer Paulino
8198466972
multi: move block epochs dependency from links to switch
In this commit, we move the block height dependency from the links in
the switch to the switch itself. This is possible due to a recent change
on the links no longer depending on the block height to update their
commitment fees.

We'll now only have the switch be alerted of new blocks coming in and
links will retrieve the height from it atomically.
2018-06-13 17:41:21 -07:00
Wilmer Paulino
4cc60493d2
peer+htlcswitch: randomize link commitment fee updates
In this commit, we modify the behavior of links updating their
commitment fees. Rather than attempting to update the commitment fee for
each link every time a new block comes in, we'll use a timer with a
random interval between 10 and 60 minutes for each link to determine
when to update their corresponding commitment fee. This prevents us from
oscillating the fee rate for our various commitment transactions.
2018-06-13 17:41:01 -07:00
Olaoluwa Osuntokun
c1a1b3ba3d
Merge pull request #1274 from joostjager/closechannels-squashed
rpc+lnrpc: add new closechannels cli+rpc command
2018-06-13 17:35:35 -07:00
Olaoluwa Osuntokun
dddbfa7efe
Merge pull request #1205 from wpaulino/initial-peer-bootstrap
server: improve initial peer bootstrapping
2018-06-13 16:51:41 -07:00
Olaoluwa Osuntokun
f2273d9503
discovery: log failed attempts in replyShortChanIDs 2018-06-13 16:44:59 -07:00
Olaoluwa Osuntokun
0d607f675f
Merge pull request #1344 from halseth/lndtest-defer-shutdown
integration tests: shut down nodes using defer
2018-06-13 15:57:17 -07:00
Wilmer Paulino
800b1363ab
discovery: randomize order of different bootstrappers
In this commit, we randomize the order of the different bootstrappers in
order to prevent from always querying potentially unreliable
bootstrappers first.
2018-06-13 08:59:37 -07:00
Wilmer Paulino
9593e3772e
server: improve initial peer bootstrapping
In this commit, we address an existing issue with regards to the inital
peer bootstrapping stage. At times, the bootstrappers can be unreliable
by providing addresses for peers that no longer exist/are currently
offline. This would lead to nodes quickly entering an exponential
backoff method used to maintain a minimum target of peers without first
achieving said target.

We address this by separating the peer bootstrapper into two stages: the
initial peer bootstrapping and maintaining a target set of nodes to
maintain an up-to-date view of the network. The initial peer
bootstrapping stage has been made aggressive in order to provide such
view of the network as quickly as possible. Once done, we continue on
with the existing exponential backoff method responsible for maintaining
a target set of nodes.
2018-06-13 08:59:36 -07:00
Conner Fromknecht
92711c4d32
utxonursery: rebroadcast finalized kinder txns on startup
Alters the utxonursery to rebroadcast finalized sweep txns
that sweep kindergarten (CSV-delayed) outputs. Currently, we
reregister for confirmation notifications, but we make no
attempt to rebroadcast. The htlc-timeout transactions are
rebroadcast correctly, so this changes make the handling of
crib and kinder outputs symmetric on startup.
2018-06-13 01:40:05 -07:00
Joost Jager
52392d836c lnrpc: add ClosedChannels call 2018-06-13 08:48:33 +02:00
Joost Jager
cc1d833ee4 lncli: add closedchannels command 2018-06-13 08:48:01 +02:00
Joost Jager
f80ea51f69 rpcserver: add ClosedChannels call 2018-06-13 08:48:01 +02:00
Joost Jager
f07e2076f8 gitignore: exclude debug binaries 2018-06-13 08:48:00 +02:00
Olaoluwa Osuntokun
26636ce994
Merge pull request #1113 from wpaulino/fee-cutoff
rpc+routing: add support for fee limits when finding routes for payments
2018-06-12 19:34:23 -07:00
Oliver Gugger
cd8a21c4b8 walletunlocker: pass unlocked wallet back to lnd to avoid double unlock 2018-06-12 19:27:57 -07:00
Oliver Gugger
7303a65ad1 lnd: use unlocked wallet from WalletUnlocker for chain control 2018-06-12 19:27:57 -07:00
Oliver Gugger
24a085bf7d btcwallet: extend config to allow passing of an unlocked wallet 2018-06-12 19:27:56 -07:00
Oliver Gugger
4cefb6b8dc btcwallet: use already unlocked wallet if available 2018-06-12 19:27:56 -07:00
Oliver Gugger
8f2a8d6682 chainregistry: pass initialized wallet to chain control 2018-06-12 19:27:56 -07:00
Olaoluwa Osuntokun
f7156aa1d6
Merge pull request #1109 from wpaulino/nat-traversal
server: add support for NAT traversal and watching dynamic IP changes
2018-06-12 19:13:43 -07:00
Wilmer Paulino
c1886d2c1c
docs: add NAT traversal related documentation 2018-06-12 18:40:13 -07:00
Wilmer Paulino
6a6b490b50
server: add support to automatically advertise external IPs using NAT
traversal

In this commit, we allow our node to automatically advertise its
connection's external IPs on the ports it is currently listening on in
order to accept inbound connections. This is only done when specifying
a NAT traversal technique when starting the daemon.

We also include a handy method that watches for dynamic IP changes in
the background. If a new IP is detected, we'll craft a new node
announcement using the new IP and broadcast it to the network.
2018-06-12 18:36:30 -07:00
Wilmer Paulino
2ad9823945
server: include optional updates when generating a new node announcement 2018-06-12 18:36:29 -07:00
Wilmer Paulino
d635994272
lnwire: add functional option that updates a node announcement's addresses 2018-06-12 18:36:28 -07:00
Wilmer Paulino
377e770db4
nat: introduce new NAT traversal package with UPnP/NAT-PMP implementations
In this commit, we introduce a new package `nat`. This package is
responsible for handling the different techniques for NAT traversals.
Specifically, we have implemented UPnP and NAT-PMP support. This will
allow users to easily advertise their nodes to the network as long as
their devices are behind a single NAT. Devices behind multiple NATs are
not supported.
2018-06-12 18:36:27 -07:00
Wilmer Paulino
8651b4a422
config: clarify documentation for NAT traversal flag 2018-06-12 18:36:24 -07:00
Wilmer Paulino
5732f5a1c4
config: normalize external IPs when parsing config 2018-06-12 18:32:49 -07:00
Wilmer Paulino
d17a561d8b
build: include NAT traversal related dependencies 2018-06-12 18:32:48 -07:00
John Griffith
ba0db4ce91
Added some additional comments 2018-06-12 18:32:47 -07:00
John Griffith
1c3df21d18
Added NatPmp option 2018-06-12 18:32:46 -07:00
John Griffith
0d0078baac
Continue with server startup, even if UPNP has failed 2018-06-12 18:32:45 -07:00
John Griffith
b59077109c
Added Upnp support behind a configuration option, moved the logic to the server code 2018-06-12 18:32:44 -07:00
shtirlic
9a3dfaf332
Merge changes ontop of master 2018-06-12 18:32:43 -07:00
Wilmer Paulino
70a52c9eae
lnd_test: add route fee cutoff test 2018-06-12 18:14:52 -07:00