lnd.xprv/routing
Joost Jager d9ec158412
routing: stricter payment result interpretation
This commit overhauls the interpretation of failed payments. It changes
the interpretation rules so that we always apply the strongest possible
set of penalties, without making assumptions that would hurt good nodes.

Main changes are:

- Apply different rule sets for intermediate and final nodes. Both types
of nodes have different sets of failures that we expect. Penalize nodes
that send unexpected failure messages.

- Distinguish between direct payments and multi-hop payments. For direct
payments, we can infer more about the performance of our peer because we
trust ourselves.

- In many cases it is impossible for the sender to determine which of
the two nodes in a pair is responsible for the failure. In this
situation, we now penalize bidirectionally. This does not hurt the good
node of the pair, because only its connection to a bad node is
penalized.

- Previously we always penalized the outgoing connection of the
reporting node. This is incorrect for policy related failures. For
policy related failures, it could also be that the reporting node
received a wrongly crafted htlc from its predecessor. By penalizing the
incoming channel, we surely hit the responsible node.

- FailExpiryTooSoon is a failure that could have been caused by any node
up to the reporting node by delaying forwarding of the htlc. We don't
know which node is responsible, therefore we now penalize all node pairs
in the route.
2019-08-17 10:24:09 +02:00
..
chainview multi: update build to latest version of neutrino+btcwallet 2019-03-13 15:03:39 -07:00
route routing/route: add vertex constructor from bytes 2019-08-13 18:45:08 +02:00
testdata routing: update test edge policy fields to include max htlc + new flags 2019-03-01 08:05:27 -08:00
ann_validation.go routing: skip max htlc validation when capacity is 0 2019-04-18 21:57:38 -07:00
conf_experimental.go routing/conf: add experimental assume valid conf 2018-09-03 20:15:18 -07:00
conf.go routing/conf: add experimental assume valid conf 2018-09-03 20:15:18 -07:00
control_tower_test.go channeldb: add subscription to control tower 2019-06-05 12:41:49 +02:00
control_tower.go routing+routerrpc+channeldb: return route on invalid payment details 2019-07-04 09:27:16 +02:00
errors.go routing: return ErrRejected if found in reject cache 2018-08-23 07:40:40 +02: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: add index map to distanceHeap 2019-07-12 06:08:01 -04:00
heap.go routing: add index map to distanceHeap 2019-07-12 06:08:01 -04:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
missioncontrol_store_test.go multi: rename FailUnknownPaymentHash to FailIncorrectDetails 2019-08-08 11:04:17 +02:00
missioncontrol_store.go routing: persist mission control data 2019-07-31 08:44:00 +02:00
missioncontrol_test.go routing: convert to node pair based 2019-08-13 19:21:37 +02:00
missioncontrol.go routing: isolate failure interpretation from mission control 2019-08-17 10:23:59 +02:00
mock_test.go routing: convert to nillable failure reason 2019-08-17 10:23:57 +02:00
nodepair.go routing: extended DirectedNodePair functionality 2019-08-13 18:45:06 +02:00
notifications_test.go routing: add color to node update 2019-05-23 10:52:12 +02:00
notifications.go routing: add color to node update 2019-05-23 10:52:12 +02:00
pathfind_test.go routing: convert to node pair based 2019-08-13 19:21:37 +02:00
pathfind.go routing: convert to node pair based 2019-08-13 19:21:37 +02:00
payment_lifecycle.go routing: convert to nillable failure reason 2019-08-17 10:23:57 +02:00
payment_session_source.go routing: query bandwidth hints before each payment attempt 2019-08-17 10:24:07 +02:00
payment_session_test.go routing: query bandwidth hints before each payment attempt 2019-08-17 10:24:07 +02:00
payment_session.go routing: query bandwidth hints before each payment attempt 2019-08-17 10:24:07 +02:00
README.md multi: fix formatting issues in packge README's 2017-03-27 16:25:25 -07:00
result_interpretation_test.go routing: stricter payment result interpretation 2019-08-17 10:24:09 +02:00
result_interpretation.go routing: stricter payment result interpretation 2019-08-17 10:24:09 +02:00
router_test.go routing/test: do not test local channel mission control 2019-08-17 10:24:01 +02:00
router.go routing: convert to nillable failure reason 2019-08-17 10:23:57 +02:00
stats.go routing/router: log aggregate graph processing stats 2019-06-13 18:18:30 -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 multi: move Route to sub-pkg routing/route 2019-04-29 14:52:33 +02: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