Commit Graph

657 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
3190437188
Merge pull request #4139 from carlaKC/lnrpc-listsweeps
lnrpc: add block height params to GetTransactions and add ListSweeps
2020-05-07 16:44:05 -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
Olaoluwa Osuntokun
cc1dbb5677
channeldb: eliminate extra copy in QueryPayments
In this commit, we eliminate an extraneous copy in the `QueryPayments`
method. Before this commit, we would copy each payment from the initial
FetchPayments call into a new slice. However, pointers to payments are
return from `FetchPayments`, so we can just maintain that same reference
rather than copying again when we want to limit our response.
2020-05-04 12:13:47 -07:00
Conner Fromknecht
1bfe52837d
Merge pull request #4176 from wpaulino/listchannels-uptime-before-server-active
rpcserver: omit uptime in ListChannels response if server not started
2020-04-30 20:33:37 -07:00
Olaoluwa Osuntokun
9f5f48b20d
Merge pull request #4089 from fguisso/acceptor
rpcserver: parameterize acceptortimeout
2020-04-30 19:03:55 -07: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
969eecc7d2
routing+routerrpc+lncli: rename MaxHtlcs to MaxShards 2020-04-14 10:31:59 +02:00
Wilmer Paulino
893c0cf843
rpcserver: omit uptime in ListChannels response if server not started
If the server hasn't fully started yet, it's possible that the channel
event store hasn't either, so it won't be able to consume any requests
until then. To prevent blocking, we'll just omit the uptime related
fields for now.
2020-04-10 18:31:46 -07:00
Wilmer Paulino
17ca1d78f0
rpcserver: include upfront shutdown script in ListChannels response
This field could be omitted from the response if we were unable to
calculate the channel's uptime.
2020-04-10 18:26:31 -07:00
Conner Fromknecht
91cd7e633a
lnrpc+rpcserver: expose git commit hash in getinfo 2020-04-10 16:39:31 -07:00
Conner Fromknecht
5c04038c18
bulid: only return semantic version from Version()
The version field in getinfo is kept the same for backwards
compatibility.
2020-04-10 16:39:23 -07:00
Olaoluwa Osuntokun
363caa441a
rpc: allow wumbo invoices
In this commit, we remove the restriction surrounding the largest
invoices that we'll allow a user to create. After #3967 has landed,
users will be able to send in _aggregate_ a payment larger than the
current max HTLC size limit in the network. As a result, we can just
treat that value as the system's MTU, and allow users to request
payments it multiples of that MTU value.

A follow up to this PR at a later time will also allow wumbo _channels_.
However, that requires us to tweak the way we scale CSV values, as post
wumbo, there is no true channel size limit, only the
_local_ limit of a given node. We also need to implement a way for nodes
to signal to other nodes their accepted max channel size.
2020-04-09 19:02:08 -07:00
Joost Jager
e9bd691e6a
routerrpc+routing: adapt payment session for multi shard send
Modifies the payment session to launch additional pathfinding attempts
for lower amounts. If a single shot payment isn't possible, the goal is
to try to complete the payment using multiple htlcs. In previous
commits, the payment lifecycle has been prepared to deal with
partial-amount routes returned from the payment session. It will query
for additional shards if needed.

Additionally a new rpc payment parameter is added that controls the
maximum number of shards that will be used for the payment.
2020-04-09 08:20:49 +02:00
Joost Jager
327634e9f7
routerrpc: move payment marshalling 2020-04-08 08:53:57 +02:00
bitromortac
39c58d9d14 lnrpc: use queried payments to list payments in the rpc
Changes the grpc proto file, generates the protobuf, and
enables a queried way to retrieve payments in the rpc, where
backward compatibility is enforced by returning all payments
in the database by default. Adds a payment index field to
the returned payments of the rpc call.
2020-04-07 07:03:51 +02:00
Olaoluwa Osuntokun
e52c5df8ab
Merge pull request #4140 from carlaKC/lnrpc-pendingchannelinitiator
lnrpc: use initiator enum for pending channel open initiator
2020-04-06 15:46:46 -07:00
carla
d66ff04583
lnrpc: use initiator enum for pending channel channel intiator
Update the PendingChannel message from a bool to an enum to
differentiate between the case where the remote party initiated the
channel and we have no record of the channel initiator. The previous
field has not been included in a release of lnd, so we can replace the
field directly.
2020-04-03 11:26:21 +02:00
carla
2ae61162db
lnrpc: move initiator enum out of close summary
Move enum out of CloseSummary struct for more general use. This does
not change the encoding of the enum, and will only cause compile time
errors for existing clients. This enum has not been included in a
release yet, so we can make this move without much disruption.
2020-04-03 11:26:11 +02:00
Conner Fromknecht
d1fa33c8eb
rpcserver: only block co-op close for frozen chans
This commit fixes a recent issue from #4081 that would prevent a frozen
channel from being force closed via the rpc. We correct this, so that
only the co-op path is inhibited.
2020-04-02 17:40:08 -07:00
Conner Fromknecht
3c371dd633
rpcserver: remove NewLightningChannel usage in CloseChannel 2020-04-02 17:39:47 -07:00
Conner Fromknecht
ec784db511
multi: remove returned error from WipeChannel
The linter complains about not checking the return value from
WipeChannel in certain places. Instead of checking we simply remove the
returned error because the in-memory modifications cannot fail.
2020-04-02 17:39:29 -07:00
Olaoluwa Osuntokun
77df8e3a43
Merge pull request #4130 from cfromknecht/open-channel-refactor
rpcserver: align OpenChannel + OpenChannelSync request parsing
2020-03-31 18:05:00 -07:00
Conner Fromknecht
66d02504f9
rpcserver: align OpenChannel+OpenChannelSync req parsing
This commit consolidates our request parsing for OpenChannel and
OpenChannelSync which removes a good deal of code duplication.
2020-03-31 11:24:13 -07:00
Joost Jager
baffe156db
lnrpc: expose commitment type on pending open and waiting close channels 2020-03-31 19:35:52 +02:00
Joost Jager
41573004a3
lnrpc: extract rpcCommitmentType 2020-03-31 19:35:50 +02:00
Conner Fromknecht
c1f9c56e5b
rpcserver: add self-node check in OpenChannelSync 2020-03-31 10:21:29 -07:00
Conner Fromknecht
303d441d4d
rpcserver: ensure OpenChannel+OpenChannelSync parse NodePubkey 2020-03-31 10:21:29 -07:00
Conner Fromknecht
1823840ed6
rpcserver: add missing channel limit check to OpenChannelSync 2020-03-31 10:21:29 -07:00
Conner Fromknecht
5660a26b60
rpcserver: add wallet sync check to OpenChannel 2020-03-31 10:21:24 -07:00
Oliver Gugger
376a747bb2
rpcserver: implement PSBT funding flow
A PSBT funding flow consists of multiple steps. We add new RPC
messages that can trigger the underlying state machine to transition
to a new state. We also add new response messages that tell the
API user what the current state is.
2020-03-31 09:17:24 +02:00
Andras Banki-Horvath
93cb05142a lnrpc: rename FloatValue to FloatMetric
This commit renames lnrpc.FloatValue to lnrpc.FloatMetric as requested
in the final review of centrality PR.
2020-03-30 16:36:11 +02:00
Olaoluwa Osuntokun
eb10594381
Merge pull request #4092 from Crypt-iQ/peer_ll_0210
link+peer: buffer messages until link active
2020-03-27 13:20:25 -07:00
Andras Banki-Horvath
608354032c autopilot: parallelize betweenness centrality
This commit parallelizes betweenness centrality calculation, by
distributing the algo to N workers and creating partial results.
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
nsa
966cd2112c multi: link notifies subscribers of ActiveLinkEvent, rpc ignores 2020-03-27 08:49:46 -04:00
carla
9e1cdb78e7
lnrpc: deprecate unused pending closing channels field
The pending closing channels field was present to cover an edge case
where coperatively closed channels were closed before upgrade and
confirmed after the upgrade. This commit deprecates the field and adds
a warning log to cover these edge cases.
2020-03-25 08:48:19 +02:00
carla
8b83c1f7f9
lnrpc: add commit fees to WaitingPendingClose 2020-03-25 08:45:08 +02:00
carla
fd6b397496
lnrpc: add initiator bool to PendingChannel message 2020-03-25 08:42:26 +02:00
Olaoluwa Osuntokun
1ac7550e3f
chancloser: deny co-op close initiated by the chan initiator for frozen chans 2020-03-23 16:57:03 -07:00
Olaoluwa Osuntokun
8bce48d3cc
lnwallet/chanfunding: add new ThawHeight() method to ShimIntent+CannedAssembler
As frozen channels can only be created via the non-default channel
assembler, we extend both the ShimIntent and CannedAssembler to also
accept and expose this new channel status along with the thaw height.
2020-03-23 16:56:57 -07:00
carla
72e3b0a5d7
lnrpc: add push amount to listchannels 2020-03-19 13:20:26 +02:00
Olaoluwa Osuntokun
071c7cbe78
lnd: convert to use new kvdb abstraction 2020-03-18 19:35:23 -07:00
Joost Jager
e2052f7f65
Merge pull request #3758 from joostjager/anchor-output-poc-joost
cnct: anchor output sweeping and fee bumping
2020-03-18 18:59:06 +01:00
Joost Jager
d60303b092
lnrpc: expose commit hashes for waiting close channels
To make it easier to determine which pending sweep to bump in order to
get your anchor commitment tx confirmed.
2020-03-18 12:27:05 +01:00
Joost Jager
ab451f634e
cnct+lnrpc: report anchor resolution 2020-03-18 12:27:03 +01:00
Joost Jager
d84b596f55
cnct: do not ignore resolver reports after resolution
Preparation for anchor resolver. The recovered anchor amount should
still be included in the pending channel report even after it has been
resolved.

This also fixes an existing bug that in some cases caused the recovered
amount from an htlc resolver not to be included in the total.
2020-03-18 12:26:59 +01:00
Conner Fromknecht
b6a0bfcabe
Merge pull request #3848 from carlaKC/htlcnotifier-3-addhtlcnotifierrpc
[htlcnotifier 4/4]: lnrpc: Add HTLC Event Subscription
2020-03-17 16:37:52 -07:00
fguisso
5ab7dd89e7
rpcserver: parameterize acceptortimeout 2020-03-17 16:43:14 -03:00