Commit Graph

568 Commits

Author SHA1 Message Date
Johan T. Halseth
f0bd4e775b
Merge pull request #3775 from halseth/mobile-listener-signal
[mobile] make Ready signal for custom listeners
2019-12-17 12:26:04 +01:00
Conner Fromknecht
990bdd6b64
lnrpc: display remote peer features via rpc 2019-12-14 07:05:07 -08:00
Conner Fromknecht
db0029d03d
lnrpc: add node features to LightningNode and NodeInfo 2019-12-14 07:04:51 -08:00
Joost Jager
d16476e477
routerrpc+record: move custom set validation 2019-12-12 17:49:34 +01:00
Joost Jager
75b94dec2b
Merge pull request #3819 from joostjager/fix-custom-record-payment
multi: fix custom record payment
2019-12-12 14:33:05 +01:00
Conner Fromknecht
aba49c9a5a
rpcserver: populate features on lnrpc invoices
In the process, we also move the feature serialization into the
invoicesrpc package, so that it can be shared between the invoicesrpc
and main rpcserver.
2019-12-12 00:12:51 -08:00
Olaoluwa Osuntokun
338175534e
Merge pull request #3812 from guggero/sign-custom
signrpc: sign and verify messages with custom key
2019-12-11 18:51:55 -08:00
Joost Jager
d02de70d20
multi: do not use tlv.Record outside wire format handling
This commit prepares for more manipulation of custom records. A list of
tlv.Record types is more difficult to use than the more basic
map[uint64][]byte.

Furthermore fields and variables are renamed to make them more
consistent.
2019-12-12 00:14:58 +01:00
Oliver Gugger
95226771ed
signrpc+rpcserver: add signer macaroon permissions 2019-12-11 22:37:40 +01:00
Joost Jager
b6eb3a69ba
routing+lnrpc+lncli: allow setting min htlc policy 2019-12-11 00:17:08 +01:00
Joost Jager
ddb98fcc41
multi: distinguish between htlc in and out constraints 2019-12-11 00:16:57 +01:00
Conner Fromknecht
1367187454
multi: set invoice feature bits using feature manager 2019-12-10 13:09:52 -08:00
Conner Fromknecht
a168f37b9c
lnwire+rpcserver: populate feature bits on decodepayreq 2019-12-10 13:09:36 -08:00
carla
94d3eb60a4
multi: Use user provided close address for cooperative closes
This commit is adapted from @Bluetegu's original
pull request #1462.

This commit reads an optional address to pay funds out to
from a user iniitiated close channel address. If the channel
already has a shutdown script set, the request will fail if
an address is provided. Otherwise, the cooperative close will
pay out to the address provided.
2019-12-10 09:13:01 +02:00
Olaoluwa Osuntokun
47235e2f98
lnrpc: add msats to return value of DecodePayReq
In this commit, we add `msats` to the return value of `DecodePayReq` to
ensure we always show full value information as we're moving to do
generally for all RPC calls that deal with off-chain amounts.
2019-12-06 15:48:30 -08:00
Conner Fromknecht
abb7f4fa9e
lnrpc+rpcserver: add payment_addr field to PayReq 2019-12-05 07:59:47 -08:00
Joost Jager
352334d470
lnrpc: re-enable custom records
This commit also renames the rpc field for consistency. As it wasn't
functional and the id doesn't change, this isn't considered a breaking
change.
2019-12-04 13:27:33 +01:00
Joost Jager
5d4ceca038
tlv: remove unused error return value
This commit also modifies a previous migration. Because the change is so
limited, we don't consider this a significant risk.
2019-12-04 13:27:29 +01:00
Johan T. Halseth
dc6c040803
lnd: make Ready signal for custom listeners
This allows the caller to know when lnd is ready to accept RPC calls,
which is inmportant for mobile applications where eveything happens in
process.
2019-11-29 11:59:01 +01:00
Joost Jager
2d19201ede
lnrpc+routerrpc+lncli: add allow_self_payments safety flag 2019-11-26 10:15:46 +01:00
Conner Fromknecht
76a2dfd8a6
lnrpc: remove receipt field from invoice 2019-11-22 02:23:24 -08:00
Olaoluwa Osuntokun
6f9fcfaccc
Merge pull request #3499 from cfromknecht/mpp-payments-rpc
channeldb+rpcserver: expose legacy payments as multi-path payments
2019-11-21 18:38:53 -08:00
Olaoluwa Osuntokun
32965fd4be
rpc: update AbandonChannel to remove state from cnct, nursery and graph
In this commit, we update the `AbandonChannel` method to also remove the
state from the countract court as well as the channel graph. Abandoning
a channel is now a three step process: remove from the open channel
state, remove from the graph, remove from the contract court. Between
any step it's possible that the users restarts the process all over
again. As a result, each of the steps below are intended to be
idempotent.

We also update the integration test to assert that no channel is found
in the graph any longer. Before this commit, this test would fail as the
channel was still found in the graph, which can cause other issues for
an operational daemon.

Fixes #3716.
2019-11-20 17:42:58 -08:00
Conner Fromknecht
997500b08d
lnrpc+rpcserver: populate experimental MPP fields in ListPayment rpc 2019-11-19 20:41:44 -08:00
Conner Fromknecht
77602451b8
channeldb: add MPPayment from FetchPayments 2019-11-19 20:41:08 -08:00
Conner Fromknecht
fbd599a2cb
multi: rename Payment.PaymentPreimage to Payment.Preimage
Preliminary step to exposing PaymentPreimage() as a method that can be
shared between legacy payments and mutli-path payments.
2019-11-19 20:40:29 -08:00
Joost Jager
f28941c7e4
routing+routerrpc+lncli: enable last hop restriction for payments 2019-11-18 21:03:03 +01:00
Joost Jager
88f037f8fd
Merge pull request #3729 from joostjager/invoice-msat
invoicesrpc+lnrpc: add msat fields to invoices
2019-11-18 08:39:16 +01:00
Johan T. Halseth
840051cc3d
Merge pull request #3644 from joostjager/commit-sweep-no-nursery
cnct: commit sweep without nursery
2019-11-15 10:38:57 +01:00
Joost Jager
fcbf1bc07a
invoicesrpc+lnrpc: add msat fields to invoices 2019-11-15 08:59:35 +01:00
Joost Jager
9acb236665
cnct: remove nursery dependency in commit sweep resolver
The channel arbitrator no longer passes the direct commitment output to
the nursery for incubation. Instead the resolver itself will await the
csv lock if any.

The reason to change this now is to prevent having to deal with the
(legacy) nursery code for a planned anchor outputs related change to the
commit sweep resolver (also csv lock to_remote).

It is no problem if there are any lingering incubating outputs at the
time of upgrade. This just means that the output will be offered twice
to the sweeper and this doesn't hurt.
2019-11-14 13:38:01 +01:00
Joost Jager
09b3101b80
lnrpc+routerrpc+lncli: add amt and fee limit msat fields 2019-11-13 10:32:35 +01:00
Joost Jager
1597a92160
cnct: add resolver report output type
This commit prepares for the commit sweep resolver to report on its
state.
2019-11-13 10:17:28 +01:00
Joost Jager
e0a3f803d5
lnrpc: extract fee limit calculation 2019-11-12 14:24:53 +01:00
Olaoluwa Osuntokun
777ed104a3
chainfee: create new chainfee package extracting fees from lnwallet
In this commit, we create a new chainfee package, that houses all fee
related functionality used within the codebase. The creation of this new
package furthers our long-term goal of extracting functionality from the
bloated `lnwallet` package into new distinct packages. Additionally,
this new packages resolves a class of import cycle that could arise if a
new package that was imported by something in `lnwallet` wanted to use
the existing fee related functions in the prior `lnwallet` package.
2019-10-31 16:41:57 -07:00
Wilmer Paulino
13b56d5849
Merge pull request #3632 from wpaulino/server-not-active-closechannel
rpcserver: ensure server has started before CloseChannel
2019-10-28 17:01:21 -04:00
carla
31bf542276 lnrpc: Add experimential uptime and lifetime fields to list channels
This commit adds the total observed lifetime of a channel and the
totaluptime of its remote peer to the lnrpc channel struct. These
fields are marked as experimential because they are subject to
change.
2019-10-25 11:41:16 +02:00
Olaoluwa Osuntokun
fe597b6310
rpc: add forgotten 'address' entity to validEntities
The `address` entity is used by the `WalletKit` sub-server for certain
calls.
2019-10-24 19:44:24 -07:00
Olaoluwa Osuntokun
b110a3a197
Merge pull request #1160 from guggero/new-macaroon
lncli: add command to create new macaroon
2019-10-24 19:41:51 -07:00
Wilmer Paulino
a469d5dc2c
Merge pull request #2327 from ottosuess/invoice_macaroon_permissions
lnrpc: allow invoice.macaroon to read onchain transactions
2019-10-24 12:15:16 -04:00
Oliver Gugger
6a463de7a2
lnrpc: add command for baking new macaroons 2019-10-24 10:25:32 +02:00
Wilmer Paulino
dd55d43520
rpcserver: ensure server has started before CloseChannel
We do this as a general sanity check to ensure channels cannot be closed
while either the backend is still syncing or the server is still
starting.
2019-10-23 17:40:38 -04:00
Wilmer Paulino
955d143c1b
server+lntest: extract ErrServerNotActive error 2019-10-23 17:37:15 -04:00
bitromortac
3af91fc9b9 lnd+lnrpc: add msat forwarding amount fields to ForwardingHistory 2019-10-16 19:50:58 +02:00
Conner Fromknecht
c10eacaa24
Merge pull request #3532 from guggero/refactor-log-writer
build+lnd: refactor reusable log file rotator code into build package
2019-10-16 12:59:39 +02:00
Oliver Gugger
3ca2c363fe
lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
Oliver Gugger
3ea74c4362
build: move log level parse code and add new leveled sub logger interface 2019-10-14 14:56:30 +02:00
Wilmer Paulino
0fc401de19
routing+routerrpc: take max cltv limit into account within path finding
With the introduction of the max CLTV limit parameter, nodes are able to
reject HTLCs that exceed it. This should also be applied to path
finding, otherwise HTLCs crafted by the same node that exceed it never
left the switch. This wasn't a big deal since the previous max CLTV
limit was ~5000 blocks. Once it was lowered to 1008, the issue became
more apparent. Therefore, all of our path finding attempts now have a
restriction of said limit in in order to properly carry out HTLCs to the
network.
2019-10-11 18:04:49 -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
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