Commit Graph

42 Commits

Author SHA1 Message Date
Matheus Degiovani
0e73d2d243 itest: assert unspent before performing CPFP
This reduces the flakiness of the CPFP test by asserting the wallet has
seen the unspent output before attempting to perform the walletkit's
BumpFee method.

Previously the attempt to bump the fee of the target transaction could
be made before the wallet had had a chance to fully process the
transaction, causing a flaky error.
2020-07-13 13:24:22 -03:00
Wilmer Paulino
c2f1fe26c1
rpc: acquire global coin select lock in related RPCs
This ensures proper coin selection synchronization between lnd and users
of the RPC to avoid potential double spend errors.
2020-06-12 11:22:29 -07:00
Oliver Gugger
558d63718b
rpcserver+lnrpc: register REST subservers with root server 2020-06-04 08:50:44 +02:00
Oliver Gugger
fe16be5bb8
lnrpc: extract or add REST annotations to yaml 2020-06-04 08:50:00 +02:00
Wilmer Paulino
acfd432602
walletrpc: add ListUnspent RPC 2020-06-03 19:03:04 -07:00
Wilmer Paulino
9dcaf4fbc6
walletrpc: add output leases RPCs 2020-06-03 18:50:09 -07:00
carla
97a843f3cd
walletrpc: add LabelTransaction rpc 2020-05-25 11:33:33 +02:00
carla
e8ca306f12
lnrpc: display transaction label in transaction details 2020-05-19 13:31:51 +02:00
carla
93a1b61218
walletrpc: add transaction label to PublishTransaction 2020-05-19 13:31:51 +02:00
carla
099161ed0b
multi: add label to WalletController SendOutputs and dependent rpcs
Add a label parameter to the WalletController SendOutputs endpoint and
update rpcs that use it to allow optional provision of labels.
2020-05-19 13:31:51 +02:00
carla
75370ce6b4
multi: update WalletController PublishTransaction to include label
Add label parameter to PublishTransaction in WalletController
interface. A labels package is added to store generic labels that are
used for the different types of transactions that are published by lnd.

To keep commit size down, the two endpoints that require a label
parameter be passed down have a todo added, which will be removed in
subsequent commits.
2020-05-19 13:30:00 +02:00
carla
5f38d8c316
walletrpc: remove double asterix comment 2020-05-13 09:18:40 +02:00
Oliver Gugger
272598a706
lnrpc: generate gateway and swagger for all RPCs 2020-05-08 14:33:59 +02:00
Oliver Gugger
71c58c2c04
lnrpc: replace /// and /** with // and /* 2020-05-08 14:33:34 +02:00
Oliver Gugger
0800386138
lnrpc: unify proto style by moving services to top of file 2020-05-08 14:33:04 +02:00
carla
f3212057dd
walletrpc: add list sweeps to rpc and cli 2020-05-06 09:25:44 +02:00
Joost Jager
c376cdb733
input: add anchor witness type 2020-03-17 16:25:35 +01:00
Joost Jager
29e1489179
sweep: leave exclusive group unchanged on parameter update
Exclusive group is a static property that doesn't need to be updated.
Requiring the exclusive group to be passed into UpdateParams creates a
burden for the caller to make sure they supply the existing group.

This change will be beneficial for users that bump anchor sweeps that
have exclusive groups set.
2020-03-17 14:19:39 +01:00
Oliver Gugger
fdcb30e57f
lnrpc: run clang-format 2020-03-10 20:19:08 +01:00
Oliver Gugger
54fede0ae9
walletrpc: format walletkit.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to
JSON in lncli and REST. The jsonpb has a setting to use the
original name as defined in the proto file and the explicit
json_name definition is not necessary any more.
The jsonpb setting is called OrigName and needs to be true.
2020-03-07 11:23:08 +01:00
Joost Jager
b0aae13d70
sweep: allow force sweeps 2020-01-15 16:56:44 +01:00
Joost Jager
16832cefa3
sweep: allow updating all sweep parameters
This is a preparation for adding additional parameters besides the fee
preference.
2020-01-15 16:56:40 +01: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
Joost Jager
38adfd7ecc
sweep: create sweep parameters struct
Prepares for adding more input-specific sweep parameters.
2019-12-13 12:02:42 +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
Lars Lehtonen
8194d260ff
lnrpc: stdlib context 2019-09-28 16:06:34 -07:00
Joost Jager
3d7de2ad39
multi: remove dead code 2019-09-10 17:21:59 +02:00
Wilmer Paulino
2cc5891c8c
lnrpc/walletrpc: use current height as height hint for cpfp
In this commit, we address an issue that would cause us to scan from the
genesis block for the spend of an output that we wish to use to raise
the fee of a transaction through CPFP. This was due to setting a 0
height hint when constructing the input required by the sweeper and was
discovered due to the recently added validation checks at the chain
notifier level. We'll now use the current height as the height hint
instead as the sweeper will end up creating a new transaction that
spends the input.
2019-08-22 13:49:42 -07:00
Wilmer Paulino
9e8a1707cc
lnwallet: modify FetchInputInfo to return additional information for utxos 2019-08-22 13:49:41 -07:00
Johan T. Halseth
f0cbe46324
lnrpc: make BumpFee doc start with RPC name 2019-07-10 12:56:54 +02:00
Olaoluwa Osuntokun
94a20e30e1
lnrpc/walletrpc: reject nil outpoints as args
In this commit, we modify the parsing of user provided outpoints to
ensure that we catch a nil (empty) output early. Otherwise, passing a
set of incorrect arguments would cause `lnd` to crash.
2019-06-17 16:56:16 -07:00
Wilmer Paulino
a4675063b7
lnrpc/walletrpc: expose bumping fee of inputs/transactions over RPC
This RPC exposes the recently added BumpFee functionality to the
UtxoSweeper in order to allow users of the RPC to manually bump fees of
low fee inputs/transactions.
2019-06-11 15:06:40 -07:00
Wilmer Paulino
d01f88ecdc
lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Joost Jager
9a4c0d5699
lnrpc: upgrade to protobuf v1.3.1
This commit upgrades the protobuf version. Compared to the previous
v1.2.0 it generates smaller diffs in generated code. This change was
introduced in:

fffb0f7828
2019-05-20 15:35:14 +02:00
Johan T. Halseth
3daaa8cf74
lndrpc/invoicesrpc+walletrpc: clean up imports 2019-02-02 15:48:22 +01:00
Joost Jager
8996a1490d
lnrpc: reuse common FileExists function 2019-02-01 09:47:31 +01:00
Alex Bosworth
d432ee6f13
trivial: typo fix
Correct log name of WalletKit
2019-01-26 16:57:09 -08:00
Joost Jager
78aaf8639b
lnrpc: remove reference to GOPATH
As go modules allow us to build outside of the GOPATH, we shouldn't look for .proto imports there anymore.
2018-12-18 14:57:26 +01:00
Joost Jager
6ca52c4ec7
lnrpc/walletrpc: remove unused gen_proto.sh script 2018-12-18 14:56:52 +01:00
Olaoluwa Osuntokun
273dee607b
lnrpc: remove oneof from signrpc.KeyDescriptor 2018-12-06 16:25:38 -08:00
Olaoluwa Osuntokun
406fd2a37e
lnrpc/walletrpc: implement the WalletKitServer gRPC service
In this commit, we implement the newly defiend WalletKitServer gRPC
service. We use the same template w.r.t build tags as the existing
signrpc service.
2018-12-06 16:25:34 -08:00
Olaoluwa Osuntokun
097b6f7f6d lnrpc/walletrpc: add new sub-RPC server, the WalletKit
In this commit, we add a new sub-RPC server to the existing set of gRPC
servers. This new sub-RPC server is the WalletKit. It's a utility
toolkit that contains method which allow clients to perform common
interactions with a wallet such as getting a new address, or sending a
transaction. It also includes some supplementary actions such as fee
estimation.

One thing to note in the RPC file is that we _import_ the existing
signer.proto file in order to get at some existing proto definitions
which are useful in our use case.
2018-12-06 16:24:54 -08:00