From fb57255b5c62a064c6f87565ed8c5ba805fd14a4 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 27 Sep 2019 11:43:12 +0200 Subject: [PATCH] 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. --- cmd/lncli/cmd_query_probability.go | 70 +++++ cmd/lncli/routerrpc_active.go | 1 + lnrpc/routerrpc/router.pb.go | 391 +++++++++++++++++-------- lnrpc/routerrpc/router.proto | 25 ++ lnrpc/routerrpc/router_backend.go | 5 + lnrpc/routerrpc/router_backend_test.go | 6 + lnrpc/routerrpc/router_server.go | 31 ++ routing/missioncontrol.go | 20 ++ 8 files changed, 430 insertions(+), 119 deletions(-) create mode 100644 cmd/lncli/cmd_query_probability.go diff --git a/cmd/lncli/cmd_query_probability.go b/cmd/lncli/cmd_query_probability.go new file mode 100644 index 00000000..139a228f --- /dev/null +++ b/cmd/lncli/cmd_query_probability.go @@ -0,0 +1,70 @@ +// +build routerrpc + +package main + +import ( + "context" + "fmt" + "strconv" + + "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/lnrpc/routerrpc" + "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/routing/route" + "github.com/urfave/cli" +) + +var queryProbCommand = cli.Command{ + Name: "queryprob", + Category: "Payments", + Usage: "Estimate a success probability.", + ArgsUsage: "from-node to-node amt", + Action: actionDecorator(queryProb), +} + +func queryProb(ctx *cli.Context) error { + args := ctx.Args() + + if len(args) != 3 { + return cli.ShowCommandHelp(ctx, "queryprob") + } + + fromNode, err := route.NewVertexFromStr(args.Get(0)) + if err != nil { + return fmt.Errorf("invalid from node key: %v", err) + } + + toNode, err := route.NewVertexFromStr(args.Get(1)) + if err != nil { + return fmt.Errorf("invalid to node key: %v", err) + } + + amtSat, err := strconv.ParseUint(args.Get(2), 10, 64) + if err != nil { + return fmt.Errorf("invalid amt: %v", err) + } + + amtMsat := lnwire.NewMSatFromSatoshis( + btcutil.Amount(amtSat), + ) + + conn := getClientConn(ctx, false) + defer conn.Close() + + client := routerrpc.NewRouterClient(conn) + + req := &routerrpc.QueryProbabilityRequest{ + FromNode: fromNode[:], + ToNode: toNode[:], + AmtMsat: int64(amtMsat), + } + rpcCtx := context.Background() + response, err := client.QueryProbability(rpcCtx, req) + if err != nil { + return err + } + + printJSON(response) + + return nil +} diff --git a/cmd/lncli/routerrpc_active.go b/cmd/lncli/routerrpc_active.go index 4d217267..f8903d80 100644 --- a/cmd/lncli/routerrpc_active.go +++ b/cmd/lncli/routerrpc_active.go @@ -8,6 +8,7 @@ import "github.com/urfave/cli" func routerCommands() []cli.Command { return []cli.Command{ queryMissionControlCommand, + queryProbCommand, resetMissionControlCommand, buildRouteCommand, } diff --git a/lnrpc/routerrpc/router.pb.go b/lnrpc/routerrpc/router.pb.go index a718eb4b..08675d58 100644 --- a/lnrpc/routerrpc/router.pb.go +++ b/lnrpc/routerrpc/router.pb.go @@ -1161,6 +1161,113 @@ func (m *PairData) GetLastAttemptSuccessful() bool { return false } +type QueryProbabilityRequest struct { + /// The source node pubkey of the pair. + FromNode []byte `protobuf:"bytes,1,opt,name=from_node,proto3" json:"from_node,omitempty"` + /// The destination node pubkey of the pair. + ToNode []byte `protobuf:"bytes,2,opt,name=to_node,proto3" json:"to_node,omitempty"` + /// The amount for which to calculate a probability. + AmtMsat int64 `protobuf:"varint,3,opt,name=amt_msat,proto3" json:"amt_msat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryProbabilityRequest) Reset() { *m = QueryProbabilityRequest{} } +func (m *QueryProbabilityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProbabilityRequest) ProtoMessage() {} +func (*QueryProbabilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{15} +} + +func (m *QueryProbabilityRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryProbabilityRequest.Unmarshal(m, b) +} +func (m *QueryProbabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryProbabilityRequest.Marshal(b, m, deterministic) +} +func (m *QueryProbabilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProbabilityRequest.Merge(m, src) +} +func (m *QueryProbabilityRequest) XXX_Size() int { + return xxx_messageInfo_QueryProbabilityRequest.Size(m) +} +func (m *QueryProbabilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProbabilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProbabilityRequest proto.InternalMessageInfo + +func (m *QueryProbabilityRequest) GetFromNode() []byte { + if m != nil { + return m.FromNode + } + return nil +} + +func (m *QueryProbabilityRequest) GetToNode() []byte { + if m != nil { + return m.ToNode + } + return nil +} + +func (m *QueryProbabilityRequest) GetAmtMsat() int64 { + if m != nil { + return m.AmtMsat + } + return 0 +} + +type QueryProbabilityResponse struct { + /// The success probability for the requested pair. + Probability float64 `protobuf:"fixed64,1,opt,name=probability,proto3" json:"probability,omitempty"` + /// The historical data for the requested pair. + History *PairData `protobuf:"bytes,2,opt,name=history,proto3" json:"history,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryProbabilityResponse) Reset() { *m = QueryProbabilityResponse{} } +func (m *QueryProbabilityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProbabilityResponse) ProtoMessage() {} +func (*QueryProbabilityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{16} +} + +func (m *QueryProbabilityResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryProbabilityResponse.Unmarshal(m, b) +} +func (m *QueryProbabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryProbabilityResponse.Marshal(b, m, deterministic) +} +func (m *QueryProbabilityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProbabilityResponse.Merge(m, src) +} +func (m *QueryProbabilityResponse) XXX_Size() int { + return xxx_messageInfo_QueryProbabilityResponse.Size(m) +} +func (m *QueryProbabilityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProbabilityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProbabilityResponse proto.InternalMessageInfo + +func (m *QueryProbabilityResponse) GetProbability() float64 { + if m != nil { + return m.Probability + } + return 0 +} + +func (m *QueryProbabilityResponse) GetHistory() *PairData { + if m != nil { + return m.History + } + return nil +} + type BuildRouteRequest struct { //* //The amount to send expressed in msat. If set to zero, the minimum routable @@ -1187,7 +1294,7 @@ func (m *BuildRouteRequest) Reset() { *m = BuildRouteRequest{} } func (m *BuildRouteRequest) String() string { return proto.CompactTextString(m) } func (*BuildRouteRequest) ProtoMessage() {} func (*BuildRouteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7a0613f69d37b0a5, []int{15} + return fileDescriptor_7a0613f69d37b0a5, []int{17} } func (m *BuildRouteRequest) XXX_Unmarshal(b []byte) error { @@ -1249,7 +1356,7 @@ func (m *BuildRouteResponse) Reset() { *m = BuildRouteResponse{} } func (m *BuildRouteResponse) String() string { return proto.CompactTextString(m) } func (*BuildRouteResponse) ProtoMessage() {} func (*BuildRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7a0613f69d37b0a5, []int{16} + return fileDescriptor_7a0613f69d37b0a5, []int{18} } func (m *BuildRouteResponse) XXX_Unmarshal(b []byte) error { @@ -1296,6 +1403,8 @@ func init() { proto.RegisterType((*QueryMissionControlResponse)(nil), "routerrpc.QueryMissionControlResponse") proto.RegisterType((*PairHistory)(nil), "routerrpc.PairHistory") proto.RegisterType((*PairData)(nil), "routerrpc.PairData") + proto.RegisterType((*QueryProbabilityRequest)(nil), "routerrpc.QueryProbabilityRequest") + proto.RegisterType((*QueryProbabilityResponse)(nil), "routerrpc.QueryProbabilityResponse") proto.RegisterType((*BuildRouteRequest)(nil), "routerrpc.BuildRouteRequest") proto.RegisterType((*BuildRouteResponse)(nil), "routerrpc.BuildRouteResponse") } @@ -1303,123 +1412,128 @@ func init() { func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) } var fileDescriptor_7a0613f69d37b0a5 = []byte{ - // 1843 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x41, 0x73, 0x22, 0xc7, - 0x15, 0xf6, 0x08, 0x10, 0xf0, 0x00, 0x69, 0xd4, 0x92, 0xb5, 0x2c, 0x5a, 0x79, 0x65, 0xec, 0xd8, - 0xaa, 0xad, 0xb5, 0xb4, 0x21, 0x65, 0xd7, 0x96, 0x0f, 0x49, 0xb1, 0xd0, 0x58, 0xa3, 0x85, 0x19, - 0x6d, 0x03, 0x6b, 0x6f, 0x72, 0xe8, 0xea, 0x85, 0x96, 0x98, 0xd2, 0x30, 0x83, 0x67, 0x1a, 0x65, - 0x95, 0x43, 0xaa, 0x72, 0x4f, 0xae, 0xf9, 0x0b, 0xb9, 0xe4, 0x96, 0x3f, 0x92, 0x5f, 0x91, 0xfc, - 0x82, 0xdc, 0x53, 0xdd, 0x3d, 0x03, 0x83, 0x84, 0x36, 0x39, 0x89, 0xfe, 0xde, 0xf7, 0x5e, 0xf7, - 0xbc, 0xf7, 0xfa, 0xeb, 0x27, 0xd8, 0x0f, 0x83, 0xb9, 0xe0, 0x61, 0x38, 0x1b, 0x9d, 0xea, 0x5f, - 0x27, 0xb3, 0x30, 0x10, 0x01, 0x2a, 0x2e, 0xf0, 0x5a, 0x31, 0x9c, 0x8d, 0x34, 0x5a, 0xff, 0x53, - 0x16, 0x50, 0x9f, 0xfb, 0xe3, 0x0b, 0x76, 0x3b, 0xe5, 0xbe, 0x20, 0xfc, 0xe7, 0x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- 0x6c, 0x60, 0x7e, 0x22, 0x97, 0xfd, 0x61, 0xab, 0x85, 0x71, 0x1b, 0xb7, 0x4d, 0x43, 0xea, 0x9c, - 0x94, 0x2c, 0xdc, 0xa6, 0x03, 0xab, 0x87, 0x9d, 0xa1, 0x7c, 0x01, 0x77, 0x61, 0x3b, 0xc6, 0x6c, - 0x87, 0x12, 0x67, 0x38, 0xc0, 0x66, 0x06, 0x99, 0x50, 0x8e, 0x41, 0x4c, 0x88, 0x43, 0xcc, 0xac, - 0x94, 0xed, 0x18, 0xb9, 0xff, 0x9a, 0x26, 0x8f, 0x6d, 0xae, 0xf1, 0xcf, 0x2c, 0x6c, 0xaa, 0x03, - 0x86, 0xe8, 0x0c, 0x4a, 0xa9, 0x41, 0x1c, 0x1d, 0x7e, 0x74, 0x40, 0xaf, 0x55, 0xd7, 0x0f, 0xbd, - 0xf3, 0xe8, 0x85, 0x81, 0xce, 0xa1, 0x9c, 0x1e, 0xb5, 0x51, 0x7a, 0x84, 0x5a, 0x33, 0x83, 0x7f, - 0x34, 0xd6, 0x6b, 0x30, 0x71, 0x24, 0xdc, 0xa9, 0x1c, 0x99, 0xe2, 0x21, 0x16, 0xd5, 0x52, 0xfc, - 0x3b, 0x93, 0x71, 0xed, 0x60, 0xad, 0x2d, 0xae, 0x50, 0x57, 0x7f, 0x62, 0x3c, 0x46, 0xde, 0xfb, - 0xc4, 0xd5, 0xd9, 0xb5, 0xf6, 0xd9, 0x43, 0xe6, 0x38, 0xda, 0x18, 0x76, 0xd7, 0xe8, 0x0c, 0xfa, - 0x45, 0xfa, 0x04, 0x0f, 0xaa, 0x54, 0xed, 0xab, 0xff, 0x45, 0x5b, 0xee, 0xb2, 0x46, 0x90, 0x56, - 0x76, 0x79, 0x58, 0xce, 0x56, 0x76, 0xf9, 0x98, 0xae, 0x59, 0x00, 0xcb, 0x8e, 0x46, 0x4f, 0x52, - 0x5e, 0xf7, 0x6e, 0x64, 0xed, 0xf0, 0x01, 0xab, 0x0e, 0xf5, 0xea, 0x97, 0xbf, 0x3d, 0xbd, 0x72, - 0xc5, 0x64, 0xfe, 0xfe, 0x64, 0x14, 0x4c, 0x4f, 0x3d, 0x39, 0x1b, 0xfa, 0xae, 0x7f, 0xe5, 0x73, - 0xf1, 0xfb, 0x20, 0xbc, 0x3e, 0xf5, 0xfc, 0xf1, 0xa9, 0xba, 0x18, 0xa7, 0x8b, 0x28, 0xef, 0x37, - 0xd5, 0xbf, 0xe9, 0xbf, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x33, 0xcc, 0xf1, 0xd6, - 0x0f, 0x00, 0x00, + // 1931 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0x4f, 0x73, 0x22, 0xc7, + 0x15, 0xf7, 0x08, 0x10, 0xf0, 0x00, 0x69, 0xd4, 0x92, 0xb5, 0xb3, 0x48, 0xf2, 0xca, 0xb3, 0x8e, + 0xad, 0xda, 0x5a, 0x4b, 0x1b, 0x52, 0x76, 0x6d, 0xf9, 0x90, 0x14, 0x0b, 0x83, 0x35, 0x5a, 0x18, + 0xb4, 0x0d, 0xac, 0xbd, 0xf1, 0xa1, 0xab, 0x05, 0x2d, 0x31, 0xa5, 0x61, 0x06, 0xcf, 0x34, 0x9b, + 0x55, 0x0e, 0xa9, 0xca, 0x3d, 0xb9, 0xe6, 0x2b, 0xe4, 0x92, 0x9c, 0xf2, 0x9d, 0x92, 0x4f, 0x90, + 0x7b, 0xaa, 0xbb, 0x67, 0x60, 0x40, 0x68, 0x9d, 0x93, 0xe8, 0xdf, 0x7b, 0xfd, 0xfa, 0xf5, 0xfb, + 0xf3, 0xeb, 0x37, 0x82, 0xfd, 0x30, 0x98, 0x71, 0x16, 0x86, 0xd3, 0xe1, 0x99, 0xfa, 0x75, 0x3a, + 0x0d, 0x03, 0x1e, 0xa0, 0xe2, 0x1c, 0xaf, 0x16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, 0x91, 0xf9, 0x5b, 0xd8, 0x96, 0xeb, 0x16, 0x63, 0x1f, 0xab, 0xdc, + 0x47, 0x90, 0xa7, 0x13, 0x55, 0x02, 0xaa, 0x7a, 0x37, 0xe9, 0x44, 0x64, 0xdf, 0x1c, 0x81, 0xbe, + 0xd8, 0x1f, 0x4d, 0x03, 0x3f, 0x62, 0xa2, 0x62, 0x85, 0x71, 0x51, 0x10, 0xa2, 0x7a, 0x26, 0x62, + 0x97, 0x26, 0x77, 0x6d, 0xc5, 0x78, 0x8b, 0xb1, 0x4e, 0x44, 0x39, 0xfa, 0x52, 0x15, 0x22, 0xf1, + 0x82, 0xe1, 0xad, 0x28, 0x6d, 0x7a, 0x17, 0x9b, 0xaf, 0x08, 0xb8, 0x1d, 0x0c, 0x6f, 0x9b, 0x02, + 0x34, 0x7f, 0x52, 0x2d, 0xd6, 0x0f, 0x94, 0xef, 0xff, 0x77, 0x78, 0x17, 0x21, 0xd8, 0x78, 0x38, + 0x04, 0x04, 0x76, 0x97, 0x8c, 0xc7, 0xb7, 0x48, 0x47, 0x56, 0x5b, 0x89, 0xec, 0x73, 0xc8, 0x5f, + 0x53, 0xd7, 0x9b, 0x85, 0x89, 0x61, 0x94, 0x4a, 0x53, 0x4b, 0x49, 0x70, 0xa2, 0x62, 0xfe, 0x37, + 0x0f, 0xf9, 0x18, 0x44, 0x35, 0xc8, 0x0e, 0x83, 0x51, 0x92, 0xdd, 0xcf, 0xee, 0x6f, 0x4b, 0xfe, + 0x36, 0x82, 0x11, 0xc3, 0x52, 0x17, 0xfd, 0x0e, 0xb6, 0x44, 0x63, 0xf9, 0xcc, 0x23, 0xb3, 0xe9, + 0x88, 0xce, 0x13, 0x6a, 0xa4, 0x76, 0x37, 0x94, 0xc2, 0x40, 0xca, 0x71, 0x65, 0x98, 0x5e, 0xa2, + 0x03, 0x28, 0x8e, 0xb9, 0x37, 0x54, 0x99, 0xc8, 0xca, 0x82, 0x2e, 0x08, 0x40, 0xe6, 0xc0,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, 0x4a, 0x8f, 0x87, 0x6b, 0xbe, 0x2f, 0x3e, 0x6a, 0xeb, 0x35, 0xe8, 0x56, 0xc4, 0xdd, 0x89, + 0x18, 0x07, 0xe3, 0x01, 0x1d, 0x55, 0x53, 0xfa, 0x2b, 0x53, 0x7f, 0xf5, 0x60, 0xad, 0x2c, 0xce, + 0x50, 0x5b, 0x5d, 0x31, 0x1e, 0x91, 0xef, 0x5d, 0x71, 0x79, 0x2e, 0xaf, 0x7e, 0xf6, 0x90, 0x38, + 0xb6, 0x36, 0x82, 0xdd, 0x35, 0x1c, 0x8a, 0x7e, 0x95, 0xf6, 0xe0, 0x41, 0x06, 0xae, 0x7e, 0xf9, + 0x4b, 0x6a, 0x8b, 0x53, 0xd6, 0x90, 0xed, 0xd2, 0x29, 0x0f, 0x53, 0xf5, 0xd2, 0x29, 0x1f, 0xe3, + 0xec, 0x9f, 0x40, 0x5f, 0x6d, 0x74, 0x64, 0xae, 0xee, 0xbd, 0x4f, 0x3a, 0xd5, 0xa7, 0x1f, 0xd5, + 0x89, 0x8d, 0xdb, 0x00, 0x8b, 0x76, 0x41, 0x87, 0xa9, 0x2d, 0xf7, 0xda, 0xbd, 0x7a, 0xf4, 0x80, + 0x54, 0x99, 0x7a, 0xf5, 0xeb, 0xdf, 0x9f, 0xdd, 0xb8, 0x7c, 0x3c, 0xbb, 0x3a, 0x1d, 0x06, 0x93, + 0x33, 0x4f, 0x0c, 0xd5, 0xbe, 0xeb, 0xdf, 0xf8, 0x8c, 0xff, 0x21, 0x08, 0x6f, 0xcf, 0x3c, 0x7f, + 0x74, 0x26, 0xbb, 0xee, 0x6c, 0x6e, 0xe5, 0x6a, 0x53, 0xfe, 0x7f, 0xe3, 0x37, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0x1d, 0x08, 0x9a, 0xb8, 0x0f, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1461,6 +1575,10 @@ type RouterClient interface { //It is a development feature. QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error) //* + //QueryProbability returns the current success probability estimate for a + //given node pair and amount. + QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error) + //* //BuildRoute builds a fully specified route based on a list of hop public //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. @@ -1575,6 +1693,15 @@ func (c *routerClient) QueryMissionControl(ctx context.Context, in *QueryMission return out, nil } +func (c *routerClient) QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error) { + out := new(QueryProbabilityResponse) + err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryProbability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *routerClient) BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error) { out := new(BuildRouteResponse) err := c.cc.Invoke(ctx, "/routerrpc.Router/BuildRoute", in, out, opts...) @@ -1613,6 +1740,10 @@ type RouterServer interface { //It is a development feature. QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error) //* + //QueryProbability returns the current success probability estimate for a + //given node pair and amount. + QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error) + //* //BuildRoute builds a fully specified route based on a list of hop public //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. @@ -1737,6 +1868,24 @@ func _Router_QueryMissionControl_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Router_QueryProbability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProbabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterServer).QueryProbability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/routerrpc.Router/QueryProbability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterServer).QueryProbability(ctx, req.(*QueryProbabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Router_BuildRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BuildRouteRequest) if err := dec(in); err != nil { @@ -1775,6 +1924,10 @@ var _Router_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryMissionControl", Handler: _Router_QueryMissionControl_Handler, }, + { + MethodName: "QueryProbability", + Handler: _Router_QueryProbability_Handler, + }, { MethodName: "BuildRoute", Handler: _Router_BuildRoute_Handler, diff --git a/lnrpc/routerrpc/router.proto b/lnrpc/routerrpc/router.proto index f7df3dc2..8b2d2c22 100644 --- a/lnrpc/routerrpc/router.proto +++ b/lnrpc/routerrpc/router.proto @@ -367,6 +367,25 @@ message PairData { bool last_attempt_successful = 3 [json_name = "last_attempt_successful"]; } +message QueryProbabilityRequest{ + /// The source node pubkey of the pair. + bytes from_node = 1 [json_name = "from_node"]; + + /// The destination node pubkey of the pair. + bytes to_node = 2 [json_name = "to_node"]; + + /// The amount for which to calculate a probability. + int64 amt_msat = 3 [json_name = "amt_msat"]; +} + +message QueryProbabilityResponse{ + /// The success probability for the requested pair. + double probability = 1 [json_name = "probability"]; + + /// The historical data for the requested pair. + PairData history = 2 [json_name = "history"]; +} + message BuildRouteRequest { /** The amount to send expressed in msat. If set to zero, the minimum routable @@ -440,6 +459,12 @@ service Router { */ rpc QueryMissionControl(QueryMissionControlRequest) returns (QueryMissionControlResponse); + /** + QueryProbability returns the current success probability estimate for a + given node pair and amount. + */ + rpc QueryProbability(QueryProbabilityRequest) returns (QueryProbabilityResponse); + /** BuildRoute builds a fully specified route based on a list of hop public keys. It retrieves the relevant channel policies from the graph in order to diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go index 5a036383..99942b0d 100644 --- a/lnrpc/routerrpc/router_backend.go +++ b/lnrpc/routerrpc/router_backend.go @@ -76,6 +76,11 @@ type MissionControl interface { // GetHistorySnapshot takes a snapshot from the current mission control // state and actual probability estimates. GetHistorySnapshot() *routing.MissionControlSnapshot + + // GetPairHistorySnapshot returns the stored history for a given node + // pair. + GetPairHistorySnapshot(fromNode, + toNode route.Vertex) routing.TimedPairResult } // QueryRoutes attempts to query the daemons' Channel Router for a possible diff --git a/lnrpc/routerrpc/router_backend_test.go b/lnrpc/routerrpc/router_backend_test.go index 329200dc..48e5b8fd 100644 --- a/lnrpc/routerrpc/router_backend_test.go +++ b/lnrpc/routerrpc/router_backend_test.go @@ -174,3 +174,9 @@ func (m *mockMissionControl) ResetHistory() error { func (m *mockMissionControl) GetHistorySnapshot() *routing.MissionControlSnapshot { return nil } + +func (m *mockMissionControl) GetPairHistorySnapshot(fromNode, + toNode route.Vertex) routing.TimedPairResult { + + return routing.TimedPairResult{} +} diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index 6503a861..ac11dcf3 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -68,6 +68,10 @@ var ( Entity: "offchain", Action: "read", }}, + "/routerrpc.Router/QueryProbability": {{ + Entity: "offchain", + Action: "read", + }}, "/routerrpc.Router/ResetMissionControl": {{ Entity: "offchain", Action: "write", @@ -503,6 +507,33 @@ func toRPCPairData(data *routing.TimedPairResult) *PairData { return &rpcData } +// QueryProbability returns the current success probability estimate for a +// given node pair and amount. +func (s *Server) QueryProbability(ctx context.Context, + req *QueryProbabilityRequest) (*QueryProbabilityResponse, error) { + + fromNode, err := route.NewVertexFromBytes(req.FromNode) + if err != nil { + return nil, err + } + + toNode, err := route.NewVertexFromBytes(req.ToNode) + if err != nil { + return nil, err + } + + amt := lnwire.MilliSatoshi(req.AmtMsat) + + mc := s.cfg.RouterBackend.MissionControl + prob := mc.GetProbability(fromNode, toNode, amt) + history := mc.GetPairHistorySnapshot(fromNode, toNode) + + return &QueryProbabilityResponse{ + Probability: prob, + History: toRPCPairData(&history), + }, nil +} + // TrackPayment returns a stream of payment state updates. The stream is // closed when the payment completes. func (s *Server) TrackPayment(request *TrackPaymentRequest, diff --git a/routing/missioncontrol.go b/routing/missioncontrol.go index c772e0fc..cebac51c 100644 --- a/routing/missioncontrol.go +++ b/routing/missioncontrol.go @@ -355,6 +355,26 @@ func (m *MissionControl) GetHistorySnapshot() *MissionControlSnapshot { return &snapshot } +// GetPairHistorySnapshot returns the stored history for a given node pair. +func (m *MissionControl) GetPairHistorySnapshot( + fromNode, toNode route.Vertex) TimedPairResult { + + m.Lock() + defer m.Unlock() + + results, ok := m.lastPairResult[fromNode] + if !ok { + return TimedPairResult{} + } + + result, ok := results[toNode] + if !ok { + return TimedPairResult{} + } + + return result +} + // ReportPaymentFail reports a failed payment to mission control as input for // future probability estimates. The failureSourceIdx argument indicates the // failure source. If it is nil, the failure source is unknown. This function