lnd.xprv/routing
Olaoluwa Osuntokun f494433cbf
routing+server: add new QueryBandwidth method to reduce outbound failures
In this commit, we introduce a new method to the channel router's config
struct: QueryBandwidth. This method allows the channel router to query
for the up-to-date available bandwidth of a particular link. In the case
that this link emanates from/to us, then we can query the switch to see
if the link is active (if not bandwidth is zero), and return the current
best estimate for the available bandwidth of the link. If the link,
isn't one of ours, then we can thread through the total maximal
capacity of the link.

In order to implement this, the missionControl struct will now query the
switch upon creation to obtain a fresh bandwidth snapshot. We take care
to do this in a distinct db transaction in order to now introduced a
circular waiting condition between the mutexes in bolt, and the channel
state machine.

The aim of this change is to reduce the number of unnecessary failures
during HTLC payment routing as we'll now skip any links that are
inactive, or just don't have enough bandwidth for the payment. Nodes
that have several hundred channels (all of which in various states of
activity and available bandwidth) should see a nice gain from this w.r.t
payment latency.
2018-05-14 16:23:54 -07:00
..
chainview routing/chainview/neutrino: cache filter entries 2018-05-08 20:46:46 -07:00
testdata routing: add new vertex and to new channels to basic_graph.json 2018-03-23 17:55:15 -07:00
errors.go multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
graph.go routing: rewrite package to conform to BOLT07 and factor in fees+timelocks 2016-12-27 16:44:22 -08:00
heap_test.go routing: correct recent type change in heap_test.go 2018-02-12 16:44:42 -08:00
heap.go routing: weight findPath more heavily towards fees during edge relaxation 2018-02-12 16:27:38 -08:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
missioncontrol.go routing+server: add new QueryBandwidth method to reduce outbound failures 2018-05-14 16:23:54 -07:00
notifications_test.go routing: update package to account for recent channeldb API changes 2018-02-06 20:14:32 -08:00
notifications.go routing: update package to account for recent channeldb API changes 2018-02-06 20:14:32 -08:00
pathfind_test.go routing+server: add new QueryBandwidth method to reduce outbound failures 2018-05-14 16:23:54 -07:00
pathfind.go routing+server: add new QueryBandwidth method to reduce outbound failures 2018-05-14 16:23:54 -07:00
README.md multi: fix formatting issues in packge README's 2017-03-27 16:25:25 -07:00
router_test.go routing+server: add new QueryBandwidth method to reduce outbound failures 2018-05-14 16:23:54 -07:00
router.go routing+server: add new QueryBandwidth method to reduce outbound failures 2018-05-14 16:23:54 -07:00
validation_barrier_test.go routing/validation_barrier_test: test semaphore and quit 2018-05-08 16:32:08 -07:00
validation_barrier.go routing/validation_barrier: adds ErrVBarrierShuttingDown 2018-05-08 16:32:08 -07:00

routing

Build Status MIT licensed GoDoc

The routing package implements authentication+validation of channel announcements, pruning of the channel graph, path finding within the network, sending outgoing payments into the network and synchronizing new peers to our channel graph state.

Installation and Updating

$ go get -u github.com/lightningnetwork/lnd/routing