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.
This commit is contained in:
Olaoluwa Osuntokun 2020-11-23 20:17:16 -08:00
parent 530059f18b
commit d996607470
No known key found for this signature in database
GPG Key ID: 3BBD59E99B280306
7 changed files with 272 additions and 201 deletions

@ -1143,7 +1143,9 @@ type BuildRouteRequest struct {
//
//A list of hops that defines the route. This does not include the source hop
//pubkey.
HopPubkeys [][]byte `protobuf:"bytes,4,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"`
HopPubkeys [][]byte `protobuf:"bytes,4,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"`
// An optional payment addr to be included within the last hop of the route.
PaymentAddr []byte `protobuf:"bytes,5,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1202,6 +1204,13 @@ func (m *BuildRouteRequest) GetHopPubkeys() [][]byte {
return nil
}
func (m *BuildRouteRequest) GetPaymentAddr() []byte {
if m != nil {
return m.PaymentAddr
}
return nil
}
type BuildRouteResponse struct {
//
//Fully specified route that can be used to execute the payment.
@ -2028,170 +2037,171 @@ func init() {
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
var fileDescriptor_7a0613f69d37b0a5 = []byte{
// 2601 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4d, 0x73, 0xdb, 0xc6,
0xf9, 0x0f, 0x48, 0x88, 0x22, 0x1f, 0xbe, 0x08,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x08, 0x53, 0x51, 0xcf, 0x23, 0x86, 0x88, 0x47, 0x5d, 0xd5, 0x73, 0x49,
0x89, 0x5a, 0x52, 0xb8, 0x1c, 0x8f, 0x69, 0x18, 0xca, 0x59, 0x36, 0x24, 0x45, 0x61, 0x62, 0xa2,
0x87, 0xb0, 0x15, 0x51, 0xa2, 0xb9, 0x72, 0x32, 0x5e, 0x15, 0xac, 0xa6, 0x6b, 0x82, 0x91, 0xe4,
0xcd, 0x57, 0x1d, 0xa4, 0xb2, 0x22, 0xf2, 0x49, 0xe5, 0xe2, 0x1b, 0xbf, 0x86, 0x3d, 0xe1, 0xca,
0x41, 0xe0, 0x5f, 0xd8, 0x17, 0x8e, 0xeb, 0xb0, 0xeb, 0x28, 0xc8, 0xf9, 0xc2, 0x03, 0x7f, 0x4e,
0xf8, 0xde, 0x46, 0x2e, 0xe0, 0x40, 0xcf, 0x9f, 0x50, 0xee, 0x02, 0xe6, 0x4b, 0x91, 0x72, 0x01,
0xf3, 0x85, 0x20, 0xd9, 0x79, 0xb3, 0xa9, 0xce, 0xdb, 0xb8, 0x82, 0xea, 0xed, 0xb9, 0x54, 0xcc,
0xd4, 0xa1, 0xb8, 0x58, 0xc1, 0x62, 0x3a, 0x0d, 0x27, 0xa1, 0xa4, 0x6f, 0x33, 0x6f, 0xf6, 0x6d,
0xe3, 0x0f, 0x1a, 0x6c, 0x1f, 0x2f, 0x1d, 0x77, 0x92, 0x4a, 0xdc, 0xa4, 0x75, 0x5a, 0xfa, 0x5c,
// 2615 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4b, 0x77, 0xdb, 0xc6,
0xf5, 0x0f, 0x48, 0x8a, 0x22, 0x2f, 0x1f, 0x82, 0x46, 0x8a, 0xc5, 0x3f, 0x65, 0x27, 0x0c, 0x93,
0xd8, 0x3c, 0xfe, 0x27, 0xb2, 0xa2, 0xf6, 0xb4, 0x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x2f, 0xf2, 0xe2, 0xef, 0x23, 0x3f, 0xfa, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02,
0x24, 0x31, 0xa7, 0x4f, 0x19, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

@ -394,6 +394,9 @@ message BuildRouteRequest {
pubkey.
*/
repeated bytes hop_pubkeys = 4;
// An optional payment addr to be included within the last hop of the route.
bytes payment_addr = 5;
}
message BuildRouteResponse {

@ -832,6 +832,11 @@
"format": "byte"
},
"description": "A list of hops that defines the route. This does not include the source hop\npubkey."
},
"payment_addr": {
"type": "string",
"format": "byte",
"description": "An optional payment addr to be included within the last hop of the route."
}
}
},

@ -564,9 +564,17 @@ func (s *Server) BuildRoute(ctx context.Context,
outgoingChan = &req.OutgoingChanId
}
var payAddr *[32]byte
if len(req.PaymentAddr) != 0 {
var backingPayAddr [32]byte
copy(backingPayAddr[:], req.PaymentAddr)
payAddr = &backingPayAddr
}
// Build the route and return it to the caller.
route, err := s.cfg.Router.BuildRoute(
amt, hops, outgoingChan, req.FinalCltvDelta,
amt, hops, outgoingChan, req.FinalCltvDelta, payAddr,
)
if err != nil {
return nil, err

@ -27,6 +27,7 @@ var (
type interceptorTestCase struct {
amountMsat int64
payAddr []byte
invoice *lnrpc.Invoice
shouldHold bool
interceptorAction routerrpc.ResolveHoldForwardAction
@ -105,7 +106,9 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
defer wg.Done()
for _, tc := range testCases {
attempt, err := testContext.sendAliceToCarolPayment(
context.Background(), tc.invoice.ValueMsat, tc.invoice.RHash)
context.Background(), tc.invoice.ValueMsat,
tc.invoice.RHash, tc.payAddr,
)
if t.t.Failed() {
return
@ -118,7 +121,8 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
// For 'fail' interceptor action we make sure the payment failed.
case routerrpc.ResolveHoldForwardAction_FAIL:
if attempt.Status != lnrpc.HTLCAttempt_FAILED {
t.t.Errorf("expected payment to fail, instead got %v", attempt.Status)
t.t.Errorf("expected payment to fail, "+
"instead got %v", attempt.Status)
}
// For settle and resume we make sure the payment is successful.
@ -127,7 +131,8 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
case routerrpc.ResolveHoldForwardAction_RESUME:
if attempt.Status != lnrpc.HTLCAttempt_SUCCEEDED {
t.t.Errorf("expected payment to succeed, instead got %v", attempt.Status)
t.t.Errorf("expected payment to "+
"succeed, instead got %v", attempt.Status)
}
}
}
@ -202,7 +207,9 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
foundPayment.Status != lnrpc.Payment_IN_FLIGHT {
t.Fatalf("expected to find in flight payment for"+
"amount %v, %v", testCase.invoice.ValueMsat, foundPayment.Status)
"amount %v, %v",
testCase.invoice.ValueMsat,
foundPayment.Status)
}
}
}
@ -294,12 +301,25 @@ func (c *interceptorTestContext) prepareTestCases() (
if err != nil {
return nil, fmt.Errorf("unable to add invoice: %v", err)
}
// We'll need to also decode the returned invoice so we can
// grab the payment address which is now required for ALL
// payments.
payReq, err := c.carol.DecodePayReq(context.Background(), &lnrpc.PayReqString{
PayReq: invoice.PaymentRequest,
})
if err != nil {
return nil, fmt.Errorf("unable to decode invoice: %v", err)
}
t.invoice = invoice
t.payAddr = payReq.PaymentAddr
}
return cases, nil
}
func (c *interceptorTestContext) openChannel(from, to *lntest.HarnessNode, chanSize btcutil.Amount) {
func (c *interceptorTestContext) openChannel(from, to *lntest.HarnessNode,
chanSize btcutil.Amount) {
ctxb := context.Background()
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
@ -365,10 +385,14 @@ func (c *interceptorTestContext) waitForChannels() {
// sendAliceToCarolPayment sends a payment from alice to carol and make an
// attempt to pay. The lnrpc.HTLCAttempt is returned.
func (c *interceptorTestContext) sendAliceToCarolPayment(ctx context.Context,
amtMsat int64, paymentHash []byte) (*lnrpc.HTLCAttempt, error) {
amtMsat int64,
paymentHash, paymentAddr []byte) (*lnrpc.HTLCAttempt, error) {
// Build a route from alice to carol.
route, err := c.buildRoute(ctx, amtMsat, []*lntest.HarnessNode{c.bob, c.carol})
route, err := c.buildRoute(
ctx, amtMsat, []*lntest.HarnessNode{c.bob, c.carol},
paymentAddr,
)
if err != nil {
return nil, err
}
@ -387,8 +411,8 @@ func (c *interceptorTestContext) sendAliceToCarolPayment(ctx context.Context,
}
// buildRoute is a helper function to build a route with given hops.
func (c *interceptorTestContext) buildRoute(ctx context.Context, amtMsat int64, hops []*lntest.HarnessNode) (
*lnrpc.Route, error) {
func (c *interceptorTestContext) buildRoute(ctx context.Context, amtMsat int64,
hops []*lntest.HarnessNode, payAddr []byte) (*lnrpc.Route, error) {
rpcHops := make([][]byte, 0, len(hops))
for _, hop := range hops {
@ -405,6 +429,7 @@ func (c *interceptorTestContext) buildRoute(ctx context.Context, amtMsat int64,
AmtMsat: amtMsat,
FinalCltvDelta: chainreg.DefaultBitcoinTimeLockDelta,
HopPubkeys: rpcHops,
PaymentAddr: payAddr,
}
routeResp, err := c.alice.RouterClient.BuildRoute(ctx, req)

@ -2432,7 +2432,7 @@ func (e ErrNoChannel) Error() string {
// outgoing channel, use the outgoingChan parameter.
func (r *ChannelRouter) BuildRoute(amt *lnwire.MilliSatoshi,
hops []route.Vertex, outgoingChan *uint64,
finalCltvDelta int32) (*route.Route, error) {
finalCltvDelta int32, payAddr *[32]byte) (*route.Route, error) {
log.Tracef("BuildRoute called: hopsCount=%v, amt=%v",
len(hops), amt)
@ -2582,10 +2582,11 @@ func (r *ChannelRouter) BuildRoute(amt *lnwire.MilliSatoshi,
return newRoute(
source, pathEdges, uint32(height),
finalHopParams{
amt: receiverAmt,
totalAmt: receiverAmt,
cltvDelta: uint16(finalCltvDelta),
records: nil,
amt: receiverAmt,
totalAmt: receiverAmt,
cltvDelta: uint16(finalCltvDelta),
records: nil,
paymentAddr: payAddr,
},
)
}

@ -15,6 +15,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/davecgh/go-spew/spew"
"github.com/stretchr/testify/require"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/clock"
@ -2921,6 +2922,10 @@ func TestSendToRouteMaxHops(t *testing.T) {
func TestBuildRoute(t *testing.T) {
// Setup a three node network.
chanCapSat := btcutil.Amount(100000)
paymentAddrFeatures := lnwire.NewFeatureVector(
lnwire.NewRawFeatureVector(lnwire.PaymentAddrOptional),
lnwire.Features,
)
testChannels := []*testChannel{
// Create two local channels from a. The bandwidth is estimated
// in this test as the channel capacity. For building routes, we
@ -2945,29 +2950,33 @@ func TestBuildRoute(t *testing.T) {
// nodes are recommended to keep their channel policies towards
// the same peer identical.
symmetricTestChannel("b", "c", chanCapSat, &testChannelPolicy{
Expiry: 144,
FeeRate: 50000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(120),
Expiry: 144,
FeeRate: 50000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(120),
Features: paymentAddrFeatures,
}, 2),
symmetricTestChannel("b", "c", chanCapSat, &testChannelPolicy{
Expiry: 144,
FeeRate: 60000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(120),
Expiry: 144,
FeeRate: 60000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(120),
Features: paymentAddrFeatures,
}, 7),
symmetricTestChannel("a", "e", chanCapSat, &testChannelPolicy{
Expiry: 144,
FeeRate: 80000,
MinHTLC: lnwire.NewMSatFromSatoshis(5),
MaxHTLC: lnwire.NewMSatFromSatoshis(10),
Expiry: 144,
FeeRate: 80000,
MinHTLC: lnwire.NewMSatFromSatoshis(5),
MaxHTLC: lnwire.NewMSatFromSatoshis(10),
Features: paymentAddrFeatures,
}, 5),
symmetricTestChannel("e", "c", chanCapSat, &testChannelPolicy{
Expiry: 144,
FeeRate: 100000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(chanCapSat),
Expiry: 144,
FeeRate: 100000,
MinHTLC: lnwire.NewMSatFromSatoshis(20),
MaxHTLC: lnwire.NewMSatFromSatoshis(chanCapSat),
Features: paymentAddrFeatures,
}, 4),
}
@ -2987,7 +2996,9 @@ func TestBuildRoute(t *testing.T) {
}
defer cleanUp()
checkHops := func(rt *route.Route, expected []uint64) {
checkHops := func(rt *route.Route, expected []uint64,
payAddr [32]byte) {
t.Helper()
if len(rt.Hops) != len(expected) {
@ -3000,8 +3011,16 @@ func TestBuildRoute(t *testing.T) {
expected[i], i, hop.ChannelID)
}
}
lastHop := rt.Hops[len(rt.Hops)-1]
require.NotNil(t, lastHop.MPP)
require.Equal(t, lastHop.MPP.PaymentAddr(), payAddr)
}
var payAddr [32]byte
_, err = rand.Read(payAddr[:])
require.NoError(t, err)
// Create hop list from the route node pubkeys.
hops := []route.Vertex{
ctx.aliases["b"], ctx.aliases["c"],
@ -3010,7 +3029,7 @@ func TestBuildRoute(t *testing.T) {
// Build the route for the given amount.
rt, err := ctx.router.BuildRoute(
&amt, hops, nil, 40,
&amt, hops, nil, 40, &payAddr,
)
if err != nil {
t.Fatal(err)
@ -3019,14 +3038,14 @@ func TestBuildRoute(t *testing.T) {
// Check that we get the expected route back. The total amount should be
// the amount to deliver to hop c (100 sats) plus the max fee for the
// connection b->c (6 sats).
checkHops(rt, []uint64{1, 7})
checkHops(rt, []uint64{1, 7}, payAddr)
if rt.TotalAmount != 106000 {
t.Fatalf("unexpected total amount %v", rt.TotalAmount)
}
// Build the route for the minimum amount.
rt, err = ctx.router.BuildRoute(
nil, hops, nil, 40,
nil, hops, nil, 40, &payAddr,
)
if err != nil {
t.Fatal(err)
@ -3036,7 +3055,7 @@ func TestBuildRoute(t *testing.T) {
// send from b to c is 20 sats. Hop b charges 1200 msat for the
// forwarding. The channel between hop a and b can carry amounts in the
// range [5, 100], so 21200 msats is the minimum amount for this route.
checkHops(rt, []uint64{1, 7})
checkHops(rt, []uint64{1, 7}, payAddr)
if rt.TotalAmount != 21200 {
t.Fatalf("unexpected total amount %v", rt.TotalAmount)
}
@ -3047,7 +3066,7 @@ func TestBuildRoute(t *testing.T) {
ctx.aliases["e"], ctx.aliases["c"],
}
_, err = ctx.router.BuildRoute(
nil, hops, nil, 40,
nil, hops, nil, 40, nil,
)
errNoChannel, ok := err.(ErrNoChannel)
if !ok {