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.
This commit is contained in:
Olaoluwa Osuntokun 2019-07-30 21:44:02 -07:00
parent 4697cfde30
commit 763cb6c09d
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2
9 changed files with 850 additions and 636 deletions

View File

@ -214,10 +214,15 @@ type SendPaymentRequest struct {
CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
//*
//Optional route hints to reach the destination through private channels.
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,proto3" json:"route_hints,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,proto3" json:"route_hints,omitempty"`
//*
//An optional field that can be used to pass an arbitrary set of TLV records
//to a peer which understands the new records. This can be used to pass
//application specific data during the payment attempt.
DestTlv map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_tlv,json=destTlv,proto3" json:"dest_tlv,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SendPaymentRequest) Reset() { *m = SendPaymentRequest{} }
@ -315,6 +320,13 @@ func (m *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint {
return nil
}
func (m *SendPaymentRequest) GetDestTlv() map[uint64][]byte {
if m != nil {
return m.DestTlv
}
return nil
}
type TrackPaymentRequest struct {
/// The hash of the payment to look up.
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
@ -1171,6 +1183,7 @@ func init() {
proto.RegisterEnum("routerrpc.PaymentState", PaymentState_name, PaymentState_value)
proto.RegisterEnum("routerrpc.Failure_FailureCode", Failure_FailureCode_name, Failure_FailureCode_value)
proto.RegisterType((*SendPaymentRequest)(nil), "routerrpc.SendPaymentRequest")
proto.RegisterMapType((map[uint64][]byte)(nil), "routerrpc.SendPaymentRequest.DestTlvEntry")
proto.RegisterType((*TrackPaymentRequest)(nil), "routerrpc.TrackPaymentRequest")
proto.RegisterType((*PaymentStatus)(nil), "routerrpc.PaymentStatus")
proto.RegisterType((*RouteFeeRequest)(nil), "routerrpc.RouteFeeRequest")
@ -1190,112 +1203,116 @@ func init() {
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
var fileDescriptor_7a0613f69d37b0a5 = []byte{
// 1677 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x4f, 0x77, 0x22, 0xc7,
0x11, 0x37, 0x02, 0x84, 0x28, 0xfe, 0xcd, 0xb6, 0xb4, 0xda, 0x59, 0xb4, 0xb2, 0xe5, 0xb1, 0xb3,
0xd6, 0xdb, 0xe7, 0x48, 0x0e, 0x79, 0xf6, 0xcb, 0x29, 0x79, 0x2c, 0x34, 0xd6, 0xec, 0xc2, 0x8c,
0xdc, 0xc0, 0xda, 0x9b, 0x1c, 0xfa, 0xb5, 0xa0, 0x05, 0xf3, 0x04, 0x33, 0x78, 0xa6, 0x71, 0x56,
0x39, 0xe4, 0x92, 0x97, 0x63, 0xee, 0xf9, 0x16, 0xf9, 0x14, 0x39, 0xe4, 0x8b, 0x24, 0xdf, 0x21,
0xa7, 0xbc, 0xee, 0x9e, 0x81, 0x01, 0xb1, 0x1b, 0x9f, 0x98, 0xfe, 0xd5, 0xaf, 0xab, 0xaa, 0xab,
0xba, 0xaa, 0x0b, 0x38, 0x0e, 0x83, 0xa5, 0x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xe6, 0xd4, 0x57, 0xff, 0xf8,
0x7d, 0xe2, 0x58, 0xdb, 0x18, 0x0e, 0x77, 0x54, 0x34, 0xfa, 0x45, 0xda, 0x83, 0xf7, 0xf6, 0x83,
0xfa, 0xf3, 0xff, 0x47, 0x5b, 0x5b, 0xd9, 0x51, 0xfa, 0x1b, 0x56, 0xde, 0xdf, 0x38, 0x36, 0xac,
0x7c, 0xa0, 0x83, 0xbc, 0xfc, 0xd5, 0xef, 0x2f, 0x27, 0x9e, 0x98, 0x2e, 0x6f, 0x2e, 0x46, 0xc1,
0xfc, 0x72, 0xe6, 0x4d, 0xa6, 0xc2, 0xf7, 0xfc, 0x89, 0xcf, 0xc5, 0x1f, 0x83, 0xf0, 0xee, 0x72,
0xe6, 0x8f, 0x2f, 0xd5, 0x40, 0x7b, 0xb9, 0x52, 0x77, 0xb3, 0xaf, 0xfe, 0x0e, 0xfe, 0xfa, 0x7f,
0x01, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xa6, 0xd9, 0x94, 0x3e, 0x0e, 0x00, 0x00,
// 1736 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x41, 0x73, 0x22, 0xc7,
0x15, 0x36, 0x02, 0x84, 0x78, 0x80, 0x98, 0x6d, 0x69, 0xb5, 0xb3, 0x68, 0x65, 0xcb, 0xd8, 0x59,
0xab, 0xb6, 0x1c, 0xc9, 0x21, 0x65, 0x97, 0xcb, 0x87, 0xa4, 0x58, 0x68, 0xac, 0xd9, 0x85, 0x19,
0xb9, 0x81, 0xb5, 0x37, 0x39, 0x74, 0xb5, 0xa0, 0x05, 0x53, 0x1a, 0x66, 0xf0, 0x4c, 0xa3, 0xac,
0x72, 0xc8, 0x25, 0x95, 0x63, 0xee, 0xf9, 0x17, 0xf9, 0x15, 0x39, 0xe4, 0x8f, 0x24, 0xbf, 0x22,
0x55, 0xa9, 0xee, 0x9e, 0x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df, 0xa7, 0xe4, 0xf9, 0xca, 0x37, 0xfe,
0x92, 0x83, 0x5d, 0xd5, 0x8d, 0x84, 0xe8, 0x12, 0x4a, 0xa9, 0x16, 0x16, 0x9d, 0x7c, 0xb0, 0xb5,
0xad, 0x99, 0xdb, 0xdb, 0xc5, 0x45, 0xf4, 0x55, 0x06, 0xbd, 0x82, 0x72, 0xba, 0x49, 0x45, 0xe9,
0xe6, 0x63, 0x4b, 0xf7, 0xfa, 0x41, 0x5f, 0xaf, 0xc1, 0xc0, 0x91, 0x70, 0x67, 0xb2, 0xd9, 0x88,
0xdb, 0x3f, 0x54, 0x4b, 0xf1, 0x37, 0x7a, 0xca, 0xda, 0xf1, 0x56, 0x5b, 0x5c, 0x27, 0x5d, 0xbd,
0xc5, 0xb8, 0x01, 0x7b, 0xb0, 0xc5, 0xf5, 0xae, 0xaf, 0xf6, 0xf1, 0xfb, 0xcc, 0xb1, 0xb7, 0x31,
0x1c, 0x6c, 0xa9, 0x68, 0xf4, 0x8b, 0x74, 0x04, 0xef, 0xd5, 0x83, 0xda, 0xf3, 0xff, 0x45, 0x5b,
0xad, 0xb2, 0xa5, 0xf4, 0xd7, 0x56, 0x79, 0xbf, 0x70, 0xac, 0xad, 0xf2, 0x01, 0x05, 0x79, 0xf9,
0xab, 0xdf, 0x5d, 0x4c, 0x5c, 0x31, 0x5d, 0x5c, 0x9f, 0x8f, 0x82, 0xd9, 0x85, 0xe7, 0x4e, 0xa6,
0xc2, 0x77, 0xfd, 0x89, 0xcf, 0xc5, 0x1f, 0x82, 0xf0, 0xf6, 0xc2, 0xf3, 0xc7, 0x17, 0xaa, 0xa1,
0xbd, 0x58, 0xba, 0xbb, 0xde, 0x55, 0xff, 0x48, 0x7f, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
0x54, 0xde, 0xd4, 0xfd, 0xc1, 0x0e, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -63,6 +63,13 @@ message SendPaymentRequest {
Optional route hints to reach the destination through private channels.
*/
repeated lnrpc.RouteHint route_hints = 10 [json_name = "route_hints"];
/**
An optional field that can be used to pass an arbitrary set of TLV records
to a peer which understands the new records. This can be used to pass
application specific data during the payment attempt.
*/
map<uint64, bytes> dest_tlv = 11;
}
message TrackPaymentRequest {

View File

@ -14,6 +14,7 @@ import (
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/tlv"
"github.com/lightningnetwork/lnd/zpay32"
context "golang.org/x/net/context"
)
@ -40,6 +41,7 @@ type RouterBackend struct {
// routes.
FindRoute func(source, target route.Vertex,
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
destTlvRecords []tlv.Record,
finalExpiry ...uint16) (*route.Route, error)
MissionControl MissionControl
@ -188,6 +190,15 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
fromNode, toNode, amt,
)
},
DestPayloadTLV: len(in.DestTlv) != 0,
}
// If we have any TLV records destined for the final hop, then we'll
// attempt to decode them now into a form that the router can more
// easily manipulate.
destTlvRecords, err := tlv.MapToRecords(in.DestTlv)
if err != nil {
return nil, err
}
// Query the channel router for a possible path to the destination that
@ -201,11 +212,12 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
if in.FinalCltvDelta == 0 {
route, findErr = r.FindRoute(
sourcePubKey, targetPubKey, amtMSat, restrictions,
destTlvRecords,
)
} else {
route, findErr = r.FindRoute(
sourcePubKey, targetPubKey, amtMSat, restrictions,
uint16(in.FinalCltvDelta),
destTlvRecords, uint16(in.FinalCltvDelta),
)
}
if findErr != nil {
@ -214,8 +226,10 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
// For each valid route, we'll convert the result into the format
// required by the RPC system.
rpcRoute := r.MarshallRoute(route)
rpcRoute, err := r.MarshallRoute(route)
if err != nil {
return nil, err
}
routeResp := &lnrpc.QueryRoutesResponse{
Routes: []*lnrpc.Route{rpcRoute},
@ -266,7 +280,7 @@ func calculateFeeLimit(feeLimit *lnrpc.FeeLimit,
}
// MarshallRoute marshalls an internal route to an rpc route struct.
func (r *RouterBackend) MarshallRoute(route *route.Route) *lnrpc.Route {
func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error) {
resp := &lnrpc.Route{
TotalTimeLock: route.TotalTimeLock,
TotalFees: int64(route.TotalFees().ToSatoshis()),
@ -290,6 +304,11 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) *lnrpc.Route {
chanCapacity = incomingAmt.ToSatoshis()
}
tlvMap, err := tlv.RecordsToMap(hop.TLVRecords)
if err != nil {
return nil, err
}
resp.Hops[i] = &lnrpc.Hop{
ChanId: hop.ChannelID,
ChanCapacity: int64(chanCapacity),
@ -301,11 +320,13 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) *lnrpc.Route {
PubKey: hex.EncodeToString(
hop.PubKeyBytes[:],
),
TlvRecords: tlvMap,
TlvPayload: !hop.LegacyPayload,
}
incomingAmt = hop.AmtToForward
}
return resp
return resp, nil
}
// UnmarshallHopByChannelLookup unmarshalls an rpc hop for which the pub key is
@ -331,11 +352,18 @@ func (r *RouterBackend) UnmarshallHopByChannelLookup(hop *lnrpc.Hop,
return nil, fmt.Errorf("channel edge does not match expected node")
}
tlvRecords, err := tlv.MapToRecords(hop.TlvRecords)
if err != nil {
return nil, err
}
return &route.Hop{
OutgoingTimeLock: hop.Expiry,
AmtToForward: lnwire.MilliSatoshi(hop.AmtToForwardMsat),
PubKeyBytes: pubKeyBytes,
ChannelID: hop.ChanId,
TLVRecords: tlvRecords,
LegacyPayload: !hop.TlvPayload,
}, nil
}
@ -351,11 +379,21 @@ func UnmarshallKnownPubkeyHop(hop *lnrpc.Hop) (*route.Hop, error) {
var pubKeyBytes [33]byte
copy(pubKeyBytes[:], pubKey)
var tlvRecords []tlv.Record
if hop.TlvRecords != nil {
tlvRecords, err = tlv.MapToRecords(hop.TlvRecords)
if err != nil {
return nil, err
}
}
return &route.Hop{
OutgoingTimeLock: hop.Expiry,
AmtToForward: lnwire.MilliSatoshi(hop.AmtToForwardMsat),
PubKeyBytes: pubKeyBytes,
ChannelID: hop.ChanId,
TLVRecords: tlvRecords,
LegacyPayload: !hop.TlvPayload,
}, nil
}
@ -435,6 +473,16 @@ func (r *RouterBackend) extractIntentFromSendRequest(
return nil, errors.New("timeout_seconds must be specified")
}
if len(rpcPayReq.DestTlv) != 0 {
var err error
payIntent.FinalDestRecords, err = tlv.MapToRecords(
rpcPayReq.DestTlv,
)
if err != nil {
return nil, err
}
}
payIntent.PayAttemptTimeout = time.Second *
time.Duration(rpcPayReq.TimeoutSeconds)

View File

@ -10,6 +10,7 @@ import (
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/tlv"
"github.com/lightningnetwork/lnd/lnrpc"
)
@ -77,6 +78,7 @@ func testQueryRoutes(t *testing.T, useMissionControl bool) {
findRoute := func(source, target route.Vertex,
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
_ []tlv.Record,
finalExpiry ...uint16) (*route.Route, error) {
if int64(amt) != request.Amt*1000 {

View File

@ -249,7 +249,7 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
s.cfg.RouterBackend.SelfNode, destNode, amtMsat,
&routing.RestrictParams{
FeeLimit: feeLimit,
},
}, nil,
)
if err != nil {
return nil, err
@ -550,9 +550,12 @@ func (s *Server) trackPayment(paymentHash lntypes.Hash,
status.State = PaymentState_SUCCEEDED
status.Preimage = result.Preimage[:]
status.Route = router.MarshallRoute(
status.Route, err = router.MarshallRoute(
result.Route,
)
if err != nil {
return err
}
} else {
state, err := marshallFailureReason(
result.FailureReason,
@ -562,9 +565,12 @@ func (s *Server) trackPayment(paymentHash lntypes.Hash,
}
status.State = state
if result.Route != nil {
status.Route = router.MarshallRoute(
status.Route, err = router.MarshallRoute(
result.Route,
)
if err != nil {
return err
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -883,6 +883,13 @@ message SendRequest {
maximum enforced.
*/
uint32 cltv_limit = 10;
/**
An optional field that can be used to pass an arbitrary set of TLV records
to a peer which understands the new records. This can be used to pass
application specific data during the payment attempt.
*/
map<uint64, bytes> dest_tlv = 11;
}
message SendResponse {
@ -1665,6 +1672,14 @@ message QueryRoutesRequest {
A list of directed node pairs that will be ignored during path finding.
*/
repeated NodePair ignored_pairs = 10;
/**
An optional field that can be used to pass an arbitrary set of TLV records
to a peer which understands the new records. This can be used to pass
application specific data during the payment attempt. If the destination
does not support the specified recrods, and error will be returned.
*/
map<uint64, bytes> dest_tlv = 11;
}
message NodePair {
@ -1711,6 +1726,20 @@ message Hop {
can be executed without relying on a copy of the channel graph.
*/
string pub_key = 8 [json_name = "pub_key"];
/**
If set to true, then this hop will be encoded using the new variable length
TLV format. Note that if any custom tlv_records below are specified, then
this field MUST be set to true for them to be encoded properly.
*/
bool tlv_payload = 9 [json_name = "tlv_payload"];
/**
An optional set of key-value TLV records. This is useful within the context
of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
to drop off at each hop within the onion.
*/
map<uint64, bytes> tlv_records = 10 [json_name = "tlv_records"];
}
/**

View File

@ -2305,6 +2305,19 @@
"pub_key": {
"type": "string",
"description": "*\nAn optional public key of the hop. If the public key is given, the payment\ncan be executed without relying on a copy of the channel graph."
},
"tlv_payload": {
"type": "boolean",
"format": "boolean",
"description": "* \nIf set to true, then this hop will be encoded using the new variable length\nTLV format. Note that if any custom tlv_records below are specified, then\nthis field MUST be set to true for them to be encoded properly."
},
"tlv_records": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "byte"
},
"description": "*\nAn optional set of key-value TLV records. This is useful within the context\nof the SendToRoute call as it allows callers to specify arbitrary K-V pairs\nto drop off at each hop within the onion."
}
}
},
@ -3286,6 +3299,14 @@
"type": "integer",
"format": "int64",
"description": "* \nAn optional maximum total time lock for the route. If zero, there is no\nmaximum enforced."
},
"dest_tlv": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "byte"
},
"description": "* \nAn optional field that can be used to pass an arbitrary set of TLV records\nto a peer which understands the new records. This can be used to pass\napplication specific data during the payment attempt."
}
}
},

View File

@ -17,6 +17,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/tlv"
"github.com/lightningnetwork/lnd/watchtower"
"github.com/btcsuite/btcd/blockchain"
@ -2926,6 +2927,8 @@ type rpcPaymentIntent struct {
outgoingChannelID *uint64
payReq []byte
destTLV []tlv.Record
route *route.Route
}
@ -2968,6 +2971,16 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
payIntent.cltvLimit = &rpcPayReq.CltvLimit
}
if len(rpcPayReq.DestTlv) != 0 {
var err error
payIntent.destTLV, err = tlv.MapToRecords(
rpcPayReq.DestTlv,
)
if err != nil {
return payIntent, err
}
}
// If the payment request field isn't blank, then the details of the
// invoice are encoded entirely within the encoded payReq. So we'll
// attempt to decode it, populating the payment accordingly.
@ -3123,6 +3136,7 @@ func (r *rpcServer) dispatchPaymentIntent(
OutgoingChannelID: payIntent.outgoingChannelID,
PaymentRequest: payIntent.payReq,
PayAttemptTimeout: routing.DefaultPayAttemptTimeout,
FinalDestRecords: payIntent.destTLV,
}
preImage, route, routerErr = r.server.chanRouter.SendPayment(
@ -3293,10 +3307,16 @@ func (r *rpcServer) sendPayment(stream *paymentStream) error {
return
}
marshalledRouted := r.routerBackend.
MarshallRoute(resp.Route)
backend := r.routerBackend
marshalledRouted, err := backend.MarshallRoute(
resp.Route,
)
if err != nil {
errChan <- err
return
}
err := stream.send(&lnrpc.SendResponse{
err = stream.send(&lnrpc.SendResponse{
PaymentHash: payIntent.rHash[:],
PaymentPreimage: resp.Preimage[:],
PaymentRoute: marshalledRouted,
@ -3375,10 +3395,15 @@ func (r *rpcServer) sendPaymentSync(ctx context.Context,
}, nil
}
rpcRoute, err := r.routerBackend.MarshallRoute(resp.Route)
if err != nil {
return nil, err
}
return &lnrpc.SendResponse{
PaymentHash: payIntent.rHash[:],
PaymentPreimage: resp.Preimage[:],
PaymentRoute: r.routerBackend.MarshallRoute(resp.Route),
PaymentRoute: rpcRoute,
}, nil
}