Commit Graph

23 Commits

Author SHA1 Message Date
eugene
a70d0bef34
multi: validate payment params at RPC layer
With this patch, we'll fail out earlier in the cycle in case of
some wonky parameters, and not leave zombie payments in the router
which currently are not cleaned up.
2021-05-13 17:17:52 -04:00
Conner Fromknecht
352ce10658
lnrpc: add UnmarshalAMP decoding 2021-04-07 12:09:47 -07:00
carla
64dad77e2e
multi: add get and set mission control to routerrpc 2021-01-19 10:57:15 +02:00
Joost Jager
df7a05da84
rpcserver+routerrpc: remove payment limit 2020-05-28 19:34:17 +02:00
Joost Jager
c33d94ff27
routing+routerrpc: add multiple outgoing channel restriction 2020-05-12 07:17:24 +02:00
Joost Jager
5de308c4b5
routerrpc: update final cltv delta default
The default was increased for the main sendpayment RPC in commit
d3fa9767a9729756bab9b4a1121344b265410b1a. This commit sets the
same default for QueryRoutes, routerrpc.SendPayment and
router.EstimateRouteFee.
2020-01-14 21:03:24 +01:00
Joost Jager
81bf6e15b3
routing+lnrpc: add missing query routes parameters 2020-01-14 11:21:31 +01:00
Joost Jager
d02de70d20
multi: do not use tlv.Record outside wire format handling
This commit prepares for more manipulation of custom records. A list of
tlv.Record types is more difficult to use than the more basic
map[uint64][]byte.

Furthermore fields and variables are renamed to make them more
consistent.
2019-12-12 00:14:58 +01:00
Joost Jager
09b3101b80
lnrpc+routerrpc+lncli: add amt and fee limit msat fields 2019-11-13 10:32:35 +01:00
Conner Fromknecht
8cb17d5c1f
lnrpc/routerrpc/router_backend: populate and unmarshal mpp fields
This commit parses mpp_total_amt_msat and mpp_payment_addr from the
SendToRoute rpc and populates an MPP record on the internal hop
reprsentation. When the router goes to encode the onion packet, these
fields will be serialized for the destination. We also populate the mpp
fields when marshalling routes in rpc responses.
2019-11-04 15:11:23 -08:00
Joost Jager
fb57255b5c
routerrpc: add mc probability query rpc
Probabilities are no longer returned for querymc calls. To still provide
some insight into the mission control internals, this commit adds a new
rpc that calculates a success probability estimate for a specific node
pair and amount.
2019-10-29 12:32:19 +01:00
Olaoluwa Osuntokun
763cb6c09d
lnrpc+lnrpc/routerrpc: add a new TLV record field to the Hop proto
In this commit, we add a new field to the Hop proto to allow callers to
be able to specify TLV records for the SendToRoute call, and also to be
able to display TLV records that were used during regular path finding.

We also update SendPayment to support dest TLV records.
2019-08-22 18:53:03 -07:00
Joost Jager
f1769c8c8c
routing: convert to node pair based
Previously mission control tracked failures on a per node, per channel basis.
This commit changes this to tracking on the level of directed node pairs. The goal
of moving to this coarser-grained level is to reduce the number of required
payment attempts without compromising payment reliability.
2019-08-13 19:21:37 +02:00
Joost Jager
7e7b620355
routing: persist mission control data 2019-07-31 08:44:00 +02:00
Joost Jager
fc337cd34f
routing+routerrpc+lnrpc: add option to use mc in queryroutes
A boolean flag is added to the QueryRoutes rpc that allows feeding
mission control probabilities into path finding.
2019-07-18 15:49:29 +02:00
Joost Jager
7133f37bb8
routing: global probability based mission control
Previously every payment had its own local mission control state which
was in effect only for that payment. In this commit most of the local
state is removed and payments all tap into the global mission control
probability estimator.

Furthermore the decay time of pruned edges and nodes is extended, so
that observations about the network can better benefit future payment
processes.

Last, the probability function is transformed from a binary output to a
gradual curve, allowing for a better trade off between candidate routes.
2019-06-04 10:00:25 +02:00
Joost Jager
6b70791c2d
routing: use probability source in path finding
This PR replaces the previously used edge and node ignore lists in path
finding by a probability based system. It modifies path finding so that
it not only compares routes on fee and time lock, but also takes route
success probability into account.

Allowing routes to be compared based on success probability is achieved
by introducing a 'virtual' cost of a payment attempt and using that to
translate probability into another cost factor.
2019-06-04 10:00:21 +02:00
Johan T. Halseth
1df148d8ef
routerrpc test: run make fmt 2019-05-27 12:33:43 +02:00
Johan T. Halseth
15bed506b1
routing/route+multi: remove redundant TotalFees field
Instead get it on demand using method TotalFees().
2019-05-16 23:58:32 +02:00
Joost Jager
7a5bd29a69
lnrpc+routing: remove k shortest path finding 2019-05-07 19:54:06 +02:00
Johan T. Halseth
ee257fd0eb
multi: move Route to sub-pkg routing/route 2019-04-29 14:52:33 +02:00
Johan T. Halseth
f1677e7199
lnrpc/routerrpc: make fmt on router backend test 2019-04-05 17:25:49 +02:00
Joost Jager
293971cd03
routerrpc: move query routes into sub server
This commit moves the query routes backend logic from the main
rpc server into the sub server. It is another step towards splitting up
the main rpc server code.

In addition to this, a unit test is added to verify rpc parameter
parsing.
2019-03-11 09:56:16 +01:00