mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-14 15:09:06 +02:00
Merge pull request #4128 from joostjager/default-routerrpc
routerrpc+lncli: enable subserver by default and switch over lncli sendpayment
This commit is contained in:
commit
afaabdae88
@ -17,7 +17,6 @@ run:
|
||||
- autopilotrpc
|
||||
- chainrpc
|
||||
- invoicesrpc
|
||||
- routerrpc
|
||||
- signrpc
|
||||
- walletrpc
|
||||
- watchtowerrpc
|
||||
|
@ -18,7 +18,7 @@ RUN apk add --no-cache --update alpine-sdk \
|
||||
&& cd /go/src/github.com/lightningnetwork/lnd \
|
||||
&& git checkout $checkout \
|
||||
&& make \
|
||||
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"
|
||||
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"
|
||||
|
||||
# Start a new, final image.
|
||||
FROM alpine as final
|
||||
|
@ -130,8 +130,8 @@ for i in $SYS; do
|
||||
cd $PACKAGE-$i-$TAG
|
||||
|
||||
echo "Building:" $OS $ARCH $ARM
|
||||
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc signrpc walletrpc chainrpc invoicesrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lnd
|
||||
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc invoicesrpc walletrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lncli
|
||||
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lnd
|
||||
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc invoicesrpc walletrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lncli
|
||||
cd ..
|
||||
|
||||
if [[ $OS = "windows" ]]; then
|
||||
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
657
cmd/lncli/cmd_pay.go
Normal file
657
cmd/lncli/cmd_pay.go
Normal file
@ -0,0 +1,657 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/lightninglabs/protobuf-hex-display/jsonpb"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/record"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
const (
|
||||
// paymentTimeoutSeconds is the default timeout for the payment loop in
|
||||
// lnd. No new attempts will be started after the timeout.
|
||||
paymentTimeoutSeconds = 60
|
||||
)
|
||||
|
||||
var (
|
||||
cltvLimitFlag = cli.UintFlag{
|
||||
Name: "cltv_limit",
|
||||
Usage: "the maximum time lock that may be used for " +
|
||||
"this payment",
|
||||
}
|
||||
|
||||
lastHopFlag = cli.StringFlag{
|
||||
Name: "last_hop",
|
||||
Usage: "pubkey of the last hop (penultimate node in the path) " +
|
||||
"to route through for this payment",
|
||||
}
|
||||
|
||||
dataFlag = cli.StringFlag{
|
||||
Name: "data",
|
||||
Usage: "attach custom data to the payment. The required " +
|
||||
"format is: <record_id>=<hex_value>,<record_id>=" +
|
||||
"<hex_value>,.. For example: --data 3438382=0a21ff. " +
|
||||
"Custom record ids start from 65536.",
|
||||
}
|
||||
)
|
||||
|
||||
// paymentFlags returns common flags for sendpayment and payinvoice.
|
||||
func paymentFlags() []cli.Flag {
|
||||
return []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "pay_req",
|
||||
Usage: "a zpay32 encoded payment request to fulfill",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "fee_limit",
|
||||
Usage: "maximum fee allowed in satoshis when " +
|
||||
"sending the payment",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "fee_limit_percent",
|
||||
Usage: "percentage of the payment's amount used as " +
|
||||
"the maximum fee allowed when sending the " +
|
||||
"payment",
|
||||
},
|
||||
cltvLimitFlag,
|
||||
lastHopFlag,
|
||||
cli.Uint64Flag{
|
||||
Name: "outgoing_chan_id",
|
||||
Usage: "short channel id of the outgoing channel to " +
|
||||
"use for the first hop of the payment",
|
||||
Value: 0,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "force, f",
|
||||
Usage: "will skip payment request confirmation",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "allow_self_payment",
|
||||
Usage: "allow sending a circular payment to self",
|
||||
},
|
||||
dataFlag,
|
||||
}
|
||||
}
|
||||
|
||||
var sendPaymentCommand = cli.Command{
|
||||
Name: "sendpayment",
|
||||
Category: "Payments",
|
||||
Usage: "Send a payment over lightning.",
|
||||
Description: `
|
||||
Send a payment over Lightning. One can either specify the full
|
||||
parameters of the payment, or just use a payment request which encodes
|
||||
all the payment details.
|
||||
|
||||
If payment isn't manually specified, then only a payment request needs
|
||||
to be passed using the --pay_req argument.
|
||||
|
||||
If the payment *is* manually specified, then all four alternative
|
||||
arguments need to be specified in order to complete the payment:
|
||||
* --dest=N
|
||||
* --amt=A
|
||||
* --final_cltv_delta=T
|
||||
* --payment_hash=H
|
||||
`,
|
||||
ArgsUsage: "dest amt payment_hash final_cltv_delta | --pay_req=[payment request]",
|
||||
Flags: append(paymentFlags(),
|
||||
cli.StringFlag{
|
||||
Name: "dest, d",
|
||||
Usage: "the compressed identity pubkey of the " +
|
||||
"payment recipient",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "amt, a",
|
||||
Usage: "number of satoshis to send",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "payment_hash, r",
|
||||
Usage: "the hash to use within the payment's HTLC",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "final_cltv_delta",
|
||||
Usage: "the number of blocks the last hop has to reveal the preimage",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "keysend",
|
||||
Usage: "will generate a pre-image and encode it in the sphinx packet, a dest must be set [experimental]",
|
||||
},
|
||||
),
|
||||
Action: sendPayment,
|
||||
}
|
||||
|
||||
// retrieveFeeLimit retrieves the fee limit based on the different fee limit
|
||||
// flags passed. It always returns a value and doesn't rely on lnd applying a
|
||||
// default.
|
||||
func retrieveFeeLimit(ctx *cli.Context, amt int64) (int64, error) {
|
||||
switch {
|
||||
|
||||
case ctx.IsSet("fee_limit") && ctx.IsSet("fee_limit_percent"):
|
||||
return 0, fmt.Errorf("either fee_limit or fee_limit_percent " +
|
||||
"can be set, but not both")
|
||||
|
||||
case ctx.IsSet("fee_limit"):
|
||||
return ctx.Int64("fee_limit"), nil
|
||||
|
||||
case ctx.IsSet("fee_limit_percent"):
|
||||
// Round up the fee limit to prevent hitting zero on small
|
||||
// amounts.
|
||||
feeLimitRoundedUp :=
|
||||
(amt*ctx.Int64("fee_limit_percent") + 99) / 100
|
||||
|
||||
return feeLimitRoundedUp, nil
|
||||
}
|
||||
|
||||
// If no fee limit is set, use the payment amount as a limit (100%).
|
||||
return amt, nil
|
||||
}
|
||||
|
||||
func confirmPayReq(resp *lnrpc.PayReq, amt, feeLimit int64) error {
|
||||
fmt.Printf("Payment hash: %v\n", resp.GetPaymentHash())
|
||||
fmt.Printf("Description: %v\n", resp.GetDescription())
|
||||
fmt.Printf("Amount (in satoshis): %v\n", amt)
|
||||
fmt.Printf("Fee limit (in satoshis): %v\n", feeLimit)
|
||||
fmt.Printf("Destination: %v\n", resp.GetDestination())
|
||||
|
||||
confirm := promptForConfirmation("Confirm payment (yes/no): ")
|
||||
if !confirm {
|
||||
return fmt.Errorf("payment not confirmed")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func sendPayment(ctx *cli.Context) error {
|
||||
// Show command help if no arguments provided
|
||||
if ctx.NArg() == 0 && ctx.NumFlags() == 0 {
|
||||
_ = cli.ShowCommandHelp(ctx, "sendpayment")
|
||||
return nil
|
||||
}
|
||||
|
||||
// If a payment request was provided, we can exit early since all of the
|
||||
// details of the payment are encoded within the request.
|
||||
if ctx.IsSet("pay_req") {
|
||||
req := &routerrpc.SendPaymentRequest{
|
||||
PaymentRequest: ctx.String("pay_req"),
|
||||
Amt: ctx.Int64("amt"),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
var (
|
||||
destNode []byte
|
||||
amount int64
|
||||
err error
|
||||
)
|
||||
|
||||
args := ctx.Args()
|
||||
|
||||
switch {
|
||||
case ctx.IsSet("dest"):
|
||||
destNode, err = hex.DecodeString(ctx.String("dest"))
|
||||
case args.Present():
|
||||
destNode, err = hex.DecodeString(args.First())
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("destination txid argument missing")
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(destNode) != 33 {
|
||||
return fmt.Errorf("dest node pubkey must be exactly 33 bytes, is "+
|
||||
"instead: %v", len(destNode))
|
||||
}
|
||||
|
||||
if ctx.IsSet("amt") {
|
||||
amount = ctx.Int64("amt")
|
||||
} else if args.Present() {
|
||||
amount, err = strconv.ParseInt(args.First(), 10, 64)
|
||||
args = args.Tail()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to decode payment amount: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
req := &routerrpc.SendPaymentRequest{
|
||||
Dest: destNode,
|
||||
Amt: amount,
|
||||
DestCustomRecords: make(map[uint64][]byte),
|
||||
}
|
||||
|
||||
var rHash []byte
|
||||
|
||||
if ctx.Bool("keysend") {
|
||||
if ctx.IsSet("payment_hash") {
|
||||
return errors.New("cannot set payment hash when using " +
|
||||
"keysend")
|
||||
}
|
||||
var preimage lntypes.Preimage
|
||||
if _, err := rand.Read(preimage[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Set the preimage. If the user supplied a preimage with the
|
||||
// data flag, the preimage that is set here will be overwritten
|
||||
// later.
|
||||
req.DestCustomRecords[record.KeySendType] = preimage[:]
|
||||
|
||||
hash := preimage.Hash()
|
||||
rHash = hash[:]
|
||||
} else {
|
||||
switch {
|
||||
case ctx.IsSet("payment_hash"):
|
||||
rHash, err = hex.DecodeString(ctx.String("payment_hash"))
|
||||
case args.Present():
|
||||
rHash, err = hex.DecodeString(args.First())
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("payment hash argument missing")
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(rHash) != 32 {
|
||||
return fmt.Errorf("payment hash must be exactly 32 "+
|
||||
"bytes, is instead %v", len(rHash))
|
||||
}
|
||||
req.PaymentHash = rHash
|
||||
|
||||
switch {
|
||||
case ctx.IsSet("final_cltv_delta"):
|
||||
req.FinalCltvDelta = int32(ctx.Int64("final_cltv_delta"))
|
||||
case args.Present():
|
||||
delta, err := strconv.ParseInt(args.First(), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.FinalCltvDelta = int32(delta)
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
func sendPaymentRequest(ctx *cli.Context,
|
||||
req *routerrpc.SendPaymentRequest) error {
|
||||
|
||||
conn := getClientConn(ctx, false)
|
||||
defer conn.Close()
|
||||
|
||||
client := lnrpc.NewLightningClient(conn)
|
||||
routerClient := routerrpc.NewRouterClient(conn)
|
||||
|
||||
req.OutgoingChanId = ctx.Uint64("outgoing_chan_id")
|
||||
if ctx.IsSet(lastHopFlag.Name) {
|
||||
lastHop, err := route.NewVertexFromStr(
|
||||
ctx.String(lastHopFlag.Name),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.LastHopPubkey = lastHop[:]
|
||||
}
|
||||
|
||||
req.CltvLimit = int32(ctx.Int(cltvLimitFlag.Name))
|
||||
req.TimeoutSeconds = paymentTimeoutSeconds
|
||||
|
||||
req.AllowSelfPayment = ctx.Bool("allow_self_payment")
|
||||
|
||||
// Parse custom data records.
|
||||
data := ctx.String(dataFlag.Name)
|
||||
if data != "" {
|
||||
records := strings.Split(data, ",")
|
||||
for _, r := range records {
|
||||
kv := strings.Split(r, "=")
|
||||
if len(kv) != 2 {
|
||||
return errors.New("invalid data format: " +
|
||||
"multiple equal signs in record")
|
||||
}
|
||||
|
||||
recordID, err := strconv.ParseUint(kv[0], 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid data format: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
hexValue, err := hex.DecodeString(kv[1])
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid data format: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
req.DestCustomRecords[recordID] = hexValue
|
||||
}
|
||||
}
|
||||
|
||||
var feeLimit int64
|
||||
if req.PaymentRequest != "" {
|
||||
// Decode payment request to find out the amount.
|
||||
decodeReq := &lnrpc.PayReqString{PayReq: req.PaymentRequest}
|
||||
decodeResp, err := client.DecodePayReq(
|
||||
context.Background(), decodeReq,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// If amount is present in the request, override the request
|
||||
// amount.
|
||||
amt := req.Amt
|
||||
invoiceAmt := decodeResp.GetNumSatoshis()
|
||||
if invoiceAmt != 0 {
|
||||
amt = invoiceAmt
|
||||
}
|
||||
|
||||
// Calculate fee limit based on the determined amount.
|
||||
feeLimit, err = retrieveFeeLimit(ctx, amt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ask for confirmation of amount and fee limit if payment is
|
||||
// forced.
|
||||
if !ctx.Bool("force") {
|
||||
err := confirmPayReq(decodeResp, amt, feeLimit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var err error
|
||||
feeLimit, err = retrieveFeeLimit(ctx, req.Amt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
req.FeeLimitSat = feeLimit
|
||||
|
||||
stream, err := routerClient.SendPayment(context.Background(), req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for {
|
||||
status, err := stream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if status.State != routerrpc.PaymentState_IN_FLIGHT {
|
||||
printRespJSON(status)
|
||||
|
||||
// If we get a payment error back, we pass an error up
|
||||
// to main which eventually calls fatal() and returns
|
||||
// with a non-zero exit code.
|
||||
if status.State != routerrpc.PaymentState_SUCCEEDED {
|
||||
return errors.New(status.State.String())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var trackPaymentCommand = cli.Command{
|
||||
Name: "trackpayment",
|
||||
Category: "Payments",
|
||||
Usage: "Track progress of an existing payment.",
|
||||
Description: `
|
||||
Pick up monitoring the progression of a previously initiated payment
|
||||
specified by the hash argument.
|
||||
`,
|
||||
ArgsUsage: "hash",
|
||||
Action: actionDecorator(trackPayment),
|
||||
}
|
||||
|
||||
func trackPayment(ctx *cli.Context) error {
|
||||
args := ctx.Args()
|
||||
|
||||
conn := getClientConn(ctx, false)
|
||||
defer conn.Close()
|
||||
|
||||
client := routerrpc.NewRouterClient(conn)
|
||||
|
||||
if !args.Present() {
|
||||
return fmt.Errorf("hash argument missing")
|
||||
}
|
||||
|
||||
hash, err := hex.DecodeString(args.First())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req := &routerrpc.TrackPaymentRequest{
|
||||
PaymentHash: hash,
|
||||
}
|
||||
|
||||
stream, err := client.TrackPayment(context.Background(), req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for {
|
||||
status, err := stream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printRespJSON(status)
|
||||
|
||||
if status.State != routerrpc.PaymentState_IN_FLIGHT {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var payInvoiceCommand = cli.Command{
|
||||
Name: "payinvoice",
|
||||
Category: "Payments",
|
||||
Usage: "Pay an invoice over lightning.",
|
||||
ArgsUsage: "pay_req",
|
||||
Flags: append(paymentFlags(),
|
||||
cli.Int64Flag{
|
||||
Name: "amt",
|
||||
Usage: "(optional) number of satoshis to fulfill the " +
|
||||
"invoice",
|
||||
},
|
||||
),
|
||||
Action: actionDecorator(payInvoice),
|
||||
}
|
||||
|
||||
func payInvoice(ctx *cli.Context) error {
|
||||
args := ctx.Args()
|
||||
|
||||
var payReq string
|
||||
switch {
|
||||
case ctx.IsSet("pay_req"):
|
||||
payReq = ctx.String("pay_req")
|
||||
case args.Present():
|
||||
payReq = args.First()
|
||||
default:
|
||||
return fmt.Errorf("pay_req argument missing")
|
||||
}
|
||||
|
||||
req := &routerrpc.SendPaymentRequest{
|
||||
PaymentRequest: payReq,
|
||||
Amt: ctx.Int64("amt"),
|
||||
DestCustomRecords: make(map[uint64][]byte),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
var sendToRouteCommand = cli.Command{
|
||||
Name: "sendtoroute",
|
||||
Category: "Payments",
|
||||
Usage: "Send a payment over a predefined route.",
|
||||
Description: `
|
||||
Send a payment over Lightning using a specific route. One must specify
|
||||
the route to attempt and the payment hash. This command can even
|
||||
be chained with the response to queryroutes or buildroute. This command
|
||||
can be used to implement channel rebalancing by crafting a self-route,
|
||||
or even atomic swaps using a self-route that crosses multiple chains.
|
||||
|
||||
There are three ways to specify a route:
|
||||
* using the --routes parameter to manually specify a JSON encoded
|
||||
route in the format of the return value of queryroutes or
|
||||
buildroute:
|
||||
(lncli sendtoroute --payment_hash=<pay_hash> --routes=<route>)
|
||||
|
||||
* passing the route as a positional argument:
|
||||
(lncli sendtoroute --payment_hash=pay_hash <route>)
|
||||
|
||||
* or reading in the route from stdin, which can allow chaining the
|
||||
response from queryroutes or buildroute, or even read in a file
|
||||
with a pre-computed route:
|
||||
(lncli queryroutes --args.. | lncli sendtoroute --payment_hash= -
|
||||
|
||||
notice the '-' at the end, which signals that lncli should read
|
||||
the route in from stdin
|
||||
`,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "payment_hash, pay_hash",
|
||||
Usage: "the hash to use within the payment's HTLC",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "routes, r",
|
||||
Usage: "a json array string in the format of the response " +
|
||||
"of queryroutes that denotes which routes to use",
|
||||
},
|
||||
},
|
||||
Action: sendToRoute,
|
||||
}
|
||||
|
||||
func sendToRoute(ctx *cli.Context) error {
|
||||
// Show command help if no arguments provided.
|
||||
if ctx.NArg() == 0 && ctx.NumFlags() == 0 {
|
||||
_ = cli.ShowCommandHelp(ctx, "sendtoroute")
|
||||
return nil
|
||||
}
|
||||
|
||||
args := ctx.Args()
|
||||
|
||||
var (
|
||||
rHash []byte
|
||||
err error
|
||||
)
|
||||
switch {
|
||||
case ctx.IsSet("payment_hash"):
|
||||
rHash, err = hex.DecodeString(ctx.String("payment_hash"))
|
||||
case args.Present():
|
||||
rHash, err = hex.DecodeString(args.First())
|
||||
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("payment hash argument missing")
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(rHash) != 32 {
|
||||
return fmt.Errorf("payment hash must be exactly 32 "+
|
||||
"bytes, is instead %d", len(rHash))
|
||||
}
|
||||
|
||||
var jsonRoutes string
|
||||
switch {
|
||||
// The user is specifying the routes explicitly via the key word
|
||||
// argument.
|
||||
case ctx.IsSet("routes"):
|
||||
jsonRoutes = ctx.String("routes")
|
||||
|
||||
// The user is specifying the routes as a positional argument.
|
||||
case args.Present() && args.First() != "-":
|
||||
jsonRoutes = args.First()
|
||||
|
||||
// The user is signalling that we should read stdin in order to parse
|
||||
// the set of target routes.
|
||||
case args.Present() && args.First() == "-":
|
||||
b, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(b) == 0 {
|
||||
return fmt.Errorf("queryroutes output is empty")
|
||||
}
|
||||
|
||||
jsonRoutes = string(b)
|
||||
}
|
||||
|
||||
// Try to parse the provided json both in the legacy QueryRoutes format
|
||||
// that contains a list of routes and the single route BuildRoute
|
||||
// format.
|
||||
var route *lnrpc.Route
|
||||
routes := &lnrpc.QueryRoutesResponse{}
|
||||
err = jsonpb.UnmarshalString(jsonRoutes, routes)
|
||||
if err == nil {
|
||||
if len(routes.Routes) == 0 {
|
||||
return fmt.Errorf("no routes provided")
|
||||
}
|
||||
|
||||
if len(routes.Routes) != 1 {
|
||||
return fmt.Errorf("expected a single route, but got %v",
|
||||
len(routes.Routes))
|
||||
}
|
||||
|
||||
route = routes.Routes[0]
|
||||
} else {
|
||||
routes := &routerrpc.BuildRouteResponse{}
|
||||
err = jsonpb.UnmarshalString(jsonRoutes, routes)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal json string "+
|
||||
"from incoming array of routes: %v", err)
|
||||
}
|
||||
|
||||
route = routes.Route
|
||||
}
|
||||
|
||||
req := &lnrpc.SendToRouteRequest{
|
||||
PaymentHash: rHash,
|
||||
Route: route,
|
||||
}
|
||||
|
||||
return sendToRouteRequest(ctx, req)
|
||||
}
|
||||
|
||||
func sendToRouteRequest(ctx *cli.Context, req *lnrpc.SendToRouteRequest) error {
|
||||
client, cleanUp := getClient(ctx)
|
||||
defer cleanUp()
|
||||
|
||||
paymentStream, err := client.SendToRoute(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := paymentStream.Send(req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := paymentStream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printRespJSON(resp)
|
||||
|
||||
return nil
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -24,9 +23,6 @@ import (
|
||||
"github.com/lightninglabs/protobuf-hex-display/jsonpb"
|
||||
"github.com/lightninglabs/protobuf-hex-display/proto"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/record"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/lightningnetwork/lnd/walletunlocker"
|
||||
"github.com/urfave/cli"
|
||||
@ -1709,11 +1705,6 @@ var getInfoCommand = cli.Command{
|
||||
Action: actionDecorator(getInfo),
|
||||
}
|
||||
|
||||
type chain struct {
|
||||
Chain string `json:"chain"`
|
||||
Network string `json:"network"`
|
||||
}
|
||||
|
||||
func getInfo(ctx *cli.Context) error {
|
||||
ctxb := context.Background()
|
||||
client, cleanUp := getClient(ctx)
|
||||
@ -1882,566 +1873,6 @@ func closedChannels(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
cltvLimitFlag = cli.UintFlag{
|
||||
Name: "cltv_limit",
|
||||
Usage: "the maximum time lock that may be used for " +
|
||||
"this payment",
|
||||
}
|
||||
|
||||
lastHopFlag = cli.StringFlag{
|
||||
Name: "last_hop",
|
||||
Usage: "pubkey of the last hop (penultimate node in the path) " +
|
||||
"to route through for this payment",
|
||||
}
|
||||
|
||||
dataFlag = cli.StringFlag{
|
||||
Name: "data",
|
||||
Usage: "attach custom data to the payment. The required " +
|
||||
"format is: <record_id>=<hex_value>,<record_id>=" +
|
||||
"<hex_value>,.. For example: --data 3438382=0a21ff. " +
|
||||
"Custom record ids start from 65536.",
|
||||
}
|
||||
)
|
||||
|
||||
// paymentFlags returns common flags for sendpayment and payinvoice.
|
||||
func paymentFlags() []cli.Flag {
|
||||
return []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "pay_req",
|
||||
Usage: "a zpay32 encoded payment request to fulfill",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "fee_limit",
|
||||
Usage: "maximum fee allowed in satoshis when " +
|
||||
"sending the payment",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "fee_limit_percent",
|
||||
Usage: "percentage of the payment's amount used as " +
|
||||
"the maximum fee allowed when sending the " +
|
||||
"payment",
|
||||
},
|
||||
cltvLimitFlag,
|
||||
lastHopFlag,
|
||||
cli.Uint64Flag{
|
||||
Name: "outgoing_chan_id",
|
||||
Usage: "short channel id of the outgoing channel to " +
|
||||
"use for the first hop of the payment",
|
||||
Value: 0,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "force, f",
|
||||
Usage: "will skip payment request confirmation",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "allow_self_payment",
|
||||
Usage: "allow sending a circular payment to self",
|
||||
},
|
||||
dataFlag,
|
||||
}
|
||||
}
|
||||
|
||||
var sendPaymentCommand = cli.Command{
|
||||
Name: "sendpayment",
|
||||
Category: "Payments",
|
||||
Usage: "Send a payment over lightning.",
|
||||
Description: `
|
||||
Send a payment over Lightning. One can either specify the full
|
||||
parameters of the payment, or just use a payment request which encodes
|
||||
all the payment details.
|
||||
|
||||
If payment isn't manually specified, then only a payment request needs
|
||||
to be passed using the --pay_req argument.
|
||||
|
||||
If the payment *is* manually specified, then all four alternative
|
||||
arguments need to be specified in order to complete the payment:
|
||||
* --dest=N
|
||||
* --amt=A
|
||||
* --final_cltv_delta=T
|
||||
* --payment_hash=H
|
||||
`,
|
||||
ArgsUsage: "dest amt payment_hash final_cltv_delta | --pay_req=[payment request]",
|
||||
Flags: append(paymentFlags(),
|
||||
cli.StringFlag{
|
||||
Name: "dest, d",
|
||||
Usage: "the compressed identity pubkey of the " +
|
||||
"payment recipient",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "amt, a",
|
||||
Usage: "number of satoshis to send",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "payment_hash, r",
|
||||
Usage: "the hash to use within the payment's HTLC",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "final_cltv_delta",
|
||||
Usage: "the number of blocks the last hop has to reveal the preimage",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "keysend",
|
||||
Usage: "will generate a pre-image and encode it in the sphinx packet, a dest must be set [experimental]",
|
||||
},
|
||||
),
|
||||
Action: sendPayment,
|
||||
}
|
||||
|
||||
// retrieveFeeLimit retrieves the fee limit based on the different fee limit
|
||||
// flags passed.
|
||||
func retrieveFeeLimit(ctx *cli.Context) (*lnrpc.FeeLimit, error) {
|
||||
switch {
|
||||
case ctx.IsSet("fee_limit") && ctx.IsSet("fee_limit_percent"):
|
||||
return nil, fmt.Errorf("either fee_limit or fee_limit_percent " +
|
||||
"can be set, but not both")
|
||||
case ctx.IsSet("fee_limit"):
|
||||
return &lnrpc.FeeLimit{
|
||||
Limit: &lnrpc.FeeLimit_Fixed{
|
||||
Fixed: ctx.Int64("fee_limit"),
|
||||
},
|
||||
}, nil
|
||||
case ctx.IsSet("fee_limit_percent"):
|
||||
return &lnrpc.FeeLimit{
|
||||
Limit: &lnrpc.FeeLimit_Percent{
|
||||
Percent: ctx.Int64("fee_limit_percent"),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Since the fee limit flags aren't required, we don't return an error
|
||||
// if they're not set.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func confirmPayReq(resp *lnrpc.PayReq, amt int64) error {
|
||||
fmt.Printf("Description: %v\n", resp.GetDescription())
|
||||
fmt.Printf("Amount (in satoshis): %v\n", amt)
|
||||
fmt.Printf("Destination: %v\n", resp.GetDestination())
|
||||
|
||||
confirm := promptForConfirmation("Confirm payment (yes/no): ")
|
||||
if !confirm {
|
||||
return fmt.Errorf("payment not confirmed")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func sendPayment(ctx *cli.Context) error {
|
||||
// Show command help if no arguments provided
|
||||
if ctx.NArg() == 0 && ctx.NumFlags() == 0 {
|
||||
cli.ShowCommandHelp(ctx, "sendpayment")
|
||||
return nil
|
||||
}
|
||||
|
||||
// If a payment request was provided, we can exit early since all of the
|
||||
// details of the payment are encoded within the request.
|
||||
if ctx.IsSet("pay_req") {
|
||||
req := &lnrpc.SendRequest{
|
||||
PaymentRequest: ctx.String("pay_req"),
|
||||
Amt: ctx.Int64("amt"),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
var (
|
||||
destNode []byte
|
||||
amount int64
|
||||
err error
|
||||
)
|
||||
|
||||
args := ctx.Args()
|
||||
|
||||
switch {
|
||||
case ctx.IsSet("dest"):
|
||||
destNode, err = hex.DecodeString(ctx.String("dest"))
|
||||
case args.Present():
|
||||
destNode, err = hex.DecodeString(args.First())
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("destination txid argument missing")
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(destNode) != 33 {
|
||||
return fmt.Errorf("dest node pubkey must be exactly 33 bytes, is "+
|
||||
"instead: %v", len(destNode))
|
||||
}
|
||||
|
||||
if ctx.IsSet("amt") {
|
||||
amount = ctx.Int64("amt")
|
||||
} else if args.Present() {
|
||||
amount, err = strconv.ParseInt(args.First(), 10, 64)
|
||||
args = args.Tail()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to decode payment amount: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
req := &lnrpc.SendRequest{
|
||||
Dest: destNode,
|
||||
Amt: amount,
|
||||
DestCustomRecords: make(map[uint64][]byte),
|
||||
}
|
||||
|
||||
var rHash []byte
|
||||
|
||||
if ctx.Bool("keysend") {
|
||||
if ctx.IsSet("payment_hash") {
|
||||
return errors.New("cannot set payment hash when using " +
|
||||
"keysend")
|
||||
}
|
||||
var preimage lntypes.Preimage
|
||||
if _, err := rand.Read(preimage[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Set the preimage. If the user supplied a preimage with the
|
||||
// data flag, the preimage that is set here will be overwritten
|
||||
// later.
|
||||
req.DestCustomRecords[record.KeySendType] = preimage[:]
|
||||
|
||||
hash := preimage.Hash()
|
||||
rHash = hash[:]
|
||||
} else {
|
||||
switch {
|
||||
case ctx.IsSet("payment_hash"):
|
||||
rHash, err = hex.DecodeString(ctx.String("payment_hash"))
|
||||
case args.Present():
|
||||
rHash, err = hex.DecodeString(args.First())
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("payment hash argument missing")
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(rHash) != 32 {
|
||||
return fmt.Errorf("payment hash must be exactly 32 "+
|
||||
"bytes, is instead %v", len(rHash))
|
||||
}
|
||||
req.PaymentHash = rHash
|
||||
|
||||
switch {
|
||||
case ctx.IsSet("final_cltv_delta"):
|
||||
req.FinalCltvDelta = int32(ctx.Int64("final_cltv_delta"))
|
||||
case args.Present():
|
||||
delta, err := strconv.ParseInt(args.First(), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.FinalCltvDelta = int32(delta)
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
func sendPaymentRequest(ctx *cli.Context, req *lnrpc.SendRequest) error {
|
||||
client, cleanUp := getClient(ctx)
|
||||
defer cleanUp()
|
||||
|
||||
// First, we'll retrieve the fee limit value passed since it can apply
|
||||
// to both ways of sending payments (with the payment request or
|
||||
// providing the details manually).
|
||||
feeLimit, err := retrieveFeeLimit(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.FeeLimit = feeLimit
|
||||
|
||||
req.OutgoingChanId = ctx.Uint64("outgoing_chan_id")
|
||||
if ctx.IsSet(lastHopFlag.Name) {
|
||||
lastHop, err := route.NewVertexFromStr(
|
||||
ctx.String(lastHopFlag.Name),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.LastHopPubkey = lastHop[:]
|
||||
}
|
||||
|
||||
req.CltvLimit = uint32(ctx.Int(cltvLimitFlag.Name))
|
||||
|
||||
req.AllowSelfPayment = ctx.Bool("allow_self_payment")
|
||||
|
||||
// Parse custom data records.
|
||||
data := ctx.String(dataFlag.Name)
|
||||
if data != "" {
|
||||
records := strings.Split(data, ",")
|
||||
for _, r := range records {
|
||||
kv := strings.Split(r, "=")
|
||||
if len(kv) != 2 {
|
||||
return errors.New("invalid data format: " +
|
||||
"multiple equal signs in record")
|
||||
}
|
||||
|
||||
recordID, err := strconv.ParseUint(kv[0], 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid data format: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
hexValue, err := hex.DecodeString(kv[1])
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid data format: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
req.DestCustomRecords[recordID] = hexValue
|
||||
}
|
||||
}
|
||||
|
||||
amt := req.Amt
|
||||
|
||||
if req.PaymentRequest != "" {
|
||||
req := &lnrpc.PayReqString{PayReq: req.PaymentRequest}
|
||||
resp, err := client.DecodePayReq(context.Background(), req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
invoiceAmt := resp.GetNumSatoshis()
|
||||
if invoiceAmt != 0 {
|
||||
amt = invoiceAmt
|
||||
}
|
||||
|
||||
if !ctx.Bool("force") {
|
||||
err := confirmPayReq(resp, amt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
paymentStream, err := client.SendPayment(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := paymentStream.Send(req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := paymentStream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
paymentStream.CloseSend()
|
||||
|
||||
printRespJSON(resp)
|
||||
|
||||
// If we get a payment error back, we pass an error
|
||||
// up to main which eventually calls fatal() and returns
|
||||
// with a non-zero exit code.
|
||||
if resp.PaymentError != "" {
|
||||
return errors.New(resp.PaymentError)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var payInvoiceCommand = cli.Command{
|
||||
Name: "payinvoice",
|
||||
Category: "Payments",
|
||||
Usage: "Pay an invoice over lightning.",
|
||||
ArgsUsage: "pay_req",
|
||||
Flags: append(paymentFlags(),
|
||||
cli.Int64Flag{
|
||||
Name: "amt",
|
||||
Usage: "(optional) number of satoshis to fulfill the " +
|
||||
"invoice",
|
||||
},
|
||||
),
|
||||
Action: actionDecorator(payInvoice),
|
||||
}
|
||||
|
||||
func payInvoice(ctx *cli.Context) error {
|
||||
args := ctx.Args()
|
||||
|
||||
var payReq string
|
||||
switch {
|
||||
case ctx.IsSet("pay_req"):
|
||||
payReq = ctx.String("pay_req")
|
||||
case args.Present():
|
||||
payReq = args.First()
|
||||
default:
|
||||
return fmt.Errorf("pay_req argument missing")
|
||||
}
|
||||
|
||||
req := &lnrpc.SendRequest{
|
||||
PaymentRequest: payReq,
|
||||
Amt: ctx.Int64("amt"),
|
||||
DestCustomRecords: make(map[uint64][]byte),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(ctx, req)
|
||||
}
|
||||
|
||||
var sendToRouteCommand = cli.Command{
|
||||
Name: "sendtoroute",
|
||||
Category: "Payments",
|
||||
Usage: "Send a payment over a predefined route.",
|
||||
Description: `
|
||||
Send a payment over Lightning using a specific route. One must specify
|
||||
the route to attempt and the payment hash. This command can even
|
||||
be chained with the response to queryroutes or buildroute. This command
|
||||
can be used to implement channel rebalancing by crafting a self-route,
|
||||
or even atomic swaps using a self-route that crosses multiple chains.
|
||||
|
||||
There are three ways to specify a route:
|
||||
* using the --routes parameter to manually specify a JSON encoded
|
||||
route in the format of the return value of queryroutes or
|
||||
buildroute:
|
||||
(lncli sendtoroute --payment_hash=<pay_hash> --routes=<route>)
|
||||
|
||||
* passing the route as a positional argument:
|
||||
(lncli sendtoroute --payment_hash=pay_hash <route>)
|
||||
|
||||
* or reading in the route from stdin, which can allow chaining the
|
||||
response from queryroutes or buildroute, or even read in a file
|
||||
with a pre-computed route:
|
||||
(lncli queryroutes --args.. | lncli sendtoroute --payment_hash= -
|
||||
|
||||
notice the '-' at the end, which signals that lncli should read
|
||||
the route in from stdin
|
||||
`,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "payment_hash, pay_hash",
|
||||
Usage: "the hash to use within the payment's HTLC",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "routes, r",
|
||||
Usage: "a json array string in the format of the response " +
|
||||
"of queryroutes that denotes which routes to use",
|
||||
},
|
||||
},
|
||||
Action: sendToRoute,
|
||||
}
|
||||
|
||||
func sendToRoute(ctx *cli.Context) error {
|
||||
// Show command help if no arguments provided.
|
||||
if ctx.NArg() == 0 && ctx.NumFlags() == 0 {
|
||||
cli.ShowCommandHelp(ctx, "sendtoroute")
|
||||
return nil
|
||||
}
|
||||
|
||||
args := ctx.Args()
|
||||
|
||||
var (
|
||||
rHash []byte
|
||||
err error
|
||||
)
|
||||
switch {
|
||||
case ctx.IsSet("payment_hash"):
|
||||
rHash, err = hex.DecodeString(ctx.String("payment_hash"))
|
||||
case args.Present():
|
||||
rHash, err = hex.DecodeString(args.First())
|
||||
|
||||
args = args.Tail()
|
||||
default:
|
||||
return fmt.Errorf("payment hash argument missing")
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(rHash) != 32 {
|
||||
return fmt.Errorf("payment hash must be exactly 32 "+
|
||||
"bytes, is instead %d", len(rHash))
|
||||
}
|
||||
|
||||
var jsonRoutes string
|
||||
switch {
|
||||
// The user is specifying the routes explicitly via the key word
|
||||
// argument.
|
||||
case ctx.IsSet("routes"):
|
||||
jsonRoutes = ctx.String("routes")
|
||||
|
||||
// The user is specifying the routes as a positional argument.
|
||||
case args.Present() && args.First() != "-":
|
||||
jsonRoutes = args.First()
|
||||
|
||||
// The user is signalling that we should read stdin in order to parse
|
||||
// the set of target routes.
|
||||
case args.Present() && args.First() == "-":
|
||||
b, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(b) == 0 {
|
||||
return fmt.Errorf("queryroutes output is empty")
|
||||
}
|
||||
|
||||
jsonRoutes = string(b)
|
||||
}
|
||||
|
||||
// Try to parse the provided json both in the legacy QueryRoutes format
|
||||
// that contains a list of routes and the single route BuildRoute
|
||||
// format.
|
||||
var route *lnrpc.Route
|
||||
routes := &lnrpc.QueryRoutesResponse{}
|
||||
err = jsonpb.UnmarshalString(jsonRoutes, routes)
|
||||
if err == nil {
|
||||
if len(routes.Routes) == 0 {
|
||||
return fmt.Errorf("no routes provided")
|
||||
}
|
||||
|
||||
if len(routes.Routes) != 1 {
|
||||
return fmt.Errorf("expected a single route, but got %v",
|
||||
len(routes.Routes))
|
||||
}
|
||||
|
||||
route = routes.Routes[0]
|
||||
} else {
|
||||
routes := &routerrpc.BuildRouteResponse{}
|
||||
err = jsonpb.UnmarshalString(jsonRoutes, routes)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal json string "+
|
||||
"from incoming array of routes: %v", err)
|
||||
}
|
||||
|
||||
route = routes.Route
|
||||
}
|
||||
|
||||
req := &lnrpc.SendToRouteRequest{
|
||||
PaymentHash: rHash,
|
||||
Route: route,
|
||||
}
|
||||
|
||||
return sendToRouteRequest(ctx, req)
|
||||
}
|
||||
|
||||
func sendToRouteRequest(ctx *cli.Context, req *lnrpc.SendToRouteRequest) error {
|
||||
client, cleanUp := getClient(ctx)
|
||||
defer cleanUp()
|
||||
|
||||
paymentStream, err := client.SendToRoute(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := paymentStream.Send(req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := paymentStream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printRespJSON(resp)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var addInvoiceCommand = cli.Command{
|
||||
Name: "addinvoice",
|
||||
Category: "Payments",
|
||||
@ -2944,7 +2375,7 @@ func queryRoutes(ctx *cli.Context) error {
|
||||
return fmt.Errorf("amt argument missing")
|
||||
}
|
||||
|
||||
feeLimit, err := retrieveFeeLimit(ctx)
|
||||
feeLimit, err := retrieveFeeLimitLegacy(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -2967,6 +2398,38 @@ func queryRoutes(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// retrieveFeeLimitLegacy retrieves the fee limit based on the different fee
|
||||
// limit flags passed. This function will eventually disappear in favor of
|
||||
// retrieveFeeLimit and the new payment rpc.
|
||||
func retrieveFeeLimitLegacy(ctx *cli.Context) (*lnrpc.FeeLimit, error) {
|
||||
switch {
|
||||
case ctx.IsSet("fee_limit") && ctx.IsSet("fee_limit_percent"):
|
||||
return nil, fmt.Errorf("either fee_limit or fee_limit_percent " +
|
||||
"can be set, but not both")
|
||||
case ctx.IsSet("fee_limit"):
|
||||
return &lnrpc.FeeLimit{
|
||||
Limit: &lnrpc.FeeLimit_Fixed{
|
||||
Fixed: ctx.Int64("fee_limit"),
|
||||
},
|
||||
}, nil
|
||||
case ctx.IsSet("fee_limit_percent"):
|
||||
feeLimitPercent := ctx.Int64("fee_limit_percent")
|
||||
if feeLimitPercent < 0 {
|
||||
return nil, errors.New("negative fee limit percentage " +
|
||||
"provided")
|
||||
}
|
||||
return &lnrpc.FeeLimit{
|
||||
Limit: &lnrpc.FeeLimit_Percent{
|
||||
Percent: feeLimitPercent,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Since the fee limit flags aren't required, we don't return an error
|
||||
// if they're not set.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var getNetworkInfoCommand = cli.Command{
|
||||
Name: "getnetworkinfo",
|
||||
Category: "Channels",
|
||||
|
@ -300,6 +300,7 @@ func main() {
|
||||
verifyChanBackupCommand,
|
||||
restoreChanBackupCommand,
|
||||
bakeMacaroonCommand,
|
||||
trackPaymentCommand,
|
||||
}
|
||||
|
||||
// Add any extra commands determined by build flags.
|
||||
|
@ -1,10 +1,8 @@
|
||||
// +build routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/urfave/cli"
|
||||
|
||||
// routerCommands will return nil for non-routerrpc builds.
|
||||
// routerCommands returns a list of routerrpc commands.
|
||||
func routerCommands() []cli.Command {
|
||||
return []cli.Command{
|
||||
queryMissionControlCommand,
|
@ -1,10 +0,0 @@
|
||||
// +build !routerrpc
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/urfave/cli"
|
||||
|
||||
// routerCommands will return nil for non-routerrpc builds.
|
||||
func routerCommands() []cli.Command {
|
||||
return nil
|
||||
}
|
@ -16,7 +16,7 @@ COPY . /go/src/github.com/lightningnetwork/lnd
|
||||
|
||||
RUN cd /go/src/github.com/lightningnetwork/lnd \
|
||||
&& make \
|
||||
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"
|
||||
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"
|
||||
|
||||
# Start a new, final image to reduce size.
|
||||
FROM alpine as final
|
||||
|
@ -1,40 +1,69 @@
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
)
|
||||
|
||||
// RoutingConfig contains the configurable parameters that control routing.
|
||||
type RoutingConfig struct {
|
||||
// MinRouteProbability is the minimum required route success probability
|
||||
// to attempt the payment.
|
||||
MinRouteProbability float64 `long:"minrtprob" description:"Minimum required route success probability to attempt the payment"`
|
||||
// Config is the main configuration file for the router RPC server. It contains
|
||||
// all the items required for the router RPC server to carry out its duties.
|
||||
// The fields with struct tags are meant to be parsed as normal configuration
|
||||
// options, while if able to be populated, the latter fields MUST also be
|
||||
// specified.
|
||||
type Config struct {
|
||||
RoutingConfig
|
||||
|
||||
// AprioriHopProbability is the assumed success probability of a hop in
|
||||
// a route when no other information is available.
|
||||
AprioriHopProbability float64 `long:"apriorihopprob" description:"Assumed success probability of a hop in a route when no other information is available."`
|
||||
// RouterMacPath is the path for the router macaroon. If unspecified
|
||||
// then we assume that the macaroon will be found under the network
|
||||
// directory, named DefaultRouterMacFilename.
|
||||
RouterMacPath string `long:"routermacaroonpath" description:"Path to the router macaroon"`
|
||||
|
||||
// AprioriWeight is a value in the range [0, 1] that defines to what
|
||||
// extent historical results should be extrapolated to untried
|
||||
// connections. Setting it to one will completely ignore historical
|
||||
// results and always assume the configured a priori probability for
|
||||
// untried connections. A value of zero will ignore the a priori
|
||||
// probability completely and only base the probability on historical
|
||||
// results, unless there are none available.
|
||||
AprioriWeight float64 `long:"aprioriweight" description:"Weight of the a priori probability in success probability estimation. Valid values are in [0, 1]."`
|
||||
// NetworkDir is the main network directory wherein the router rpc
|
||||
// server will find the macaroon named DefaultRouterMacFilename.
|
||||
NetworkDir string
|
||||
|
||||
// PenaltyHalfLife defines after how much time a penalized node or
|
||||
// channel is back at 50% probability.
|
||||
PenaltyHalfLife time.Duration `long:"penaltyhalflife" description:"Defines the duration after which a penalized node or channel is back at 50% probability"`
|
||||
// MacService is the main macaroon service that we'll use to handle
|
||||
// authentication for the Router rpc server.
|
||||
MacService *macaroons.Service
|
||||
|
||||
// AttemptCost is the virtual cost in path finding weight units of
|
||||
// executing a payment attempt that fails. It is used to trade off
|
||||
// potentially better routes against their probability of succeeding.
|
||||
AttemptCost btcutil.Amount `long:"attemptcost" description:"The (virtual) cost in sats of a failed payment attempt"`
|
||||
// Router is the main channel router instance that backs this RPC
|
||||
// server.
|
||||
//
|
||||
// TODO(roasbeef): make into pkg lvl interface?
|
||||
//
|
||||
// TODO(roasbeef): assumes router handles saving payment state
|
||||
Router *routing.ChannelRouter
|
||||
|
||||
// MaxMcHistory defines the maximum number of payment results that
|
||||
// are held on disk by mission control.
|
||||
MaxMcHistory int `long:"maxmchistory" description:"the maximum number of payment results that are held on disk by mission control"`
|
||||
// RouterBackend contains shared logic between this sub server and the
|
||||
// main rpc server.
|
||||
RouterBackend *RouterBackend
|
||||
}
|
||||
|
||||
// DefaultConfig defines the config defaults.
|
||||
func DefaultConfig() *Config {
|
||||
defaultRoutingConfig := RoutingConfig{
|
||||
AprioriHopProbability: routing.DefaultAprioriHopProbability,
|
||||
AprioriWeight: routing.DefaultAprioriWeight,
|
||||
MinRouteProbability: routing.DefaultMinRouteProbability,
|
||||
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
|
||||
AttemptCost: routing.DefaultPaymentAttemptPenalty.
|
||||
ToSatoshis(),
|
||||
MaxMcHistory: routing.DefaultMaxMcHistory,
|
||||
}
|
||||
|
||||
return &Config{
|
||||
RoutingConfig: defaultRoutingConfig,
|
||||
}
|
||||
}
|
||||
|
||||
// GetRoutingConfig returns the routing config based on this sub server config.
|
||||
func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
||||
return &RoutingConfig{
|
||||
AprioriHopProbability: cfg.AprioriHopProbability,
|
||||
AprioriWeight: cfg.AprioriWeight,
|
||||
MinRouteProbability: cfg.MinRouteProbability,
|
||||
AttemptCost: cfg.AttemptCost,
|
||||
PenaltyHalfLife: cfg.PenaltyHalfLife,
|
||||
MaxMcHistory: cfg.MaxMcHistory,
|
||||
}
|
||||
}
|
||||
|
@ -1,71 +0,0 @@
|
||||
// +build routerrpc
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
)
|
||||
|
||||
// Config is the main configuration file for the router RPC server. It contains
|
||||
// all the items required for the router RPC server to carry out its duties.
|
||||
// The fields with struct tags are meant to be parsed as normal configuration
|
||||
// options, while if able to be populated, the latter fields MUST also be
|
||||
// specified.
|
||||
type Config struct {
|
||||
RoutingConfig
|
||||
|
||||
// RouterMacPath is the path for the router macaroon. If unspecified
|
||||
// then we assume that the macaroon will be found under the network
|
||||
// directory, named DefaultRouterMacFilename.
|
||||
RouterMacPath string `long:"routermacaroonpath" description:"Path to the router macaroon"`
|
||||
|
||||
// NetworkDir is the main network directory wherein the router rpc
|
||||
// server will find the macaroon named DefaultRouterMacFilename.
|
||||
NetworkDir string
|
||||
|
||||
// MacService is the main macaroon service that we'll use to handle
|
||||
// authentication for the Router rpc server.
|
||||
MacService *macaroons.Service
|
||||
|
||||
// Router is the main channel router instance that backs this RPC
|
||||
// server.
|
||||
//
|
||||
// TODO(roasbeef): make into pkg lvl interface?
|
||||
//
|
||||
// TODO(roasbeef): assumes router handles saving payment state
|
||||
Router *routing.ChannelRouter
|
||||
|
||||
// RouterBackend contains shared logic between this sub server and the
|
||||
// main rpc server.
|
||||
RouterBackend *RouterBackend
|
||||
}
|
||||
|
||||
// DefaultConfig defines the config defaults.
|
||||
func DefaultConfig() *Config {
|
||||
defaultRoutingConfig := RoutingConfig{
|
||||
AprioriHopProbability: routing.DefaultAprioriHopProbability,
|
||||
AprioriWeight: routing.DefaultAprioriWeight,
|
||||
MinRouteProbability: routing.DefaultMinRouteProbability,
|
||||
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
|
||||
AttemptCost: routing.DefaultPaymentAttemptPenalty.
|
||||
ToSatoshis(),
|
||||
MaxMcHistory: routing.DefaultMaxMcHistory,
|
||||
}
|
||||
|
||||
return &Config{
|
||||
RoutingConfig: defaultRoutingConfig,
|
||||
}
|
||||
}
|
||||
|
||||
// GetRoutingConfig returns the routing config based on this sub server config.
|
||||
func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
||||
return &RoutingConfig{
|
||||
AprioriHopProbability: cfg.AprioriHopProbability,
|
||||
AprioriWeight: cfg.AprioriWeight,
|
||||
MinRouteProbability: cfg.MinRouteProbability,
|
||||
AttemptCost: cfg.AttemptCost,
|
||||
PenaltyHalfLife: cfg.PenaltyHalfLife,
|
||||
MaxMcHistory: cfg.MaxMcHistory,
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
// +build !routerrpc
|
||||
|
||||
package routerrpc
|
||||
|
||||
import "github.com/lightningnetwork/lnd/routing"
|
||||
|
||||
// Config is the default config struct for the package. When the build tag isn't
|
||||
// specified, then we output a blank config.
|
||||
type Config struct{}
|
||||
|
||||
// DefaultConfig defines the config defaults. Without the sub server enabled,
|
||||
// there are no defaults to set.
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{}
|
||||
}
|
||||
|
||||
// GetRoutingConfig returns the routing config based on this sub server config.
|
||||
func GetRoutingConfig(cfg *Config) *RoutingConfig {
|
||||
return &RoutingConfig{
|
||||
AprioriHopProbability: routing.DefaultAprioriHopProbability,
|
||||
AprioriWeight: routing.DefaultAprioriWeight,
|
||||
MinRouteProbability: routing.DefaultMinRouteProbability,
|
||||
AttemptCost: routing.DefaultPaymentAttemptPenalty.
|
||||
ToSatoshis(),
|
||||
PenaltyHalfLife: routing.DefaultPenaltyHalfLife,
|
||||
MaxMcHistory: routing.DefaultMaxMcHistory,
|
||||
}
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
|
@ -467,10 +467,7 @@ type PaymentStatus struct {
|
||||
//The pre-image of the payment when state is SUCCEEDED.
|
||||
Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"`
|
||||
//*
|
||||
//The taken route when state is SUCCEEDED.
|
||||
Route *lnrpc.Route `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"`
|
||||
//*
|
||||
//The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
||||
//The HTLCs made in attempt to settle the payment.
|
||||
Htlcs []*lnrpc.HTLCAttempt `protobuf:"bytes,4,rep,name=htlcs,proto3" json:"htlcs,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@ -516,13 +513,6 @@ func (m *PaymentStatus) GetPreimage() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PaymentStatus) GetRoute() *lnrpc.Route {
|
||||
if m != nil {
|
||||
return m.Route
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PaymentStatus) GetHtlcs() []*lnrpc.HTLCAttempt {
|
||||
if m != nil {
|
||||
return m.Htlcs
|
||||
@ -1723,142 +1713,142 @@ func init() {
|
||||
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
|
||||
|
||||
var fileDescriptor_7a0613f69d37b0a5 = []byte{
|
||||
// 2155 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xdd, 0x72, 0xdb, 0xc6,
|
||||
0x15, 0x36, 0x28, 0x50, 0x22, 0x0f, 0x7f, 0x04, 0xad, 0x1c, 0x99, 0xa5, 0xec, 0x44, 0x41, 0x13,
|
||||
0x9b, 0xe3, 0x3a, 0x92, 0xa3, 0x76, 0x5a, 0x4f, 0xdb, 0xa4, 0x43, 0x91, 0x90, 0x09, 0x99, 0x02,
|
||||
0x98, 0x25, 0xe4, 0x9f, 0xfa, 0x62, 0x07, 0x22, 0x97, 0x22, 0x2a, 0x10, 0x60, 0x81, 0xa5, 0x3d,
|
||||
0xba, 0xec, 0xf4, 0xae, 0x2f, 0xd2, 0x5e, 0xf5, 0x09, 0xfa, 0x2e, 0xbd, 0xed, 0x13, 0x74, 0x7a,
|
||||
0xd9, 0xd9, 0xc5, 0x82, 0x04, 0x29, 0xca, 0xc9, 0x8d, 0x4d, 0x7c, 0xe7, 0xdb, 0xb3, 0xe7, 0x77,
|
||||
0xcf, 0xae, 0x60, 0x2f, 0x0a, 0x67, 0x8c, 0x46, 0xd1, 0x74, 0x70, 0x94, 0xfc, 0x3a, 0x9c, 0x46,
|
||||
0x21, 0x0b, 0x51, 0x71, 0x8e, 0xd7, 0x8b, 0xd1, 0x74, 0x90, 0xa0, 0xfa, 0xff, 0xf2, 0x80, 0xfa,
|
||||
0x34, 0x18, 0xf6, 0xdc, 0x9b, 0x09, 0x0d, 0x18, 0xa6, 0x7f, 0x9e, 0xd1, 0x98, 0x21, 0x04, 0xea,
|
||||
0x90, 0xc6, 0xac, 0xa6, 0x1c, 0x28, 0x8d, 0x32, 0x16, 0xbf, 0x91, 0x06, 0x1b, 0xee, 0x84, 0xd5,
|
||||
0x72, 0x07, 0x4a, 0x63, 0x03, 0xf3, 0x9f, 0xe8, 0x67, 0x50, 0x70, 0x27, 0x8c, 0x4c, 0x62, 0x97,
|
||||
0xd5, 0xca, 0x02, 0xde, 0x72, 0x27, 0xec, 0x3c, 0x76, 0x19, 0xfa, 0x12, 0xca, 0xd3, 0x44, 0x25,
|
||||
0x19, 0xbb, 0xf1, 0xb8, 0xb6, 0x21, 0x14, 0x95, 0x24, 0xd6, 0x71, 0xe3, 0x31, 0x6a, 0x80, 0x36,
|
||||
0xf2, 0x02, 0xd7, 0x27, 0x03, 0x9f, 0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,
|
||||
0x6c, 0x0e, 0x94, 0x95, 0x1c, 0x34, 0x60, 0x6b, 0xe4, 0x7a, 0xfe, 0x2c, 0x4a, 0x15, 0x57, 0xd3,
|
||||
0x92, 0x4c, 0x50, 0x9c, 0x8a, 0xf5, 0x87, 0x50, 0xc7, 0x34, 0xa6, 0xec, 0xdc, 0x8b, 0x63, 0x2f,
|
||||
0x0c, 0x5a, 0x61, 0xc0, 0xa2, 0xd0, 0x97, 0x1e, 0xe8, 0x8f, 0x60, 0x7f, 0xad, 0x34, 0x31, 0x81,
|
||||
0x2f, 0xfe, 0x61, 0x46, 0xa3, 0x9b, 0xf5, 0x8b, 0x7f, 0x80, 0xfd, 0xb5, 0x52, 0x69, 0xff, 0x33,
|
||||
0xc8, 0x4f, 0x5d, 0x2f, 0x8a, 0x6b, 0x39, 0x51, 0x03, 0x7b, 0x4b, 0x25, 0xe7, 0x45, 0x1d, 0x2f,
|
||||
0x66, 0x61, 0x74, 0x83, 0x13, 0xd2, 0x99, 0x5a, 0x50, 0xb4, 0x9c, 0xfe, 0x37, 0x05, 0x4a, 0x19,
|
||||
0x21, 0xda, 0x87, 0x62, 0x10, 0x0e, 0x29, 0x19, 0x45, 0xe1, 0x24, 0x0d, 0x02, 0x07, 0x4e, 0xa3,
|
||||
0x70, 0xc2, 0x6b, 0x42, 0x08, 0x59, 0x28, 0x6b, 0x74, 0x93, 0x7f, 0x3a, 0x21, 0xfa, 0x06, 0xb6,
|
||||
0xc6, 0x89, 0x02, 0x71, 0x6c, 0x96, 0x8e, 0x77, 0x57, 0xf6, 0x6e, 0xbb, 0xcc, 0xc5, 0x29, 0xe7,
|
||||
0x4c, 0x2d, 0x6c, 0x68, 0xea, 0x99, 0x5a, 0x50, 0xb5, 0xfc, 0x99, 0x5a, 0xc8, 0x6b, 0x9b, 0x67,
|
||||
0x6a, 0x61, 0x53, 0xdb, 0xd2, 0xff, 0xa3, 0x40, 0x21, 0x65, 0x73, 0x4b, 0x78, 0x48, 0x09, 0x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 0x17, 0x50, 0x5a,
|
||||
0xcc, 0xd4, 0xe4, 0x5c, 0x2c, 0x63, 0x18, 0xa7, 0x03, 0x35, 0xd6, 0x5f, 0x00, 0xca, 0x1a, 0x2a,
|
||||
0x03, 0x32, 0x3f, 0x3f, 0x94, 0xbb, 0xcf, 0x8f, 0x87, 0x50, 0xef, 0xcf, 0x2e, 0xe3, 0x41, 0xe4,
|
||||
0x5d, 0xd2, 0x0e, 0xf3, 0x07, 0xc6, 0x07, 0x1a, 0xb0, 0x38, 0xed, 0xd2, 0xff, 0xaa, 0x50, 0x9c,
|
||||
0xa3, 0xe8, 0x10, 0x76, 0xbd, 0x60, 0x10, 0x4e, 0x52, 0xa3, 0x03, 0xea, 0x73, 0xbb, 0x93, 0x79,
|
||||
0xb4, 0x93, 0x8a, 0x5a, 0x89, 0xc4, 0x1c, 0x72, 0xfe, 0x92, 0x93, 0x92, 0x9f, 0x4b, 0xf8, 0x59,
|
||||
0x1f, 0x13, 0x7e, 0x03, 0xb4, 0xb9, 0x7e, 0x7e, 0xc0, 0xcf, 0x83, 0x82, 0xab, 0x29, 0xce, 0x8d,
|
||||
0x49, 0x98, 0x73, 0xcd, 0x29, 0x53, 0x4d, 0x98, 0x29, 0x2e, 0x99, 0x5f, 0x42, 0x99, 0xf7, 0x43,
|
||||
0xcc, 0xdc, 0xc9, 0x94, 0x04, 0xb1, 0xe8, 0x0b, 0x15, 0x97, 0xe6, 0x98, 0x15, 0xa3, 0xef, 0x00,
|
||||
0x28, 0xf7, 0x8f, 0xb0, 0x9b, 0x29, 0x15, 0x2d, 0x51, 0x3d, 0xfe, 0x3c, 0x53, 0x18, 0xf3, 0x00,
|
||||
0x1c, 0x8a, 0x7f, 0x9d, 0x9b, 0x29, 0xc5, 0x45, 0x9a, 0xfe, 0x44, 0xdf, 0x43, 0x65, 0x14, 0x46,
|
||||
0x1f, 0xdd, 0x68, 0x48, 0x04, 0x28, 0x8f, 0x8d, 0xec, 0x94, 0x3c, 0x4d, 0x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c, 0x60,
|
||||
0x78, 0x24, 0x86, 0xcd, 0xd1, 0x7c, 0xf9, 0xe5, 0xa6, 0xf8, 0x5b, 0xdd, 0x2f, 0xff, 0x1f, 0x00,
|
||||
0x00, 0xff, 0xff, 0xe9, 0x0c, 0xc3, 0x27, 0xdb, 0x13, 0x00, 0x00,
|
||||
// 2150 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xdd, 0x72, 0xdb, 0xb8,
|
||||
0x15, 0x0e, 0x6d, 0xca, 0x96, 0x8e, 0x7e, 0x4c, 0x43, 0x59, 0x47, 0x95, 0x93, 0x5d, 0x2d, 0xbb,
|
||||
0x9b, 0x68, 0xd2, 0xac, 0x9d, 0x75, 0x3b, 0x6d, 0xa6, 0xed, 0x6e, 0x47, 0x96, 0xe8, 0x88, 0x8e,
|
||||
0x4c, 0x6a, 0x21, 0x3a, 0x3f, 0xcd, 0x05, 0x86, 0x96, 0x20, 0x8b, 0x35, 0x45, 0xaa, 0x24, 0x94,
|
||||
0x8c, 0x2f, 0x3b, 0xbd, 0xeb, 0x8b, 0xf4, 0xae, 0x4f, 0xd0, 0x77, 0xe9, 0x6d, 0x9f, 0xa0, 0xd3,
|
||||
0xcb, 0x1d, 0x80, 0xa0, 0x44, 0xd9, 0x72, 0x76, 0x6f, 0x12, 0xf1, 0x3b, 0x1f, 0x0e, 0xce, 0x39,
|
||||
0xf8, 0x80, 0x03, 0x18, 0xf6, 0xa2, 0x70, 0xce, 0x68, 0x14, 0xcd, 0x86, 0x87, 0xc9, 0xaf, 0x83,
|
||||
0x59, 0x14, 0xb2, 0x10, 0x15, 0x16, 0x78, 0xbd, 0x10, 0xcd, 0x86, 0x09, 0xaa, 0xff, 0x3f, 0x07,
|
||||
0x68, 0x40, 0x83, 0x51, 0xdf, 0xbd, 0x9e, 0xd2, 0x80, 0x61, 0xfa, 0xd7, 0x39, 0x8d, 0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05, 0x97, 0x64, 0x38,
|
||||
0x71, 0x03, 0xe2, 0x8d, 0x6a, 0xf9, 0x86, 0xd2, 0x54, 0x8f, 0x37, 0x9e, 0x2b, 0xb8, 0x92, 0xda,
|
||||
0xda, 0x13, 0x37, 0x30, 0x47, 0xe8, 0x31, 0xec, 0xf8, 0x6e, 0xcc, 0xc8, 0x24, 0x9c, 0x91, 0xd9,
|
||||
0xfc, 0xe2, 0x8a, 0x5e, 0xd7, 0x2a, 0xa2, 0x32, 0x65, 0x0e, 0x77, 0xc3, 0x59, 0x5f, 0x80, 0xe8,
|
||||
0x11, 0x80, 0xa8, 0x8a, 0x98, 0xbc, 0x56, 0x10, 0x39, 0x14, 0x38, 0x22, 0x26, 0x46, 0xdf, 0x42,
|
||||
0x51, 0xac, 0x26, 0x99, 0x78, 0x01, 0x8b, 0x6b, 0xd0, 0xd8, 0x6c, 0x16, 0x8f, 0xb4, 0x03, 0x3f,
|
||||
0xe0, 0x0b, 0x8b, 0xb9, 0xa5, 0xeb, 0x05, 0x0c, 0x43, 0x94, 0xfe, 0x8c, 0xd1, 0x08, 0xaa, 0x7c,
|
||||
0x15, 0xc9, 0x70, 0x1e, 0xb3, 0x70, 0x4a, 0x22, 0x3a, 0x0c, 0xa3, 0x51, 0x5c, 0x2b, 0x8a, 0xa1,
|
||||
0xbf, 0x39, 0x58, 0x88, 0xe3, 0xe0, 0xb6, 0x1a, 0x0e, 0x3a, 0x34, 0x66, 0x6d, 0x31, 0x0e, 0x27,
|
||||
0xc3, 0x8c, 0x80, 0x45, 0xd7, 0x78, 0x77, 0x74, 0x13, 0x47, 0xcf, 0x00, 0xb9, 0xbe, 0x1f, 0x7e,
|
||||
0x24, 0x31, 0xf5, 0xc7, 0x44, 0xae, 0x4e, 0x6d, 0xa7, 0xa1, 0x34, 0xf3, 0x58, 0x13, 0x96, 0x01,
|
||||
0xf5, 0xc7, 0xd2, 0x3d, 0xfa, 0x2d, 0x94, 0x45, 0x4c, 0x63, 0xea, 0xb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31, 0x8f, 0x41, 0xe3, 0x09, 0x70, 0x4d, 0xf3, 0x2d,
|
||||
0x20, 0xc4, 0xaf, 0x88, 0x51, 0x15, 0x89, 0x9f, 0x50, 0x2a, 0xe4, 0xff, 0x38, 0xd9, 0x71, 0xc4,
|
||||
0x0f, 0x87, 0x57, 0x7c, 0x0f, 0xbb, 0xd7, 0xd2, 0x7d, 0x99, 0xc3, 0xbd, 0x70, 0x78, 0xd5, 0xe1,
|
||||
0xa0, 0xfe, 0x3e, 0x39, 0x66, 0x9c, 0x50, 0xcc, 0xf5, 0xf3, 0x6b, 0x8d, 0x74, 0xc8, 0x89, 0x5a,
|
||||
0x0a, 0xb7, 0xc5, 0xa3, 0x52, 0x56, 0xe4, 0x38, 0x31, 0xe9, 0xef, 0xa1, 0xba, 0xe2, 0x5c, 0x66,
|
||||
0x91, 0xad, 0xb2, 0x72, 0xab, 0xca, 0xdb, 0x63, 0xd7, 0xf3, 0xe7, 0x51, 0xea, 0xb8, 0x92, 0x8a,
|
||||
0x2e, 0x41, 0x71, 0x6a, 0xd6, 0x1f, 0x42, 0x1d, 0xd3, 0x98, 0xb2, 0x33, 0x2f, 0x8e, 0xbd, 0x30,
|
||||
0x68, 0x87, 0x01, 0x8b, 0x42, 0x5f, 0x66, 0xa0, 0x3f, 0x82, 0xfd, 0xb5, 0xd6, 0x24, 0x04, 0x3e,
|
||||
0xf8, 0x87, 0x39, 0x8d, 0xae, 0xd7, 0x0f, 0xfe, 0x01, 0xf6, 0xd7, 0x5a, 0x65, 0xfc, 0xcf, 0x20,
|
||||
0x37, 0x73, 0xbd, 0x28, 0xae, 0x6d, 0x08, 0x25, 0xec, 0xad, 0x88, 0xca, 0x8b, 0xba, 0x5e, 0xcc,
|
||||
0xc2, 0xe8, 0x1a, 0x27, 0xa4, 0x53, 0x35, 0xaf, 0x68, 0x1b, 0x5c, 0x9a, 0xc5, 0x8c, 0x11, 0xed,
|
||||
0x43, 0x21, 0x08, 0x47, 0x94, 0x8c, 0x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4f, 0x72, 0xa4, 0x73, 0x13, 0x60, 0x79, 0xcf, 0x43, 0x0f,
|
||||
0x33, 0x43, 0x6e, 0xdd, 0x53, 0xeb, 0x8f, 0xee, 0xb0, 0x4a, 0x57, 0x0e, 0x54, 0xd7, 0x5c, 0xfc,
|
||||
0x56, 0xaa, 0x71, 0xf7, 0xc5, 0xb0, 0x7e, 0x7f, 0xdd, 0xfd, 0xe8, 0xb9, 0x72, 0xfc, 0xed, 0x9f,
|
||||
0x0f, 0x2f, 0x3d, 0x36, 0x99, 0x5f, 0x1c, 0x0c, 0xc3, 0xe9, 0xa1, 0xef, 0x5d, 0x4e, 0x58, 0xe0,
|
||||
0x05, 0x97, 0x01, 0x65, 0x1f, 0xc3, 0xe8, 0xea, 0xd0, 0x0f, 0x46, 0x87, 0xa2, 0xd9, 0x1c, 0x2e,
|
||||
0x86, 0x5f, 0x6c, 0x89, 0xbf, 0xc6, 0xfd, 0xfa, 0xc7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x84,
|
||||
0xd2, 0x59, 0xbd, 0x13, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -169,13 +169,10 @@ message PaymentStatus {
|
||||
*/
|
||||
bytes preimage = 2;
|
||||
|
||||
/**
|
||||
The taken route when state is SUCCEEDED.
|
||||
*/
|
||||
lnrpc.Route route = 3;
|
||||
reserved 3;
|
||||
|
||||
/**
|
||||
The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
||||
The HTLCs made in attempt to settle the payment.
|
||||
*/
|
||||
repeated lnrpc.HTLCAttempt htlcs = 4;
|
||||
}
|
||||
|
@ -650,6 +650,7 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
)
|
||||
payIntent.DestFeatures = payReq.Features
|
||||
payIntent.PaymentAddr = payReq.PaymentAddr
|
||||
payIntent.PaymentRequest = []byte(rpcPayReq.PaymentRequest)
|
||||
} else {
|
||||
// Otherwise, If the payment request field was not specified
|
||||
// (and a custom route wasn't specified), construct the payment
|
||||
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
@ -487,35 +485,6 @@ func (s *Server) trackPayment(paymentHash lntypes.Hash,
|
||||
status.State = state
|
||||
}
|
||||
|
||||
// Extract the last route from the given list of HTLCs. This
|
||||
// will populate the legacy route field for backwards
|
||||
// compatibility.
|
||||
//
|
||||
// NOTE: For now there will be at most one HTLC, this code
|
||||
// should be revisted or the field removed when multiple HTLCs
|
||||
// are permitted.
|
||||
var legacyRoute *route.Route
|
||||
for _, htlc := range result.HTLCs {
|
||||
switch {
|
||||
case htlc.Settle != nil:
|
||||
legacyRoute = &htlc.Route
|
||||
|
||||
// Only display the route for failed payments if we got
|
||||
// an incorrect payment details error, so that it can be
|
||||
// used for probing or fee estimation.
|
||||
case htlc.Failure != nil && result.FailureReason ==
|
||||
channeldb.FailureReasonPaymentDetails:
|
||||
|
||||
legacyRoute = &htlc.Route
|
||||
}
|
||||
}
|
||||
if legacyRoute != nil {
|
||||
status.Route, err = router.MarshallRoute(legacyRoute)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal our list of HTLCs that have been tried for this
|
||||
// payment.
|
||||
htlcs := make([]*lnrpc.HTLCAttempt, 0, len(result.HTLCs))
|
||||
|
40
lnrpc/routerrpc/routing_config.go
Normal file
40
lnrpc/routerrpc/routing_config.go
Normal file
@ -0,0 +1,40 @@
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
)
|
||||
|
||||
// RoutingConfig contains the configurable parameters that control routing.
|
||||
type RoutingConfig struct {
|
||||
// MinRouteProbability is the minimum required route success probability
|
||||
// to attempt the payment.
|
||||
MinRouteProbability float64 `long:"minrtprob" description:"Minimum required route success probability to attempt the payment"`
|
||||
|
||||
// AprioriHopProbability is the assumed success probability of a hop in
|
||||
// a route when no other information is available.
|
||||
AprioriHopProbability float64 `long:"apriorihopprob" description:"Assumed success probability of a hop in a route when no other information is available."`
|
||||
|
||||
// AprioriWeight is a value in the range [0, 1] that defines to what
|
||||
// extent historical results should be extrapolated to untried
|
||||
// connections. Setting it to one will completely ignore historical
|
||||
// results and always assume the configured a priori probability for
|
||||
// untried connections. A value of zero will ignore the a priori
|
||||
// probability completely and only base the probability on historical
|
||||
// results, unless there are none available.
|
||||
AprioriWeight float64 `long:"aprioriweight" description:"Weight of the a priori probability in success probability estimation. Valid values are in [0, 1]."`
|
||||
|
||||
// PenaltyHalfLife defines after how much time a penalized node or
|
||||
// channel is back at 50% probability.
|
||||
PenaltyHalfLife time.Duration `long:"penaltyhalflife" description:"Defines the duration after which a penalized node or channel is back at 50% probability"`
|
||||
|
||||
// AttemptCost is the virtual cost in path finding weight units of
|
||||
// executing a payment attempt that fails. It is used to trade off
|
||||
// potentially better routes against their probability of succeeding.
|
||||
AttemptCost btcutil.Amount `long:"attemptcost" description:"The (virtual) cost in sats of a failed payment attempt"`
|
||||
|
||||
// MaxMcHistory defines the maximum number of payment results that
|
||||
// are held on disk by mission control.
|
||||
MaxMcHistory int `long:"maxmchistory" description:"the maximum number of payment results that are held on disk by mission control"`
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
// +build routerrpc
|
||||
|
||||
package routerrpc
|
||||
|
||||
import (
|
||||
|
1505
lnrpc/rpc.pb.go
1505
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -503,12 +503,15 @@ service Lightning {
|
||||
}
|
||||
|
||||
/** lncli: `sendpayment`
|
||||
SendPayment dispatches a bi-directional streaming RPC for sending payments
|
||||
through the Lightning Network. A single RPC invocation creates a persistent
|
||||
bi-directional stream allowing clients to rapidly send payments through the
|
||||
Lightning Network with a single persistent connection.
|
||||
Deprecated, use routerrpc.SendPayment. SendPayment dispatches a
|
||||
bi-directional streaming RPC for sending payments through the Lightning
|
||||
Network. A single RPC invocation creates a persistent bi-directional
|
||||
stream allowing clients to rapidly send payments through the Lightning
|
||||
Network with a single persistent connection.
|
||||
*/
|
||||
rpc SendPayment (stream SendRequest) returns (stream SendResponse);
|
||||
rpc SendPayment (stream SendRequest) returns (stream SendResponse) {
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
||||
|
@ -61,6 +61,6 @@ backend = btcd
|
||||
endif
|
||||
|
||||
# Construct the integration test command with the added build flags.
|
||||
ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc routerrpc watchtowerrpc $(backend)
|
||||
ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc watchtowerrpc $(backend)
|
||||
|
||||
ITEST := rm lntest/itest/*.log; date; $(GOTEST) -v ./lntest/itest -tags="$(ITEST_TAGS)" $(TEST_FLAGS) -logoutput -goroutinedump
|
||||
|
@ -53,14 +53,14 @@ Similar to lnd, subservers can be conditionally compiled with the build by
|
||||
setting the tags argument:
|
||||
|
||||
```
|
||||
make ios tags="routerrpc"
|
||||
make ios
|
||||
```
|
||||
|
||||
To support subservers that have APIs with name conflicts, pass the "prefix"
|
||||
flag. This will add the subserver name as a prefix to each method name:
|
||||
|
||||
```
|
||||
make ios tags="routerrpc" prefix=1
|
||||
make ios prefix=1
|
||||
```
|
||||
|
||||
### API docs
|
||||
|
@ -219,21 +219,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl,
|
||||
reflect.ValueOf(genInvoiceFeatures),
|
||||
)
|
||||
|
||||
// RouterRPC isn't conditionally compiled and doesn't need to be
|
||||
// populated using reflection.
|
||||
case *routerrpc.Config:
|
||||
subCfgValue := extractReflectValue(subCfg)
|
||||
|
||||
subCfgValue.FieldByName("NetworkDir").Set(
|
||||
reflect.ValueOf(networkDir),
|
||||
)
|
||||
subCfgValue.FieldByName("MacService").Set(
|
||||
reflect.ValueOf(macService),
|
||||
)
|
||||
subCfgValue.FieldByName("Router").Set(
|
||||
reflect.ValueOf(chanRouter),
|
||||
)
|
||||
subCfgValue.FieldByName("RouterBackend").Set(
|
||||
reflect.ValueOf(routerBackend),
|
||||
)
|
||||
|
||||
case *watchtowerrpc.Config:
|
||||
subCfgValue := extractReflectValue(subCfg)
|
||||
@ -266,6 +254,12 @@ func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl,
|
||||
}
|
||||
}
|
||||
|
||||
// Populate routerrpc dependencies.
|
||||
s.RouterRPC.NetworkDir = networkDir
|
||||
s.RouterRPC.MacService = macService
|
||||
s.RouterRPC.Router = chanRouter
|
||||
s.RouterRPC.RouterBackend = routerBackend
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user