Commit Graph

407 Commits

Author SHA1 Message Date
Joost Jager
c33d94ff27
routing+routerrpc: add multiple outgoing channel restriction 2020-05-12 07:17:24 +02:00
Olaoluwa Osuntokun
db7eac35d0
Merge pull request #4253 from Roasbeef/fix-go12-duration
cmd/lncli: remove usage of Millisecond() for Go 1.12
2020-05-08 16:20:39 -07:00
Olaoluwa Osuntokun
352d45a11e
cmd/lncli: remove usage of Millisecond() for Go 1.12
The new table format for the pay command started to use the
`Millisecond()` method on `time.Duration`. However, this method was only
added in Go 1.13, so this breaks the build for Go 1.12. We replace this
by manual division. `time.Duration` "natively" is in nanoseconds, so we
covert to milli seconds by dividing my `time.Millisecond`, which is
1,000,000.
2020-05-06 16:22:47 -07:00
carla
f3212057dd
walletrpc: add list sweeps to rpc and cli 2020-05-06 09:25:44 +02:00
carla
537dac3c62
multi: specify start and end height for ListTransactionDetails
Add start and end height parameters to the rpc and cli GetTransactions
endpoints. Default to returning all transactions from genesis to tip,
including unconfirmed transactions to maintain backwards compatibility.
2020-05-05 21:10:06 +02:00
Oliver Gugger
d765e73e57
lncli: add PSBT publish warning 2020-04-26 21:05:13 +02:00
Joost Jager
f6b2410011
routing+routerrpc: rename max_shards to max_parts
Don't introduce a new term and align with the P in MPP.
2020-04-22 14:49:19 +02:00
Joost Jager
8d7e07d96b
lncli: live table-based payment updates 2020-04-22 14:49:17 +02:00
Olaoluwa Osuntokun
cd9c1c7746 Revert "lncli: live table-based payment updates"
This reverts commit 6ffdf7ef1fa080844af9fced3a57e54d0ee22729.
2020-04-21 18:03:57 -07:00
Joost Jager
6ffdf7ef1f
lncli: live table-based payment updates 2020-04-21 17:02:15 -07:00
Joost Jager
d51bb65536
routerrpc+lncli: add flag to suppress in-flight updates
This is a preparation for enabling the REST interface on routerrpc.
It provides REST clients that don't support server-side streaming
via keep-alive connections to use the streaming endpoint in the
typical request/response pattern. The url just needs to contain
?no_inflight_updates=true and only the terminal response is sent
back before the connection is closed.
2020-04-21 17:02:09 -07:00
Joost Jager
d451ef4ee1
routerrpc: rename rpcs to SendPaymentV2 and TrackPaymentV2
The message in the response stream changed. Rename the calls themselves,
to prevent older applications from getting decode errors. Especially
troublesome is the case where the request is executed (send payment),
but the application can't read the outcome (payment sent or not?)
2020-04-21 20:36:58 +02:00
Olaoluwa Osuntokun
7b066ad91e
Merge pull request #4190 from guggero/fix-windows-build
make+lnd+config: fix Windows build and version string
2020-04-14 19:57:26 -07:00
Oliver Gugger
1e3b0672d7
config+lnd+lncli: add commit back to version string 2020-04-14 15:51:44 +02:00
Joost Jager
969eecc7d2
routing+routerrpc+lncli: rename MaxHtlcs to MaxShards 2020-04-14 10:31:59 +02:00
Conner Fromknecht
f93a8ab7d0
cmd/lncli: add version command that reads verrpc.GetVersion 2020-04-10 16:39:31 -07:00
Joost Jager
f5c3f930c4
lncli: expose max payment htlcs 2020-04-09 08:20:50 +02:00
Joost Jager
3ed3c90efe
lncli: add show_inflight flag 2020-04-08 09:26:35 +02:00
Joost Jager
af4abe7d58
routing+routerrpc: notify full payment structures
This commit fixes the inconsistency between the payment state as
reported by routerrpc.SendPayment/routerrpc.TrackPayment and the main
rpc ListPayments call.

In addition to that, payment state changes are now sent out for every
state change. This opens the door to user interfaces giving more
feedback to the user about the payment process. This is especially
interesting for multi-part payments.
2020-04-08 09:26:33 +02:00
Olaoluwa Osuntokun
7e6f3ece23
Merge pull request #3960 from bitromortac/listpayments-pagination
channeldb+lnrpc+lncli: listpayments pagination support
2020-04-07 17:06:37 -07:00
bitromortac
4593cfa6c6 lncli: modify listpayments to use queried payments and update cli docs 2020-04-07 07:03:51 +02:00
Conner Fromknecht
3233388750
cmd/lncli: move invoice-related cmds to Invoices category
The Payments category is getting quite large, so this commit breaks out
the invoice-related commands into their own category.
2020-04-06 14:24:08 -07:00
Conner Fromknecht
4aceaba1be
cmd/lncli: move invoice commands to cmd_invoice.go 2020-04-06 14:23:21 -07:00
Joost Jager
6b649eeb10
lncli: remove unused type chain 2020-03-31 22:05:00 +02:00
Joost Jager
37849194f4
lncli: add trackpayment command 2020-03-31 21:41:32 +02:00
Joost Jager
dead6a772a
lncli: use routerrpc for payments 2020-03-31 21:41:28 +02:00
Joost Jager
f060da3971
lncli: move payment commands to separate file 2020-03-31 21:41:26 +02:00
Joost Jager
ffa7bed7f0
build+routerrpc+lncli: remove routerrpc conditional compilation 2020-03-31 21:41:22 +02:00
Oliver Gugger
c892227953
lncli: add PSBT to openchannel command
We add a new flag --psbt to the openchannel command which triggers
an interactive conversation between the command line and the user.
2020-03-31 09:17:26 +02:00
Oliver Gugger
8b05d1b61f
lncli: move openChannel command to new file
This is a pure code move!
2020-03-31 09:17:25 +02:00
Andras Banki-Horvath
5a4d595e53 lncli: group graph queries under Graph category
This commit moves DescribeGraph, GetNodeInfo and GetChanInfo under the
Graph category.
2020-03-27 13:56:10 +01:00
Andras Banki-Horvath
7e50997bb4 lnrpc: add betweenness centrality to GetNodeMetrics (new RPC call)
This commit extends the RPC interface with GetNodeMetrics will contain
all graph node metrics in the future. Currently only holds betweennes
centrality per node.
2020-03-27 13:56:08 +01:00
Joost Jager
fa115b543d
lncli: add bumpchannelclose command
This command allows users to easily bump the fee on their unconfirmed
closing transactions.
2020-03-18 12:27:06 +01:00
carla
4c48d0361d
lnrpc+lncli: display peer errors in listpeers
This change adds a set of errors to the peer struct returned by list
peers. A latest error boolean is added to allow for more succinct
default lncli responses.
2020-03-17 08:22:50 +02:00
Oliver Gugger
f55860ccd8
lncli: fix windows compilation 2020-03-11 10:07:43 +01:00
Oliver Gugger
ed8924c6c5
lncli: allow unlock with password from stdin 2020-03-10 14:29:45 +01:00
Oliver Gugger
9aff896b10
lnrpc+rpcserver+lncli: rename RPC fields to previous JSON name 2020-03-07 11:24:13 +01:00
Oliver Gugger
e435cd5fc6
lncli: use original snake_case names for JSON serializing
Because we now use printRespJSON everywhere where we print RPC
responses as JSON, we can simply instruct the jsonpb marshaler to
use the original snake_case name specified in the proto file for
the JSON field names and not the default camelCase.
2020-03-07 11:22:36 +01:00
Oliver Gugger
165769ea82
lncli: use printRespJSON for probability response 2020-03-07 11:22:35 +01:00
Conner Fromknecht
11532df5f3
cmd/lncli: add --peer flag to list channels
This commit adds a flag to listchannels that filters by remote pubkey.
2020-03-05 20:44:18 -08:00
bitromortac
926d4ba52e lncli: change listinvoices reversed flag to paginate-forwards
This commit renames the `reversed` pagination flag to
`paginate-forwards`, which is off by default. In order to
access older invoices one can set the paginate-forwards flag,
which is more intuitive than setting the reversed flag to false.
2020-02-25 11:33:55 +01:00
Joost Jager
ae9c6faebf
Merge pull request #3809 from joostjager/anchor-sweeper
sweep: allow force sweeping of negatively yielding inputs
2020-01-23 11:46:46 +01:00
Conner Fromknecht
51dbdd3b38
multi: rename key_send, key-send and key send to keysend 2020-01-16 18:37:16 -08:00
Joost Jager
b0aae13d70
sweep: allow force sweeps 2020-01-15 16:56:44 +01:00
Conner Fromknecht
51306f4ecd
lncli: fix sendcoins docs, allow base58 or bech32 addrs 2020-01-15 05:01:42 -08:00
Joost Jager
d978b55701
lncli: add custom data payment flag 2020-01-14 13:01:45 +01:00
Conner Fromknecht
b3f2a94c3b
lncli: improve last_hop help message
Clarifies that last_hop is not the destination, but the penultimate node
in the path, i.e. the last intermediary.
2020-01-09 17:57:52 -08:00
Joost Jager
280611ab6e
sweep+walletrpc+lncli: report requested fee preference for pending sweeps
Previously only the fee rate used for the last sweep (the sweep bucket
average) was reported. This commit adds the request fee preference to
the report, which is used to select a bucket and the sweep tx fee rate.
2020-01-09 14:56:08 +01:00
Olaoluwa Osuntokun
22e1f006b1
Merge pull request #3870 from Septem151/rpc-autopilot-fix
Fix typo in "query" rpc for autopilot.
2020-01-02 16:03:05 -08:00
Joost Jager
b1206f67c2
lncli: send key
Extend lncli with a flag that indicates the intention to send
a spontaneous payment. lncli will generate a preimage/hash combination
and send the preimage as a custom record to the recipient.
2019-12-23 21:51:23 +01:00
Joost Jager
15eedd2b1a
lncli: remove debug send
Debug send has been removed some time ago. This is a left over.
2019-12-23 21:51:13 +01:00
Carson Mullins
74d48510c8
Fix typo in "query" rpc for autopilot. 2019-12-22 20:19:36 -06:00
Conner Fromknecht
153cd58c97
lnrpc+lncli: reorder getinfo and use printRespJSON 2019-12-20 01:05:27 -08:00
Conner Fromknecht
8f5d78c875
build+lncli: default to hex encoding for byte slices
This commit swaps out golang/protobuf/jsonpb for a custom variant that
by default prints byte slices as hex, which is more useful for our
setting. Some existing wrapper structs are removed as they can now be
printed directly with the new jsonpb.

!!! NOTE !!!

This commit introduces a breaking change to lncli listinvoices since
payment hashes and preimages will now be printed in hex instead of
base64.
2019-12-20 01:05:08 -08:00
Johan T. Halseth
f28b809778
Merge pull request #3845 from halseth/dialer-withcontext-dialer
[trivial] lncfg+lncli: replace WithDialer->WitchContextDialer
2019-12-19 22:08:02 +01:00
carla
6eab2a06dd
lnrpc+lncli: add feature bits to GetInfo 2019-12-17 23:21:14 +02:00
carla
c27d60b6d1
lncli: add option upfront shutdown to openchannel 2019-12-17 23:18:33 +02:00
Johan T. Halseth
b3b355659b
lncfg+lncli: replace WithDialer->WitchContextDialer
WithDialer is deprecated, use WitchContextDialer instead.
2019-12-17 13:37:29 +01:00
Wilmer Paulino
1fb28b6cd9
Merge pull request #3745 from akovalenko/master
lncli addholdinvoice: allow specifying msat with --amt_msat
2019-12-13 10:45:16 -08:00
Joost Jager
b6eb3a69ba
routing+lnrpc+lncli: allow setting min htlc policy 2019-12-11 00:17:08 +01:00
carla
ef4d9334b7
lncli: Add optional delivery address to close channel
This commit is adapted from @Bluetegu's original
pull request #1462.
2019-12-10 09:13:00 +02:00
Anton Kovalenko
298f35cdfb lncli addholdinvoice: allow specifying msat with --amt_msat
* pass amt and amt_msat to rpc, letting server give an error if both
are present
* take amt from an extra argument if neither amt nor amt_ms are present
2019-12-09 18:45:27 +03:00
Olaoluwa Osuntokun
9079dfbd33
cmd/lncli: exit if user opts to not recover SCB files 2019-12-04 19:24:35 -08:00
Olaoluwa Osuntokun
03ee8c047a
Merge pull request #3698 from aantonop/warn_before_SCB_restore
Warn user before doing SCB restore
2019-12-04 19:17:30 -08:00
Joost Jager
2d19201ede
lnrpc+routerrpc+lncli: add allow_self_payments safety flag 2019-11-26 10:15:46 +01:00
Olaoluwa Osuntokun
cb2b8b4513
Merge pull request #3693 from cfromknecht/tlv-invoice
migrate to tlv for invoice body
2019-11-25 18:00:52 -06:00
Conner Fromknecht
76a2dfd8a6
lnrpc: remove receipt field from invoice 2019-11-22 02:23:24 -08:00
Joost Jager
cdf1aa5bc1
routing: track amt ranges in mc 2019-11-22 11:17:28 +01:00
Joost Jager
62f8cca75b
routing+routerrpc: also expose amt for success results in mc 2019-11-22 11:17:26 +01:00
Andreas M. Antonopoulos
651ca47f37 Warn user before doing SCB restore
SCB restore closes all open channels. We need to warn users that this is what will happen if they try to do an SCB restore.
2019-11-21 08:38:28 -05:00
Joost Jager
f28941c7e4
routing+routerrpc+lncli: enable last hop restriction for payments 2019-11-18 21:03:03 +01:00
Oliver Gugger
7470f696ae
cmd/lncli: increase gRPC max message receive size to 200MiB 2019-11-15 16:21:20 +01:00
Joost Jager
fcf81ed8ff
Merge pull request #3556 from joostjager/query-mc-prob
routerrpc: add queryprob rpc
2019-10-31 08:03:29 +01:00
Joost Jager
fb57255b5c
routerrpc: add mc probability query rpc
Probabilities are no longer returned for querymc calls. To still provide
some insight into the mission control internals, this commit adds a new
rpc that calculates a success probability estimate for a specific node
pair and amount.
2019-10-29 12:32:19 +01:00
Joost Jager
04e7c98461
routerrpc: create pair data proto message
With a separate proto message, it becomes possible to also return the
pair data for a single pair. This prepares for the new mc probability
querying rpc.
2019-10-29 12:32:17 +01:00
Oliver Gugger
1270a8ebae
lncli: add command for baking new macaroons 2019-10-24 10:25:38 +02:00
Joost Jager
fab13900e2
routing+routerrpc: remove probability estimates from mc state snapshot
Probability estimates are amount dependent. Previously we assumed an
amount, but that starts to make less sense when we make probability more
dependent on amounts in the future.
2019-10-22 15:52:36 +02:00
Wilmer Paulino
cbf7e4886a
multi: extend QueryRoutes RPC with CLTV limit field 2019-10-11 18:07:39 -04:00
Olaoluwa Osuntokun
2a3538fec8
Merge pull request #3360 from tyzbit/3357_start-time
rpcserver: startTime defaults to the unix epoch
2019-10-07 16:48:23 -07:00
tyzbit
be989a85ff lncli: start_time defaults to 24 hours ago
Here we set start_time to 24 hours prior
if it's not provided on the CLI.  The
effect of this is when you don't provide
a start_time:

CLI: -24h
RPC: Unix Epoch
2019-10-03 18:12:39 -04:00
tyzbit
8891346cb2 rpcserver: startTime defaults to the unix epoch
Fixes https://github.com/lightningnetwork/lnd/issues/3357.  When
start_time isn't specified, its default value is 0.  This meant when
users explicitly specified a start_time of 0, we would incorrectly set
start_time to 24 hours in the past.  Now, n0 means n0.
2019-10-03 18:12:21 -04:00
Joost Jager
b58dbb2d70
multi: fix canceled spelling 2019-10-03 17:27:36 +02:00
Lars Lehtonen
dade977d7b
cmd: stdlib context 2019-09-28 15:44:45 -07:00
Olaoluwa Osuntokun
18f88cbd8d
Merge pull request #3440 from joostjager/buildroute
routing: add build route functionality
2019-09-24 20:24:24 -07:00
Joost Jager
03d33cbd6b
lncli: update SendToRoute to also parse new route format 2019-09-24 10:00:48 +02:00
Joost Jager
6328b2e989
lncli: add BuildRoute function 2019-09-24 10:00:46 +02:00
Valentine Wallace
5aefe8bc70
lncli: allow users to update max HTLC channel policies
In this commit, we enable callers of UpdateChannelPolicy to
specify their desired max HTLC forwarding policy for one or
multiple channels over lncli.
2019-09-23 13:07:14 +02:00
Conner Fromknecht
7252e175dc
lncli+wtclientrpc: remove wtclientrpc build tag, compile by default 2019-09-18 17:26:15 -07:00
Joost Jager
3d7de2ad39
multi: remove dead code 2019-09-10 17:21:59 +02:00
Johan T. Halseth
fa21601d07
lnd+cmd/lnd/main: add ListenerCfg to Main
ListenerCfg allows passing custom listeners to the main method, to be
used for the wallet unlocker and rpc server. If these are set these will
be used instead of the regular RPC listeners.
2019-09-05 09:22:54 +02:00
Olaoluwa Osuntokun
c397a2ea78
Merge pull request #3438 from alrs/fix-cmd-error
cmd/lncli: Fix dropped error
2019-09-03 19:59:30 -07:00
Wilmer Paulino
06f544a78c
cmd/lncli: return error upon missing channel backup when parsing 2019-09-03 14:04:38 -07:00
Lars Lehtonen
686fee57ee cmd/lncli: Fix dropped error 2019-09-03 12:29:26 -07:00
Joost Jager
ff0c5a0d5e
routing: process successes in mission control
This commit modifies paymentLifecycle so that it not only feeds
failures into mission control, but successes as well.
This allows for more accurate probability estimates. Previously,
the success probability for a successful pair and a pair with
no history was equal. There was no force that pushed towards
previously successful routes.
2019-08-23 09:15:41 +02:00
Olaoluwa Osuntokun
80c6759140
Merge pull request #3400 from wpaulino/lncli-getinfo-synced-to-graph
cmd/lncli: properly set synced_to_graph for getinfo command
2019-08-16 12:58:02 -07:00
Wilmer Paulino
51216c6e5e
cmd/lncli: properly set synced_to_graph for getinfo command 2019-08-13 17:40:18 -07:00
Joost Jager
f1769c8c8c
routing: convert to node pair based
Previously mission control tracked failures on a per node, per channel basis.
This commit changes this to tracking on the level of directed node pairs. The goal
of moving to this coarser-grained level is to reduce the number of required
payment attempts without compromising payment reliability.
2019-08-13 19:21:37 +02:00
Wilmer Paulino
787986283c
cmd/lncli: add watchtower client commands 2019-07-30 15:18:16 -07:00
carla
d5b662d066 cmd: Add retry for password capture in create wallet 2019-07-20 14:48:25 -04:00
Joost Jager
541e5f4af7
lncli: add use_mc flag 2019-07-18 15:49:30 +02:00