Commit Graph

879 Commits

Author SHA1 Message Date
8578433b3d lnrpc+lnd: adds required reserve in walletbalance rpc 2022-06-28 23:31:51 +05:30
6b34ebbe44 rpcserver: fix wrong unit used in PushAmountSat 2022-05-16 05:49:05 +08:00
0ec88b5346 Merge pull request #6347 from yyforyongyu/5388-rm-revc-log
lnwallet+channeldb: store minimal info in revocation log bucket
2022-05-05 15:52:59 -07:00
a44e56b51a lnrpc: add new request/response fields for payment count 2022-05-02 12:32:06 +02:00
caf11d2607 rpcserver: expose interceptor required flag on info call 2022-04-25 11:05:18 +02:00
3ad9a42e65 rpcserver: remove unnecessary conversion 2022-04-25 11:05:04 +02:00
f42d1f2d62 multi: remove function BalancesAtHeight
This commit deletes the function `BalancesAtHeight` since its only
usague is to find the push amount, which can be achieved by saving the
initial balances.
Another reason to remove it is to pave the way to incooperate our new
revocation log. If we ever need this function again, we can add it back
by visiting all the revocation logs to calculate the balances at a given
height.
2022-04-20 01:18:13 +08:00
9195f29e61 routing+channeldb: send payment metadata from invoice 2022-04-13 22:55:40 +02:00
2a069b8b4e rpcserver: copy success variable of channel close update
Seems this was forgotten in a refactor a while back.
2022-04-12 19:30:11 +02:00
e4e0935816 lnrpc/peers: skeleton logic for updateNodeAnnouncement
Basic logic for the endpoint:

- Get the current nodeAnn information
- Calculate modifications
- Apply modifications
- Return changes
2022-04-01 18:36:21 -07:00
c73cf03a55 multi: add p2tr keyspend wallet support 2022-03-24 18:02:38 +01:00
4ecd153be2 lnrpc: add new locked balance field for WalletBalance
In this commit, we add a new field to the WalletBalance call that
permits users to account for the set of outputs that may be locked due
to a pending transaction. Without this field any time users locked
outputs for things like PSBT signing, then they disappear from the
WalletBalance call, which may cause a panic.
2022-03-17 16:36:44 -07:00
f13399bc49 Merge pull request #6190 from ErikEk/listunspent-deafult-values
walletrpc: add default values to listunspent
2022-03-16 16:16:45 -07:00
7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
45a2dc80c8 autopilot: implement cached ChannelGraph
Using the cached implementation of a ChannelGraph greatly speeds up the
conversion of the channel database to a SimpleGraph.
2022-03-07 11:15:47 +01:00
52d56a8990 lnrpc+autopilot: add graph diameter calculation
* adds a brute force computation of the diameter
* adds a more efficient calculation of the diameter
2022-03-07 11:15:47 +01:00
74db83bbfb walletrpc: add default values to listunspent 2022-02-17 10:05:16 +01:00
13f187046b multi: fix issues reported by whitespace linter 2022-02-15 16:26:08 +01:00
895a2e497b multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
ef1eff1058 lnrpc: fix the existing routing fee inaccuracy
When updating the channel routing policy, we encounter an inaccurate
precision error when calculating the routing fee. The issue stems from
the way the IEEE 754 standard works.

The solution here is to add a uint64 parameter (as mentioned in the
issue) and keep the float64 fee_rate parameter but rounding the product
of the base and fee rate.
2022-01-25 15:42:57 -08:00
530a2059e5 multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
1e3c05399c lnd+lnrpc: add private status to pendingchannels response 2022-01-18 09:42:14 +01:00
42cebcfe2b lnd: remove unused graph param from createRPCOpenChannel 2022-01-18 09:42:05 +01:00
99378b22c3 rpcserver: add closing txid in WaitingCloseChannel 2022-01-07 18:21:02 +08:00
3c1c640612 rpcserver: split PendingChannels into three sections
This commit refactors the method PendingChannels for maintenance
purpose.
2022-01-07 16:38:51 +08:00
eb11d4866f rpcserver: add remote balance for pending force close 2021-12-14 03:40:48 +08:00
93e5de9306 lnrpc: refactor populating lnrpc.Transaction inside SubscribeTransaction 2021-12-10 08:26:16 +01:00
53e02fa83d rpcserver: expose ChanStatusFlags in pending close
This commit exposes the ChanStatusFlags inside waitingCloseResp such
that the channel close type is exposed.
2021-12-08 04:50:23 +08:00
67e18e6089 rpc: optimize DescribeGraph by caching the response
Unfortunately, we can't use the graph cache directly here as it doesn't
include all the information we need, since it only includes the minimal
amount of information needed for path finding.

Instead, we use a simple mutex guarded cache that evicts itself after a
certain interval. The default is set small enough that most users
shouldn't really notice. We also provide a way to disable the cache, and
also disable the cache in the itests.

Fixes https://github.com/lightningnetwork/lnd/issues/1232
2021-11-04 15:30:31 -07:00
79406696ad rpc: optimize GetNetworkInfo by using the channel graph cache 2021-11-04 15:30:29 -07:00
6a1283cf0b lnrpc: log channel point in coop close warning
Use `Warnf` to include the chanpoint in the warning message instead of printing `%v` to the log
2021-10-22 13:20:55 -07:00
c9f6d788e2 lnrpc: add new CommitmentType for script enforced leased channels 2021-10-19 18:30:43 -07:00
e6c65f1cbd Merge pull request #5346 from joostjager/custom-messages
lnrpc+peer: custom peer messages
2021-10-18 19:07:39 -07:00
ade50d0b2c lnrpc: receive custom message 2021-10-15 17:08:55 +02:00
ae959b16ae lnrpc: send custom message 2021-10-15 17:08:53 +02:00
1541b2ef1b multi: create and list all default internal accounts 2021-10-14 15:42:56 +02:00
a3addcc927 multi: forward SendCoins call over RPC 2021-10-14 15:42:52 +02:00
0e279eb15a multi: refactor external subserver config
As a preparation for making more and more implementation details
configurable, we add a new ImplementationCfg struct that houses all the
interfaces that can be defined externally.
2021-10-08 12:08:23 +02:00
8b7c88537c multi: refactor SignDigestCompact into SignMessageCompact
To make it possible to use a remote lnrpc server as a signer for our
wallet, we need to change our main interface to sign the message instead
of the message's digest. Otherwise we'd need to alter the
lnrpc.SignMessage RPC to accept a digest instead of only the message
which has security implications.
2021-10-08 12:06:52 +02:00
d630b95c8b Merge pull request #5777 from orbitalturtle/buf-pass-macaroon
Lnd: Listen for RPC calls on a bufconn
2021-10-07 18:50:58 -07:00
51d19dad87 Merge pull request #5363 from guggero/psbt-no-final-tx
Allow skipping `PsbtFinalize` step during channel funding to support external broadcast
2021-10-04 12:37:51 +02:00
692ea25295 Merge pull request #5642 from guggero/in-memory-graph
In-memory graph cache for faster pathfinding
2021-10-04 11:20:23 +02:00
1608faf199 multi: allow skipping the PSBT finalize step
The FundingPsbtFinalize step is a safety measure that assures the final
signed funding transaction has the same TXID as was registered during
the funding flow and was used for the commitment transactions.
This step is cumbersome to use if the whole funding process is completed
external to lnd. We allow the finalize step to be skipped for such
cases. The API user/script will need to make sure things are verified
(and possibly cleaned up) properly.
2021-10-04 11:17:08 +02:00
218fa1e43e Rpcserver: Add GetAllPermissions function for retrieving permissions for external macaroon baking 2021-10-01 16:51:16 -05:00
a5a477e311 lnd: add optional change output index to check reserved wallet balance 2021-10-01 08:21:29 +02:00
fdcd726f9a multi: replace DefaultDustLimit with script-specific DustLimitForSize
This commit updates call-sites to use the proper dust limits for
various script types. This also updates the default dust limit used
in the funding flow to be 354 satoshis instead of 573 satoshis.
2021-09-29 13:33:10 -04:00
d6fa912188 multi: further decouple graph
To further separate the channel graph from the channel state, we
refactor the AddrsForNode method to use the graphs's public methods
instead of directly accessing any buckets. This makes sure that we can
have the channel state cached with just its buckets while not using a
kvdb level cache for the graph.
At the same time we refactor the graph's test to also be less dependent
upon the channel state DB.
2021-09-29 17:00:03 +02:00
11cf4216e4 multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
ddea833d31 multi: extract address source into interface
As a preparation to have the method for querying the addresses of a node
separate from the channel state, we extract that method out into its own
interface.
2021-09-29 17:00:03 +02:00
884cc0d191 Merge pull request #5768 from priyanshiiit/lookupInvoice
lnd: adds NOT_FOUND status code for LookupInvoice
2021-09-28 14:33:29 -07:00