351 Commits
Author SHA1 Message Date
Conner Fromknecht 6d437117b4 lnrpc: add missing features to FeatureBit enum
- WumboChannels
 - Anchors
 - AnchorsZeroFeeHtlc
2021-01-15 15:23:53 -08:00
Juan Pablo Civile fdd24fc1d6 routerrpc: limit max parts if the invoice doesn't declare MPP support 2021-01-15 14:56:16 -03:00
Olaoluwa Osuntokun b85c92d8d5 lnrpc/routerrpc: add payment addr to SendPaymentRequest
Fixes #4692
2021-01-05 19:04:57 -08:00
Olaoluwa Osuntokun d996607470 routing+lnrpc: extend BuildRoute to accept raw payAddr
In this commit, we extend the `BuildRoute` method and RPC on the router
sub-server to accept a raw payment address which will be included as
part of an MPP payload for the finla hop. This change actually also
allows users to craft their own MPP paths using BuildRoute+SendToRoute.
Our primary goal however, was to fix some broken itests since we now
require the payAddr to be present for ALL payments other than key send
payments.
2020-11-25 16:32:02 -08:00
Olaoluwa Osuntokun c2bba7ed71 Merge pull request #4691 from joostjager/sendtoroute-status-code
routerrpc: map errors to grpc status code
2020-11-11 19:51:45 -08:00
Graham Krizek 5aa0d26251 lnrpc+macaroon: skip subserver macaroons on stateless_init
This will prevent the subservers from writing macaroons to disk
when the stateless_init flag is set to true. It accomplishes
this by storing the StatelessInit value in the Macaroon Service.
2020-11-07 11:24:35 +01:00
Juan Pablo Civile 033c5b7a3f htlcswitch,rpc: expose onion blob for intercepts 2020-10-31 14:09:52 -03:00
Joost Jager 856abade3d routerrpc: map errors to grpc status code
The 'payment already exists' case is common in restart scenarios. With
this commit it is no longer necessary to string-match on the error
message. Implementation is identical to SendPaymentV2.
2020-10-14 16:15:08 +02:00
Joost Jager bbfeeec8b1 routing: add proportional attempt cost 2020-09-08 15:47:08 +02:00
Joost Jager 17a6175e8b routing+routerrpc: rename PaymentAttemptPenalty to AttemptCost
Make field names consistent with the command line flag.
2020-09-08 14:07:56 +02:00
Oliver Gugger d33f87493e routerrpc: pass in probability source 2020-09-04 16:39:52 +02:00
yyforyongyu c8a2916d91 lncli: support list/delete on marcaroon IDs 2020-08-14 12:36:21 +08:00
yyforyongyu c0e2513350 lnrpc+rpcserver: support list/delete on marcaroon IDs 2020-08-14 12:33:13 +08:00
Joost Jager 2903505164 htlcswitch: expose custom records on intercepted packet 2020-06-27 11:00:46 +02:00
Joost Jager 363142de33 htlcswitch: expose additional fields for intercepted packets 2020-06-27 11:00:44 +02:00
Joost Jager 74db43282c htlcswitch: encapsulate exposed packet info 2020-06-27 10:59:08 +02:00
Joost Jager 607927634d routerrpc: remove redundant htlc prefix from proto field
The message name already sets the context to an htlc.
2020-06-27 10:59:06 +02:00
Joost Jager f6f8e3221b routerrpc: clarify proto fields to be outgoing 2020-06-27 10:59:04 +02:00
yyforyongyu 987edc9d81 multi: add a rpc endpoint to track the recovery process 2020-06-25 15:49:54 +08:00
Roei Erez 7b56268f70 rpc: implement RPC htlc interceptor.
In this commit we add the ability to intercept forwarded htlc packets
straight from the RPC layer. The RPC layer handles a bidrectional stream
that comminucates to the client the intercepted packets and handles its
response by coordinating with the interceptable switch.
2020-06-18 15:20:07 +03:00
Oliver Gugger 19e3dc6378 routerrpc: format proto 2020-06-04 08:50:44 +02:00
Oliver Gugger 558d63718b rpcserver+lnrpc: register REST subservers with root server 2020-06-04 08:50:44 +02:00
Oliver Gugger fe16be5bb8 lnrpc: extract or add REST annotations to yaml 2020-06-04 08:50:00 +02:00
Joost Jager df7a05da84 rpcserver+routerrpc: remove payment limit 2020-05-28 19:34:17 +02:00
Joost Jager b6170788ea routerrpc: add SendToRouteV2 that returns an HTLCAttempt message
Unify data structure with SendPayment/ListPayments.
2020-05-12 19:56:54 +02:00
Joost Jager 674c199047 routing: return full htlc attempt from router 2020-05-12 19:56:52 +02:00
Joost Jager 8e7c0757ec routerrpc: expose preimage on the htlc level 2020-05-12 19:56:49 +02:00
Joost Jager c33d94ff27 routing+routerrpc: add multiple outgoing channel restriction 2020-05-12 07:17:24 +02:00
Oliver Gugger 272598a706 lnrpc: generate gateway and swagger for all RPCs 2020-05-08 14:33:59 +02:00
Oliver Gugger 71c58c2c04 lnrpc: replace /// and /** with // and /* 2020-05-08 14:33:34 +02:00
Oliver Gugger 0800386138 lnrpc: unify proto style by moving services to top of file 2020-05-08 14:33:04 +02:00
carla e229717025 lnrpc: add failure detail none to link event rpc 2020-05-04 09:33:25 +02:00
Joost Jager f6b2410011 routing+routerrpc: rename max_shards to max_parts
Don't introduce a new term and align with the P in MPP.
2020-04-22 14:49:19 +02:00
Joost Jager d51bb65536 routerrpc+lncli: add flag to suppress in-flight updates
This is a preparation for enabling the REST interface on routerrpc.
It provides REST clients that don't support server-side streaming
via keep-alive connections to use the streaming endpoint in the
typical request/response pattern. The url just needs to contain
?no_inflight_updates=true and only the terminal response is sent
back before the connection is closed.
2020-04-21 17:02:09 -07:00
Joost Jager 7fe100bcfb routerrpc: bring back legacy track and send rpcs
To soften the transition for routerrpc users to the V2 messages.
2020-04-21 20:37:45 +02:00
Joost Jager d451ef4ee1 routerrpc: rename rpcs to SendPaymentV2 and TrackPaymentV2
The message in the response stream changed. Rename the calls themselves,
to prevent older applications from getting decode errors. Especially
troublesome is the case where the request is executed (send payment),
but the application can't read the outcome (payment sent or not?)
2020-04-21 20:36:58 +02:00
Joost Jager 969eecc7d2 routing+routerrpc+lncli: rename MaxHtlcs to MaxShards 2020-04-14 10:31:59 +02:00
Joost Jager e61ff2202d lnrpc: report total fees paid
Fixes a bug where only the fees of the last route where reported.
2020-04-10 11:05:55 +02:00
Joost Jager 06f73c0a66 lnrpc: remove deprecated payment path
Not applicable anymore on the payment level with multi-part sends.
2020-04-10 11:05:52 +02:00
Olaoluwa Osuntokun 363caa441a rpc: allow wumbo invoices
In this commit, we remove the restriction surrounding the largest
invoices that we'll allow a user to create. After #3967 has landed,
users will be able to send in _aggregate_ a payment larger than the
current max HTLC size limit in the network. As a result, we can just
treat that value as the system's MTU, and allow users to request
payments it multiples of that MTU value.

A follow up to this PR at a later time will also allow wumbo _channels_.
However, that requires us to tweak the way we scale CSV values, as post
wumbo, there is no true channel size limit, only the
_local_ limit of a given node. We also need to implement a way for nodes
to signal to other nodes their accepted max channel size.
2020-04-09 19:02:08 -07:00
Joost Jager e9bd691e6a routerrpc+routing: adapt payment session for multi shard send
Modifies the payment session to launch additional pathfinding attempts
for lower amounts. If a single shot payment isn't possible, the goal is
to try to complete the payment using multiple htlcs. In previous
commits, the payment lifecycle has been prepared to deal with
partial-amount routes returned from the payment session. It will query
for additional shards if needed.

Additionally a new rpc payment parameter is added that controls the
maximum number of shards that will be used for the payment.
2020-04-09 08:20:49 +02:00
Joost Jager af4abe7d58 routing+routerrpc: notify full payment structures
This commit fixes the inconsistency between the payment state as
reported by routerrpc.SendPayment/routerrpc.TrackPayment and the main
rpc ListPayments call.

In addition to that, payment state changes are now sent out for every
state change. This opens the door to user interfaces giving more
feedback to the user about the payment process. This is especially
interesting for multi-part payments.
2020-04-08 09:26:33 +02:00
Joost Jager 351d8e174c lnrpc: expose payment failure reason 2020-04-08 08:53:59 +02:00
Joost Jager 327634e9f7 routerrpc: move payment marshalling 2020-04-08 08:53:57 +02:00
Joost Jager acefb64207 routerrpc: remove payment-level route field
With multi-part payments, a payment-level route field does not make
sense anymore.
2020-03-31 21:41:30 +02:00
Joost Jager ffa7bed7f0 build+routerrpc+lncli: remove routerrpc conditional compilation 2020-03-31 21:41:22 +02:00
Joost Jager e11a3b24d8 lnrpc/routerrpc: rename RoutingConfig file 2020-03-31 21:41:20 +02:00
Joost Jager bc7ee9a7d0 routerrpc: fix empty payment request bug 2020-03-31 21:41:18 +02:00
carla 5516a53728 routerrpc: run rpc-format on routerrpc 2020-03-20 11:11:45 +02:00
carla 0a5b918db2 routerrpc: add htlcnotifier subscription 2020-03-13 09:47:19 +02:00