Commit Graph

7953 Commits

Author SHA1 Message Date
Dan Bolser
b5d8cde6fc README: update README to indicate tx index is no longer required for full node backends 2018-06-18 05:58:24 -07:00
Olaoluwa Osuntokun
7c2307984d
Merge pull request #1380 from cfromknecht/nursery-rebroadcast
utxonursery: rebroadcast finalized kinder txns on startup
2018-06-15 16:49:58 -07:00
Olaoluwa Osuntokun
2f6ff2666c
Merge pull request #1296 from parakeety/add-tdt
htlcswitch: add basic table driven tests for ExpectedFee
2018-06-15 16:36:40 -07:00
Olaoluwa Osuntokun
aeca4d6def
Merge pull request #1390 from Roasbeef/sorted-closed-channels
rpc: sort closed channels in order of ascending height
2018-06-15 16:02:30 -07:00
Johan T. Halseth
3bdc968f39
breacharbiter: wait on spend events instead of timeout
This commit handles a racy condition within the breacharbiter's justice
tx procedure. For backends that have no mempool we would check if an
HTLC output was spent and then try broadcasting the justice tx, but this
would fail since we wouldn't detect the spend before it was in a block.
The result was that we would continuously attempt to broadcast the
transaction, effectively ending up in an endless (until the second-level
tx actually comfirmed) loop.

Instead we now register for spend notifications in case broadcasting the
transaction fails, and then wait for any of the notifications to be
sent before trying again.

This is a necessary step to be able to make lnd work well only with
confimed transactions, and was a better solution than introducing
timeouts within the broadcast loop (which complicates integration
tests).
2018-06-15 12:11:13 +02:00
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