Commit Graph

177 Commits

Author SHA1 Message Date
Elle Mouton
23602e017e
multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
feelancer21
5290598f1b
lnrpc: fix lncli documentation tags in walletkit.proto
Fixes the tag for `wallet pendingsweeps` and adds the tag for
`wallet estimatefeerate`.
2024-10-08 18:19:36 +02:00
Oliver Gugger
0dd58ee529
Merge pull request #9033 from ziggie1984/non-anchor-channel-bump
error out when non-anchor channels are tried to bump the force close fee.
2024-10-07 23:30:17 -06:00
ziggie
4402137fb4
multi: bump btcd version.
The new SignCompact return values had to be adopted across the
code base.
2024-10-03 21:56:21 +02:00
ziggie
6387c0ab50
walletrpc: error out for non-anchor chans.
Return an error if a non-anchor channel is tried to be fee-bumped.
2024-10-03 00:37:49 +02:00
Olaoluwa Osuntokun
cc9e2b783e
Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
2024-08-21 16:31:26 -07:00
ziggie
07b18c1c86
multi: add bumpforceclosefee rpc endpoint.
Add a new bumpforceclosefee rpc endpoint to the wallet server.
Move the logic from the lncli level to the wallet server rpc level.
This is more in line with a proper client-server design.

wallet lncli: use new bumpforceclosefee endpoint.

Besides using the new bumpforceclosefee rpc endpoint we also enable the
bumping of taproot anchor channels.
2024-08-09 18:54:56 +02:00
yyforyongyu
3e36adf476
mulit: remove ListLeasedOutputs in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` -
the returned info from `ListLeasedOutputs` can easily be accessed via
`FetchInputInfo` and this info is only used at one callsite.
`ListLeasedOutputs` then becomes unnecessary here, plus it's very slow
and needs to be refactored in `btcwallet` instead.
2024-08-09 22:01:57 +08:00
yyforyongyu
f70c919164
lnrpc: fetch utxo info in lockInputs
This commit prepares the following commit where we change the
`LeaseOutput` to be more efficient.
2024-08-09 22:01:57 +08:00
yyforyongyu
aba8507b2a
lnrpc+lnwallet: replace FetchInputInfo with new methods
This commit replaces the usage of `FetchInputInfo` with
`FetchOutpointInfo` and `FetchDerivationInfo` to remove unncessary
fetching of the derivation path.
2024-08-09 21:51:18 +08:00
Olaoluwa Osuntokun
7f96d10dd3
lnrpc: add new min_relay_fee response to EstimateFee
We also start using a pattern of making new messages for types/units
instead of adding a suffix to a field.
2024-08-07 17:51:35 -07:00
Ononiwu Maureen
99339f706f
multi: expand SendOutputs and CreateSimpleTx to take utxos
This commit updates the interface methods from
`lnwallet.WalletController` to take optional input set which can be used
to create the tx.
2024-08-07 20:42:27 +08:00
Elle Mouton
58317e66d3
lnrpc/Dockerfile: update falafel version
Update the falafel version.
2024-08-05 15:59:50 +02:00
yyforyongyu
2e40a23146
lnrpc: fix linter 2024-05-25 13:37:16 +08:00
yyforyongyu
8da68bb7db
multi: apply the new type lntypes.WeightUnit 2024-05-25 13:37:13 +08:00
yyforyongyu
9f2995251e
lnrpc: fix typo 2024-04-29 19:14:27 +08:00
erik
789c6bac8c multi: replace ioutil.WriteFile 2024-04-25 11:23:31 +02:00
ziggie
b954ee4c72
rpcserver: allow unconf. inputs for psbt shim.
Allow unconfirmed inputs to be used when funding a channel via
the psbt channel opening flow. We do now check for unstable utxos.
2024-04-24 13:58:20 +01:00
ziggie
ab7634b276
multi: Add utxo restriction for batchchannel openings.
Add utxo restrictions for psbt internal wallet funded lightning
channels. This also includes batchopening channels backed by the
internal wallet.
2024-04-24 13:58:20 +01:00
yyforyongyu
11a276e222
walletrpc+sweep: update PendingSweeps to return the new params 2024-04-19 21:33:38 +08:00
yyforyongyu
8804947179
walletrpc+sweep: refactor BumpFee to properly handle sweep request 2024-04-19 21:33:38 +08:00
yyforyongyu
94159e8950
walletrpc: update walletkit.proto to use the new sweep params 2024-04-19 21:33:38 +08:00
yyforyongyu
9be5b370a7
sweep+contractcourt: replace ParamsUpdate with Params 2024-04-19 21:33:38 +08:00
yyforyongyu
db3aad31aa
lnrpc+sweep: rename Force to Immediate for clarity 2024-04-19 21:33:37 +08:00
yyforyongyu
0b30d4ba3e
lnrpc+sweep: make FeeEstimateInfo an optional param
This is needed as we soon will remove the usage of the fee preference
when sweeping inputs.
2024-04-19 21:33:31 +08:00
yyforyongyu
28df2d7327
lnrpc+sweep: make sure public interface takes public types as params
This commit exports and renames the following variable names:
- `PendingInput` is now `PendingInputResponse` as it's responding to a
  request.
- `pendingInput` is now renamed and exported as `SweeperInput`.
- `pendingInputs` is now renamed and exported as `InputsMap`.

This commit is first made from running:
```
gofmt -d -w -r 'PendingInput -> PendingInputResponse' .
gofmt -d -w -r 'pendingInput -> SweeperInput' .
gofmt -d -w -r 'pendingInputs -> InputsMap' .
```
And followed by some docs and variable names fixes.
2024-04-19 21:33:30 +08:00
yyforyongyu
558d9bd3ce
walletrpc: pass Force flag when sweeping via BumpFee 2024-04-19 21:33:26 +08:00
yyforyongyu
a8f5a09dea
sweep: don't give up an input based on number of attempts
This commit removes the logic where we remove an input when it's been
published more than 10 times. This is needed as in our future fee
bumper, we might start with a low fee and rebroadcast the same input for
hundred of blocks.
2024-04-19 21:33:23 +08:00
yyforyongyu
3bcac318eb
sweep+lnrpc: add new interface FeePreference
This commit adds a new interface `FeePreference` which makes it easier
to write unit tests and allows more customized implementation in
following commits.
2024-04-19 21:33:21 +08:00
yyforyongyu
530eed92a0
multi: rename FeePreference to FeeEstimateInfo
Results from running,
```
gofmt -d -w -r 'FeePreference -> FeeEstimateInfo' .
```
2024-04-19 21:33:21 +08:00
Oliver Gugger
648fb22f63
multi: wrap all errors 2024-04-11 15:04:03 +02:00
Mohamed Awnallah
1a2d50d385
multi: add coin selection strategy option to all on-chain rpcs
In this commit, we add the coin selection strategy option to the following
on-chain RPCs `fundpsbt`, `batchopenchannel`, `estimatefee`, `sendcoins`,
`sendmany`, and `sendoutputs`.
2024-04-01 19:08:22 +02:00
Mohamed Awnallah
7c2c0dcf98
lnrpc+lnd+config: add coin selection strategy to all on-chain rpcs
In this commit, we add the coin selection strategy option
to all on-chain RPCs `FundPsbt`, `BatchOpenChannel`, `EstimateFee`,
`SendMany`, `SendCoins`, `SendOutputs`.
2024-04-01 19:08:01 +02:00
Oliver Gugger
0bc3d29413
Merge pull request #8496 from aakselrod/locks-to-leases
multi: replace `LockOutpoint` with `LeaseOutput`
2024-03-18 03:34:56 -06:00
Oliver Gugger
4140d2a9d7
lnrpc: re-generate protos after dependency update 2024-03-14 09:32:29 +01:00
Alex Akselrod
4d2ab7423f
multi: move 3 vars from walletrpc+lncfg to chanfunding
This commit moves the constants LndInternalLockID and
DefaultLockDuration from the walletrpc package to the chanfunding
package, moves DefaultReservationTimeout from lncfg to chanfunding,
and also updates the lncli package with the new location.
2024-03-13 09:50:16 -07:00
ffranr
cd566eb097
multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
Oliver Gugger
54fa5805c2
lnwallet+lnrpc: add address index to ListAddresses
For the itest in the next commit we'll need to be able to fetch the
input information for an address over RPC. The only piece missing is the
address' index, which we add in this commit. Everything else should be
derivable from the ListAddresses and ListAccounts calls.
2024-02-26 11:05:19 +01:00
Oliver Gugger
fb20cd598e
lnwallet+lnrpc: add derivation info for P2TR change addrs
In some situations (for example in Taproot Assets), we need to be able
to prove that an address is a bare BIP-0086 address that doesn't commit
to any script. We can do that by providing the BIP-0032 derivation info
and internal key.
2024-02-26 11:05:18 +01:00
Oliver Gugger
094fdbfa72
walletrpc: implement third PSBT funding option
And now we finally implement the new funding option: Allowing coin
selection with pre-defined inputs and outputs.
2024-02-23 08:58:10 +01:00
Oliver Gugger
0f6c25a773
walletrpc: add PsbtCoinSelect option to FundPsbt 2024-02-23 08:58:10 +01:00
Oliver Gugger
446152e1a5
walletrpc: refactor to prepare for third funding option
In the following commits we'll add a new, third, funding option for
funding PSBTs: It will allow users to specify pre-selected inputs but
still request the wallet to perform coin selection up to the total
output sum amount.
2024-02-23 08:58:10 +01:00
Oliver Gugger
f7198c4105
walletrpc+subserver_config: add coin selection strategy
With this commit we also add the config-level coin selection strategy to
the wallet RPC server.
2024-02-23 08:58:09 +01:00
Keagan McClelland
bc3feba267 contractcourt+lnrpc+lnd: s/BreachArbiter/BreachArbitrator
Since we have two other examples of XArbitrator, we rename
BreachArbiter to BreachArbitrator to keep things consistent.
The aim is to reduce the amount of lore you need to know to
intuit where things are or what they do.
2024-02-06 13:32:47 -07:00
Andras Banki-Horvath
7725a57055
walletkit: add startheight parameter to ListSweeps
By default ListSweeps will list all sweeps known to the wallet. Over
time this may become expensive to call and callers may not be interested
in the full history. This commit adds a `startheight` parameter to the
`ListSweeps` RPC call. This parameter can be used to fetch sweeps only
from a specified start block height or only unconfirmed ones if it is
set to -1.
2024-02-01 21:02:24 +01:00
ziggie
4f77758419
walletrpc: Add Taproot witness types to rpc. 2024-01-29 15:09:22 +00:00
Mohamed Awnallah
1402ffd17b
protolint: configure protolint and fix the protolinting issues
This PR addresses the following:
- Install and Configure protolint to enforce the protobuf style guide rules in the CI.
- Fix the protolinting issues (package and import ordering) while maintaining the comaptibility.
2024-01-22 22:00:00 +02:00
ziggie
81dd631935
walletrpc: add status to BumpFeeResponse type.
BumpFee now returns a status signaling the success of the operation.
2024-01-09 01:15:42 +01:00
ziggie
227ac770af
walletrpc: add new RemoveTransaction endpoint.
The RemoveTransaction endpoint removes the transaction with the
provided txid including all its descendants from the internal wallet.

We still keep watching for the address of the transation in case
the transcation is confirmed nonetheless. This command is particular
useful for neutrino backends because new bitcoind versions do not
reply with an invalid transaction error code when the tx published
fails to be included into the mempool (fullnodes do).
2023-12-12 14:18:16 +01:00
ErikEk
f0bc6d804c rpc: add gettransaction endpoint to walletrpc sub-server 2023-12-10 22:14:12 +01:00