Commit graph

14914 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
453fbb3358
Merge pull request #7565 from Torakushi/accounts
Fix non-deterministic behaviour for custom accounts
2023-06-14 23:28:42 -05:00
Torakushi
be4dae0ec5
update release-notes-0.17 2023-06-14 09:58:54 +02:00
Torakushi
77d3f00c3b
walletrpc+btcwallet: no custom account with various key scopes
Currently, a user can create a custom account with various key scopes.
This is not a desired behaviour.
2023-06-14 09:58:53 +02:00
Torakushi
dd5ed71669
btcwallet: remove LookupAccount because of non-deterministic result
In theory, it should be only one custom account with a given name. However,
users could have created custom accounts with various key scopes. In that case,
'LookupAccount' has a non deterministic behaviour. To fix that, we browse
through all key scopes (deterministically) and return the first account we found.
2023-06-14 09:58:52 +02:00
Torakushi
2ef5ea9742
btcwallet: fix non-deterministic behaviour in ListAccounts
In theory, it should be only one custom account with a given name. However,
due to a lack of check, users could have created custom accounts with various
key scopes. In that case, ListAccounts has to list all these accounts.
2023-06-14 09:58:38 +02:00
Oliver Gugger
cf1f44ab10
Merge pull request #7689 from guggero/housekeeping
Housekeeping (fix small issues, take over stale contributor PRs)
2023-06-13 17:42:53 +02:00
Oliver Gugger
f97f54e088
Merge pull request #7480 from maxwellsayles/fundExpiryOnPending
lnd: compute FundingExpiryBlocks in PendingOpenChannel message
2023-06-13 17:29:15 +02:00
Oliver Gugger
d1002cd218
docs: add contributors to release notes 2023-06-13 11:58:35 +02:00
Satarupa Deb
3835c371c9
watchtowerrpc: updated comments 2023-06-13 11:58:35 +02:00
Lele Calo
acee1d77aa
docker: add support for custom params RPCHOST and RPCCRTPATH
In this commit we add support for two more custom parameters in the
main entrypoint for the `lnd` Docker image script (`start-lnd.sh`)

The two parameters are:
* RPCHOST    to set a custom endpoint for the RPC server
* RPCCRTPATH to set a custom location for the certificate used when
  communicating with the RPC server
2023-06-13 11:58:34 +02:00
zx9r
3a5d67a16b
cmd/lncli: add confirmation to sendcoins 2023-06-13 11:58:34 +02:00
MG-ng
63b32b9e4a
cmd/lncli: add description for payinvoice command 2023-06-13 11:58:34 +02:00
BhhagBoseDK
e3055640aa
sample-lnd.conf: fix typo in comment.
Correcing minor typo.
2023-06-13 11:58:34 +02:00
Aljaz Ceru
d3a5307fc0
cmd/lncli: fix inconsistent argument naming in queryRoutes 2023-06-13 11:58:34 +02:00
Torkel Rogstad
681e3ceede
rpc: verify address is for correct net
Verify that the addresses we're decoding when sending coins onchain are
for the correct network. Without this check we'll convert the users
addresses to their equivalent on other networks, which is a gross
violation of the principle of least astonishment.
2023-06-13 11:58:34 +02:00
gabbyprecious
4ea24c0820
cmd/lncli: add unused flag to newAddr command 2023-06-13 11:58:33 +02:00
Oliver Gugger
03b4d88ed7
docs: mention lnd-itest for testing
Fixes #5418.
2023-06-13 11:58:33 +02:00
Oliver Gugger
7ca7526132
lnrpc: update description for VerifyMessage
Fixes #3596.
2023-06-13 11:58:33 +02:00
Oliver Gugger
31330f1ffc
walletrpc: add note to poorly named field
Fixes #2986.
2023-06-13 11:58:33 +02:00
Oliver Gugger
56dba2df03
multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
Maxwell Sayles
987b54f52e funding: update release notes to mention funding_expiry_blocks in
`PendingOpenChannel`.
2023-06-12 10:08:18 -07:00
Maxwell Sayles
f7bdbb9e73 funding: integration test to verify the value of FundingExpiryBlock on
pending channels that are waiting for funding confirmation.
2023-06-12 10:04:04 -07:00
Maxwell Sayles
663b28808a funding: provide FundingExpiryBlock field in PendingOpenChannel message. 2023-06-12 10:04:04 -07:00
Maxwell Sayles
9dea695079 funding: make MaxWaitNumBlocksFundingConf public to be used to compute
`FundingExpiryBlocks`.
2023-06-12 10:04:04 -07:00
Oliver Gugger
e549096b88
Merge pull request #7687 from morehouse/fuzz_addr_iter
wtclient: AddressIterator fuzz test
2023-06-12 12:25:08 +02:00
Oliver Gugger
6931a544e1
Merge pull request #7747 from ardevd/gen_protos_full_image_name
fix: use full image name for gen_protos_docker.sh
2023-06-12 11:13:11 +02:00
Oliver Gugger
753af11ed6
Merge pull request #7730 from guggero/grpc-keepalive
config+grpc: allow configuring gRPC keepalive params
2023-06-10 13:45:50 +02:00
Oliver Gugger
bf3668240f
docs: add release notes 2023-06-09 10:57:37 +02:00
Oliver Gugger
1515266269
sample-lnd.conf: describe grpc keepalive params 2023-06-09 10:57:37 +02:00
Oliver Gugger
f9f8f6406b
config+lnd: allow configuring gRPC keepalive settings
This change allows users to customize the gRPC keepalive settings. The
server ping values configure when the server sends out a ping by itself
and how quickly the client is expected to respond.
The client ping min wait configures the minimum time a client has to
wait before sending another ping. A connection might be closed by the
server if a client pings more frequently than the allowed min wait time.

We choose lower default values than the gRPC library used before:
 - ServerPingTime: 1 minute instead of 2 hours
 - ClientPingMinWait: 5 seconds instead of 5 minutes

This should by itself already make long-standing gRPC streams more
stable but also allow clients to set a custom client ping time of 5
seconds or more (a value of slightly more than 5000 milliseconds should
be chosen to avoid the server disconnecting due to slight timing skews).
2023-06-09 10:57:36 +02:00
Oliver Gugger
0005adaac8
Merge pull request #7752 from yyforyongyu/improve-logging
contractcourt: improve logging for failing dangling htlcs
2023-06-08 18:31:44 +02:00
yyforyongyu
3857b9e9a6
contractcourt: improve logging for failing dangling htlcs 2023-06-07 17:34:06 +08:00
ardevd
88e8bae75c fix: use full image name for gen_protos_docker.sh
By defining the full name for the docker image we avoid the issue that
occurs when using `podman` (tested on Fedora 38) where podman will prompt the
user for what docker repository to pull the image from.
2023-06-06 00:30:37 +02:00
Oliver Gugger
6833df5236
Merge pull request #7742 from Roasbeef/multimutex-param
multimutex: remove HashMutex, make Mutex type a type param
2023-06-05 09:43:10 +02:00
Oliver Gugger
8f382ffd95
Merge pull request #7238 from morehouse/chain_arbitrator_nit
contractcourt: fully use chanPoint variable
2023-06-05 09:41:45 +02:00
Olaoluwa Osuntokun
a7d6826f60
multimutex: remove HashMutex, make Mutex type a type param
In this commit, we eliminate some code duplication by removing the old
`HashMutex` struct as it just duplicates all the code with a different
type (uint64 and hash). We then make the main Mutex struct take a type
param, so the key can be parametrized when the struct is instantiated.
2023-06-01 17:39:49 -07:00
Matt Morehouse
c4be15205f
docs: release note for #7687. 2023-06-01 08:49:42 -05:00
Matt Morehouse
f53c8d6e91
wtclient: AddressIterator fuzz test
Test AddressIterator for the absence of panics, nil addresses, and empty
lists.

This fuzz test finds https://github.com/lightningnetwork/lnd/issues/7552
in seconds. No other panics found after 300+ CPU-hours of fuzzing.
2023-06-01 08:46:45 -05:00
Matt Morehouse
da10cb95b5
contractcourt: fully use chanPoint variable
When we create a temporary chanPoint variable to shorten up the code, we
should use it everywhere for consistency and clarity.
2023-05-31 10:56:08 -05:00
Oliver Gugger
f9d4600ff8
Merge pull request #7645 from shaurya947/bitcoind-minmempoolfee
sweep+lnrpc: enforce provided fee rate is no less than relay fee
2023-05-30 13:15:22 +02:00
Olaoluwa Osuntokun
20c1af9af6
Merge pull request #7726 from Roasbeef/htlc-must-sweep
contractcourt: force the sweeper to always resolve outgoing HTLCs
2023-05-29 12:49:32 -07:00
Olaoluwa Osuntokun
f170f8e104
docs/release-notes: add release notes for adamant htlc sweeps 2023-05-29 12:49:07 -07:00
Olaoluwa Osuntokun
7686d10075 contractcourt: force the sweeper to always resolve outgoing HTLCs
In this commit, we attempt to fix an issue that may lead to force closes due
to small value HTLCs. The sweeper has built in a "negative yield" heuristic
where it won't sweep something that'll result in paying more fees than the
HTLC amount. However for HTLCs, we want to always sweep them, as we don't
cancel back the HTLCs before the outgoing contract is fully resolved.

In the future, we'll start to make more uneconomical decisions about if we
should go to chain at all for small value HTLCs, and also do things like
cancel back early if the HTLC is small and we think we might be contested by
chain fees.
2023-05-26 15:15:36 -07:00
shaurya947
e2bd34b72c
docs: update release notes for 0.17 2023-05-26 11:16:52 -04:00
shaurya947
85ab96cd09
lnrpc: move CalculateFeeRate from rpcserver.go to rpc_utils.go
This refactor aims to house the CalculateFeeRate function in a more
"shareable" location. It used to be a non-exported function inside
of rpcserver.go. However, other routines, such as FundPsbt inside
of walletkit_server.go, could also rely on the same fee calculation
functionality. So we move the function to rpc_utils.go and export it,
and we will reuse it in the FundPsbt workflow in a future PR.
2023-05-26 11:16:51 -04:00
shaurya947
25097f0993
sweep: update fee estimator fee-below-floor test case
Handle error in test case, as well as add new test case for below
relay fee input.
2023-05-26 11:16:51 -04:00
shaurya947
2292f3fbd0
sweep: use relay fee rate as floor for specified fee rate
This ensures that for transactions where a fee rate is specified
(instead of a confirmation target), lnd doesn't accept transactions
which would be ultimately ignored by the underlying chain's RPC.
2023-05-26 11:16:42 -04:00
Oliver Gugger
bbbf7d33fb
Merge pull request #7722 from yyforyongyu/fix-payment-stream
routing+lnrpc: subscribe payment stream before sending it
2023-05-24 16:51:16 +02:00
Olaoluwa Osuntokun
b9b20acd41
Merge pull request #7711 from Roasbeef/commit-dance-stall-disconnect
htlcswitch+peer: actually actually disconnect if we detect a stalled remote channel state machine
2023-05-23 14:17:07 -07:00
Olaoluwa Osuntokun
4d633f04e3
htlcswitch: add new LinkFailureDisconnect action
In this commit, we add a new LinkFailureDisconnect action that'll be
used if we detect that the remote party hasn't sent a revoke and ack
when it actually should.

Before this commit, we would log our action, tear down the link, but
then not actually force a connection recycle, as we assumed that if the
TCP connection was actually stale, then the read/write timeout would
expire.

In practice this doesn't always seem to be the case, so we make a strong
action here to actually force a disconnection in hopes that either side
will reconnect and keep the good times rollin' 🕺.
2023-05-23 12:25:11 -07:00