Commit Graph

72 Commits

Author SHA1 Message Date
offerm
2c4dbfa19f feature: expose preimage in forward+settle event
Until now, clients of SubscribeHTLCEvents didn't have access to the settled preimage. The API allows to intercept forward event and to be updated on forward events however the forward+settle event does not include the payment preimage. This pr changes allows it.
2021-06-15 22:01:24 +03:00
Andras Banki-Horvath
e5f249ad51
mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Johan T. Halseth
6104d12cf8
routerrpc: add amp bool to SendPayment
For now this is how you indicate you want to perform an AMP payment to
the destination.
2021-04-27 09:47:23 +02:00
carla
d0e7164c07
routerrpc: add mission control import 2021-03-18 10:51:45 +02:00
Olaoluwa Osuntokun
65b0bbcd53
Merge pull request #5033 from robot-dreams/set-channel-status
Add lncli command / RPC for manually setting channel state
2021-03-09 18:12:08 -08:00
carla
cd1a8b2d3a
lnrpc: correct comment on half life seconds
Field is not a unix timestamp, it's just number of seconds.
2021-03-05 16:26:02 +02:00
Elliott Jin
4e4f4bc194 routerrpc: add UpdateChanStatus RPC to Router service
Update router.proto and rest-annotations.yaml, recompile protos,
add a stub implementation to routerrpc.Server.
2021-02-24 07:13:28 -08:00
Olaoluwa Osuntokun
c70e53c791
lnrpc/routerrpc: add new max_shard_size_msat field to SendPaymentRequest 2021-02-15 19:31:46 -08:00
carla
64dad77e2e
multi: add get and set mission control to routerrpc 2021-01-19 10:57:15 +02: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
Juan Pablo Civile
033c5b7a3f htlcswitch,rpc: expose onion blob for intercepts 2020-10-31 14:09:52 -03: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
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
fe16be5bb8
lnrpc: extract or add REST annotations to yaml 2020-06-04 08:50:00 +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
c33d94ff27
routing+routerrpc: add multiple outgoing channel restriction 2020-05-12 07:17:24 +02:00
Oliver Gugger
71c58c2c04
lnrpc: replace /// and /** with // and /* 2020-05-08 14:33:34 +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
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
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
carla
0a5b918db2
routerrpc: add htlcnotifier subscription 2020-03-13 09:47:19 +02:00
Joost Jager
6aab6c0bac
routerrpc+lnrpc: move htlc failure messages
In a later commit, htlc raw failure messages will be exposed through the
main rpc. This is a preparation for that.
2020-03-09 11:43:32 +01:00
Oliver Gugger
1b543f0d50
routerrpc: format router.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:07 +01:00
Carsten Otto
a908a74acb Fix typos 2020-01-17 21:18:20 +00:00
carla
b6f546503a
routerrpc: add MppTimeout code to failures 2019-12-20 13:02:19 +02:00
Conner Fromknecht
e6db31f267
routerrpc: allow dest_features graph fallback 2019-12-19 16:28:57 -08:00
Conner Fromknecht
457fda6095
routerrpc: add dest_features to SendPaymentRequest 2019-12-18 23:57:23 -08:00
Joost Jager
352334d470
lnrpc: re-enable custom records
This commit also renames the rpc field for consistency. As it wasn't
functional and the id doesn't change, this isn't considered a breaking
change.
2019-12-04 13:27:33 +01:00
Joost Jager
97344af8f3
routing: local balance check 2019-12-04 09:45:07 +01:00
Joost Jager
2d19201ede
lnrpc+routerrpc+lncli: add allow_self_payments safety flag 2019-11-26 10:15:46 +01:00
Joost Jager
cdf1aa5bc1
routing: track amt ranges in mc 2019-11-22 11:17:28 +01:00
Joost Jager
62f8cca75b
routing+routerrpc: also expose amt for success results in mc 2019-11-22 11:17:26 +01:00
Conner Fromknecht
68916eb4b7
routerrpc: add HTLCAttempts to PaymentStatus 2019-11-19 20:42:38 -08:00
Joost Jager
f28941c7e4
routing+routerrpc+lncli: enable last hop restriction for payments 2019-11-18 21:03:03 +01:00
Joost Jager
09b3101b80
lnrpc+routerrpc+lncli: add amt and fee limit msat fields 2019-11-13 10:32:35 +01: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
Joost Jager
04e7c98461
routerrpc: create pair data proto message
With a separate proto message, it becomes possible to also return the
pair data for a single pair. This prepares for the new mc probability
querying rpc.
2019-10-29 12:32:17 +01:00
Joost Jager
fab13900e2
routing+routerrpc: remove probability estimates from mc state snapshot
Probability estimates are amount dependent. Previously we assumed an
amount, but that starts to make less sense when we make probability more
dependent on amounts in the future.
2019-10-22 15:52:36 +02:00
Daniel McNally
f437b35fc6
lnrpc: set JS_STRING option for chan_id
This sets the `jstype` option to `JS_STRING` for all `chan_id` fields
in the proto rpc definition. `chan_id` is a 64 bit integer, which is
not natively supported by javascript's floating-point `number` with
only 52 bit precision. Nevertheless, by default protobuf will use the
`number` type for 64 bit integer fields in javascript, which can cause
loss of precision problems with `chan_id`. Explicitly setting the type
for javascript as a string will prevent these issues, and should not
interfere with its use as an identifier.
2019-10-14 14:53:54 -04:00