Commit Graph

7119 Commits

Author SHA1 Message Date
Johan T. Halseth
59e3390f6c
Merge pull request #2750 from cryptagoras/patch-1
htlcswitch/switch: log target node on insufficient cap error
2019-03-27 15:10:08 +01:00
Johan T. Halseth
9d8e67d81e
autopilot/prefattach: count small channels negatively
Decrease scores of nodes having a large number of small channels.
2019-03-27 15:06:30 +01:00
Johan T. Halseth
d6d66e631a
rpcserver: calculate and populate medianChanSizeSat in NetworkInfo 2019-03-27 15:06:30 +01:00
Johan T. Halseth
f96dbd2377
lnrpc: add median_channel_size to NetworkInfo 2019-03-27 15:06:30 +01:00
Johan T. Halseth
6860ad9ac6
autopilot: add Median method 2019-03-27 15:06:30 +01:00
Joost Jager
6b6dd30aa7
routerrpc: register router sub server logger 2019-03-27 11:44:49 +01:00
Johan T. Halseth
4d8100cc9a
Merge pull request #2640 from joostjager/cltv-limit
routing: add cltv limit
2019-03-27 10:05:02 +01:00
Olaoluwa Osuntokun
d736454599
Merge pull request #2831 from philippgille/patch-3
docs/MAKEFILE: Remove mention of dep and Glide
2019-03-26 20:54:38 -07:00
Olaoluwa Osuntokun
6d3f0551b5
Merge pull request #2828 from philippgille/patch-2
docs: fix typo
2019-03-26 20:53:41 -07:00
Olaoluwa Osuntokun
07c0dbb199
Merge pull request #2806 from wpaulino/txnotifier-hint-logs
chainntnfs: fix RegisterSpend height hint logs
2019-03-26 20:53:01 -07:00
Olaoluwa Osuntokun
9a3c42fb52
build: update btcwallet to latest version
In this commit, we update the `btcwallet` dep to the latest version that
includes a fix related to zero conf spends. Before this new version, if
a single output was spent multiple time by conflicting transactions,
then upon removing them all after a new transaction confirms, a number
of zero conf UTXOs could be left over.
2019-03-26 20:49:43 -07:00
Olaoluwa Osuntokun
b935f69a6e
Merge pull request #2819 from cfromknecht/peer-write-retry
peer: catch write timeouts, retry with backoff
2019-03-26 18:44:30 -07:00
Wilmer Paulino
bde417e2ef
chainntnfs: fix RegisterSpend and RegisterConf height hint logs 2019-03-26 18:13:02 -07:00
Conner Fromknecht
c5365160fb
server: wrap peer connection tiebreaking to 80 chars 2019-03-26 16:41:30 -07:00
Conner Fromknecht
7358535725
peer+server: log pubkey@addr 2019-03-26 16:41:13 -07:00
Conner Fromknecht
60467bef7b
lncfg/workers: bump default read/write workers from 16 -> 100
Bumps the default read and write handlers to be well
above the average number of peers a node has. Since
the worker counts specify only a maximum number of
concurrent read/write workers, it is expected that
the actual usage would converge to the requirements
of the node anyway. However, in preparation for a
major release, this is a conservative measure to
ensure that the default values aren't too low and
improve network instability.
2019-03-26 16:40:57 -07:00
Conner Fromknecht
93e56f9ee8
peer: add symmetric write idle timeout
In this commit, we add a 5 minute idle timer to
the write handler. After catching the write
timeouts, it's been observed that some connections
have trouble reading a message for several hours.
This typically points to a deeper issue w/ the peer
or, e.g. the remote peer switched networks. This now
mirrors the idle timeout used in the read handler,
such that we will disconnect a peer if we are unable
to send or receive a message from the peer after 5
minutes.

We also modify the readHandler to drain its
idleTimer's channel in the even that the timer had
already fired, but we successfully sent the message.
2019-03-26 16:40:41 -07:00
Conner Fromknecht
b78e5f6742
peer: reduce write timeout to 5 seconds
This commit reduces the peer's write timeout to 5s.
Now that the peer catches write timeouts and doesn't
disconnect, this will ensure we spend less time blocking
in the write pool in case others also need to access the
workers concurrently. Slower peers will now only block
for 5s, after every reattempt w/ exponential backoff.
2019-03-26 16:40:24 -07:00
Conner Fromknecht
99150b41d6
peer: retry writes with delay on timeout errors
This commit modifies the writeHandler to catch timeout
errors, and retry writes to the socket after a small
backoff, which increases exponentially from 5s to 1m.
With the growing channel graph size, some lower-powered
devices can be slow to pull messages off the wire during
validation. The current behavior will cause us to
disconnect the peer, and resend all of the messages that
the remote peer is slow to validate. Catching the timeout
helps in preventing such expensive reconnection cycles,
especially as the network continues to grow.

This is also a preliminary step to reducing the
write timeout constant. This will allow concurrent usage
of the write pools w/out devoting excessive amounts of
time blocking the pool for slow peers.
2019-03-26 16:40:07 -07:00
Olaoluwa Osuntokun
1a8e4b0316
Merge pull request #2058 from roeierez/fix_reconnect
Reconnect to peer when switching networks
2019-03-26 16:13:21 -07:00
Philipp Gillé
58a86011cc
docs: fix broken TOC in Tor docs
- Remove TOC entries of removed docs sections
- Add hint about complete inbound connection docs section after command
  examples for inbound connections to prevent people from overseeing the
  listen=localhost flag
2019-03-26 19:26:46 +01:00
Joost Jager
cd535b9401
link: increase expiry grace delta
This commit increase the expiry grace delta to a value above the
broadcast delta. This prevents htlcs from being accepted that would
immediately trigger a channel force close.

A correct delta is generated in server.go where there is access to
the broadcast delta and passed via the peer to the links.

Co-authored-by: Jim Posen <jim.posen@gmail.com>
2019-03-26 18:42:00 +01:00
Joost Jager
e6fbbaa1dc
link: also check expiry grace delta for forwarded htlcs
Previously there was no minimum remaining blocks requirement on
forwarded htlcs, which may cause channel arbitrator to force
close the channel directly after forwarding the htlc.

Co-authored-by: Jim Posen <jim.posen@gmail.com>
2019-03-26 18:41:41 +01:00
Jim Posen
d107627145
contractcourt: remove broadcastRedeemMultiplier
The multiplier doesn't make sense because funds may be equally at risk
by failing to broadcast to chain regardless of whether the HTLC is a
redeem or a timeout.
2019-03-26 14:31:51 +01:00
cryptagoras
a50428ca96 htlcswitch/switch: log target node on insufficient cap error 2019-03-25 18:25:58 +02:00
Philipp Gillé
449707d90a
docs/MAKEFILE: Remove mention of dep and Glide
Commit ca28c0b removed the dep section,
so it shouldn't be mentioned as a target in other targets.
Also, Glide doesn't seem to be used anymore as well.
2019-03-24 13:28:51 +01:00
Ondrej Calda
7fe2f9e2a5
rpcserver: correct avg degree in GetNetworkInfo
Average degree of graph is calculated as twice the number of edges devided by number of vertices
2019-03-24 13:22:15 +01:00
Philipp Gille
dd3f48eda5 docs: update contribution checklist
- Update Go version 1.11 to 1.12
- Fix broken link in GitHub PR template
- Fix inconsistent number of spaces after checkbox
- Add proper link to "Ideal Git Commit structure"
2019-03-24 11:37:57 +01:00
Philipp Gillé
8b568296df
docs: fix typo 2019-03-23 17:03:40 +01:00
Olaoluwa Osuntokun
6ad8be25e1
Merge pull request #2773 from Roasbeef/graph-batch
channeldb: convert all Update calls to use Batch
2019-03-22 15:05:28 -07:00
Wilmer Paulino
c0977c95df
rpcserver: retrieve Channel ChanId from OpenChannel record
This is a better alternative than retrieving it from the graph as it's
possible that the channel is pruned from it doing to not having any
updates within the past two weeks.
2019-03-22 12:25:31 -07:00
Olaoluwa Osuntokun
c7ca387a9d
Merge pull request #2744 from cfromknecht/disable-before-close
cnct+chancloser: disable channel before closing
2019-03-21 21:08:23 -07:00
Olaoluwa Osuntokun
e58fa33ab0
Merge pull request #2590 from Crypt-iQ/init_message_payload_fix
lnwire: features "maxAllowedSize" fix
2019-03-21 20:58:29 -07:00
Olaoluwa Osuntokun
6440f39120
Merge pull request #2794 from halseth/autopilot-query-heuristic-no-active-agent
autopilot: move queryHeuristic out of agent
2019-03-21 20:20:51 -07:00
Olaoluwa Osuntokun
5ee40df54c
Merge pull request #2765 from cfromknecht/brar-handle-tower-sweep
breacharbiter: watch for spends on all inputs until reaching terminal states
2019-03-21 20:10:24 -07:00
Olaoluwa Osuntokun
15c9b389fa
Merge pull request #2781 from joostjager/fix-routerrpc
routerrpc: adapt to changed interfaces of routing subsystem
2019-03-21 19:28:26 -07:00
Olaoluwa Osuntokun
9fc4335ba0
Merge pull request #2790 from alexbosworth/patch-11
README: remove testnet3 specificity
2019-03-21 16:07:07 -07:00
Joost Jager
73efc31177
build: add routerrpc tag in itest 2019-03-21 10:25:58 +01:00
Joost Jager
087de7cc4d
routerrpc: adapt to changed interfaces of routing subsystem 2019-03-21 10:25:55 +01:00
Olaoluwa Osuntokun
9f6a1403e9
Merge pull request #2804 from Roasbeef/update-btcwallet-itest-deadlock
build: update btcwallet to version with deadlock fix
2019-03-20 20:29:27 -07:00
Olaoluwa Osuntokun
8e3a8f2d01
watchtower/wtclient: fix linter issue 2019-03-20 19:36:59 -07:00
Olaoluwa Osuntokun
c48790ff89 build: update to latest btcwallet with deadlock bug fix, neutrino bump 2019-03-20 19:36:50 -07:00
Olaoluwa Osuntokun
9143067014
Merge pull request #2779 from cfromknecht/wtserver-delete-session
watchtower/wtserver: add DeleteSession request
2019-03-19 22:01:17 -07:00
Conner Fromknecht
0c519778a1
watchtower/wtserver/server_test: add TestServerDeleteSession 2019-03-19 19:41:17 -07:00
Conner Fromknecht
3564406dc1
watchtower/wtserver/server_test: cleanup test framework, remove test case indexes 2019-03-19 19:38:57 -07:00
Conner Fromknecht
26adf735c4
watchtower/wtserver: add DeleteSession handler 2019-03-19 19:38:46 -07:00
Conner Fromknecht
8e4a20e1a5
watchtower/wtserver/interface: add DeleteSession + mock impl 2019-03-19 19:38:34 -07:00
Conner Fromknecht
25b2a352cb
watchtower/wtserver: refactor server handlers into own files 2019-03-19 19:38:20 -07:00
Conner Fromknecht
3d934d0978
watchtower/wtwire: add DeleteSession and DeleteSessionReply message 2019-03-19 19:38:09 -07:00
Conner Fromknecht
9523b420bc
breacharbiter_test: add table-driven breach spend tests 2019-03-19 19:25:57 -07:00