Commit Graph

186 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
db3819fcef
Merge pull request #5236 from offerm/preimage-to-settleevent
feature: expose preimage in forward+settle event
2021-07-09 14:35:11 -07:00
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
Conner Fromknecht
d6f88cbe6f
lnrpc: allow payment addr override for AMP invoices
This permits an AMP invoice to be "pseudo-reusable", where the invoice
paramters can be used multiple times so long as a new payment address is
supplied. This prevents additional round trips between payer and payee
to obtain a new invoice, even though the payments/invoices won't be
logically associated via the RPC interface like they would when the full
reusable invoices are deployed.
2021-05-28 09:30:05 -07:00
Oliver Gugger
3eb7539de1
lnrpc: fix typos in REST annotations for routerrpc
Fixes #5307.
Corrects some typos in the REST annotations for the routerrpc subserver.
Unfortunately these mistakes aren't caught by the current version of the
grpc-gateway library. But we intend to update to v2 soon which will
output alerts as mentioned in #5307.
2021-05-19 09:48:33 +02:00
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
64d07558d9
lnrpc: set either payHash or setId depending on payreq type 2021-05-10 22:02:14 -07:00
Conner Fromknecht
8c404ade18
routing: allow splitting for AMP or MPP 2021-05-10 22:02:14 -07: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
c4fc72d573
routerrpc+routing: set AMP options for payments specified as AMP in SendPayment 2021-04-27 09:47:23 +02:00
Johan T. Halseth
8f57dcf28f
routerrpc: validate DestFeatures from RPC 2021-04-27 09:47:23 +02:00
Johan T. Halseth
0b9137cdac
lnrpc: add AMP feature bits 2021-04-27 09:47:23 +02:00
Johan T. Halseth
f07c9d002c
routing: use Identifier in place of PaymentHash
Since we want to support AMP payment using a different unique payment
identifier (AMP payments don't go to one specific hash), we change the
nomenclature to be Identifier instead of PaymentHash.
2021-04-27 09:47:23 +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
Conner Fromknecht
352ce10658
lnrpc: add UnmarshalAMP decoding 2021-04-07 12:09:47 -07:00
Conner Fromknecht
00581efec6
lnrpc: add AMPRecord to Hop 2021-04-07 12:09:43 -07:00
Olaoluwa Osuntokun
901c192e9f
lnrpc/routerrpc: use x prefix as REST sub-path for ImportMissionControl
A small change to better indicate that this is a different class of RPCs
on the REST interface.
2021-03-23 16:41:00 -07:00
carla
d0e7164c07
routerrpc: add mission control import 2021-03-18 10:51:45 +02:00
Johan T. Halseth
4ea494e8c5
lnrpc: wrap subservers in GrpcHandler
In order to be able to register the subservers with the root grpc server
before we have all dependencies available, we wrap them in an
GrpcHandler struct. This struct will initially hold an empty reference
to the subservers, which allows us to register with the GRPC server, and
later populate and create the subserver instance.
2021-03-11 13:05:23 +01: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
Conner Fromknecht
8c4e32012e
Merge pull request #5070 from alexbosworth/patch-14
trivial: match newline style
2021-03-05 12:30:20 -08:00
Conner Fromknecht
b121d1da4e
Merge pull request #5078 from carlaKC/fix-comment
lnrpc: correct comment on half life seconds
2021-03-05 12:29:59 -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
Conner Fromknecht
71db3a83bc
lnrpc: expose INVALID_ONION_PAYLOAD via RPC 2021-03-04 15:27:16 -08:00
Alex Bosworth
0e43c8fc4c
trivial: match newline style
Use newline for map key to match other keys
2021-03-03 17:28:21 -08:00
Elliott Jin
6d01f140d9 routerrpc: implement UpdateChanStatus RPC in router server
Update UpdateChanStatus stub implementation to call into exposed
ChanStatusManager methods in RouterBackend.
2021-02-24 07:13:28 -08:00
Elliott Jin
db76b970ac routerrpc: expose SetChannel* methods from Router backend
Allow router RPC requests to call into the ChanStatusManager to
manually update channel state.
2021-02-24 07:13:28 -08: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
7398e59927
lnrpc/routerrpc+routing: add new MaxShardAmt field to LightningPayment 2021-02-15 19:31:49 -08:00
Olaoluwa Osuntokun
c70e53c791
lnrpc/routerrpc: add new max_shard_size_msat field to SendPaymentRequest 2021-02-15 19:31:46 -08:00
Olaoluwa Osuntokun
d5cf6043e6
lnrpc/routerrpc: use new default value of 16 for maxparts
In this commit, we raise the default value for the `MaxParts` field from
1 to 16. This change was motivated by the fact that many users either
forget, or don't even know this field is there in the first place. A
value of 16 was chosen rather arbitraliy (other than power of 2). In
the future, we should tune this value based on the expected number of
payment attempts for a given payment amount.
2021-02-15 19:31:43 -08:00
Johan T. Halseth
0227aaab1f
lnrpc: format protos 2021-02-11 15:06:12 +01:00
Olaoluwa Osuntokun
7b0ea3c029
Merge pull request #4909 from carlaKC/mc-paramsapi
routing: allow runtime updates to mission control config
2021-02-10 18:51:53 -08:00
Olaoluwa Osuntokun
301f1a870e
Merge pull request #4924 from champo/check_payreq_multipart
routerrpc,routing: limit max parts if the invoice doesn't declare MPP support
2021-02-03 16:53:49 -08:00
Joost Jager
0ef0264d28 lnrpc: add htlc attempt id 2021-01-25 17:21:58 +01:00
carla
64dad77e2e
multi: add get and set mission control to routerrpc 2021-01-19 10:57:15 +02:00
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