Commit Graph

14935 Commits

Author SHA1 Message Date
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
Carla Kirk-Cohen
8a9dd105fc docs: add release notes 2023-06-02 11:01:45 -04:00
Carla Kirk-Cohen
7b1a288320 channeldb: store extra HTLC data in variable onion blob slot
Take advantage of the variable byte encoding for a known length field
to extend HLTCs with additional data.
2023-06-02 11:01:44 -04:00
Carla Kirk-Cohen
2fc8e9d617 multi: update channel db HTLC OnionBlob to array
We know that onion blobs in lightning are _exactly_ 1366 bytes in
lightning, but they are currently expressed as a byte slice in
channeldb's HTLC struct. Blobs are currently serialized as var bytes,
so we can take advantage of this known length and variable length
to add additional data to the inline serialization of our HTLCs, which
are otherwise not easily extensible (without creating a new bucket).
2023-06-02 11:01:43 -04: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
Olaoluwa Osuntokun
cb5fc71659 htlcswitch: add new LinkFailureAction enum
In this commit, we add a new LinkFailureAction enum to take over the old
force close bool. Force closing isn't the only thing we might want to do
when we decide to fail the link, so this is a prep refactoring for an
upcoming change.
2023-05-23 12:24:55 -07:00
yyforyongyu
9ae4511a6f itest: make sure invoice is settled in multi hop htlc test 2023-05-24 02:38:40 +08:00
Oliver Gugger
7dacf5edb9 Merge pull request #7709 from morehouse/fuzz_require
lnwire,wtwire: use require package for fuzz tests
2023-05-23 19:55:06 +02:00
Oliver Gugger
15525ff74c Merge pull request #7618 from morehouse/derandomize_brontide_fuzz
brontide: deterministic fuzz targets
2023-05-23 16:36:38 +02:00
Matt Morehouse
c38bb899bb docs: release note for #7709 2023-05-23 08:38:17 -05:00
Matt Morehouse
4c2e712581 wtwire: use require package for fuzz tests
Simplify code by using the require package instead of t.Fatal().
2023-05-23 08:37:22 -05:00
Matt Morehouse
460ba4ad82 lnwire: use require package for fuzz tests
Simplify code by using the require package instead of t.Fatal().
2023-05-23 08:37:22 -05:00
Matt Morehouse
354133e41e docs: release note for #7618 2023-05-23 08:34:36 -05:00
Matt Morehouse
bad4a66279 brontide: derandomize fuzz tests
It is best to have deterministic fuzz targets, so that if a failure
occurs, it can be easily reproduced.

This commit swaps the cryptographically secure RNG for a deterministic
one seeded from fuzzer input.
2023-05-23 08:32:13 -05:00
Matt Morehouse
eb31d47094 brontide: remove handshake helper function
Move the functionality directly into completeHandshake instead. If a
failure does happen at any point during the handshake, it is beneficial
to know which line it happens on for debugging. The helper function was
hiding this information.
2023-05-23 08:32:13 -05:00
Matt Morehouse
6397497bb6 brontide: s/nilAndPanic/dumpAndFail
The nilAndPanic function does not actually nil the Curve fields as it
claims. dumpAndFail is a more descriptive name.
2023-05-23 08:32:10 -05:00
yyforyongyu
775032de29 docs: add release note for payment stream fix 2023-05-23 21:26:09 +08:00
yyforyongyu
de01e412d6 routing+lnrpc: subscribe payment stream before sending it
This commit moves the subscription of a given payment before it's been
sent so we won't miss any events.
2023-05-23 21:26:09 +08:00
Oliver Gugger
b95faaba45 Merge pull request #7720 from ellemouton/updateReleaseNotes
docs: move entry for 7705 to 0.16.3
2023-05-23 09:07:40 +02:00
Elle Mouton
dbc83f4e9e docs: move entry for 7705 to 0.16.3 2023-05-23 06:55:36 +02:00
Oliver Gugger
8c58730c34 Merge pull request #7693 from gcaracuel/lncli_env_global_flags
lncli: Global flags to accept ENV vars overrides
2023-05-22 22:15:57 +02:00
gcaracuel
12e7c24520 lncli: Global flags to accept ENV vars overrides. 2023-05-22 17:13:18 +02:00
Oliver Gugger
a043cca77a Merge pull request #7712 from ErikEk/neutrinorpc-deprecate-getblockhash
Neutrinorpc: deprecate getblockhash
2023-05-22 12:16:04 +02:00
erik
eff055e464 docs: release notes 2023-05-22 16:26:18 +07:00
erik
9ce02b96fe neutrinorpc: deprecate getblockhash 2023-05-22 16:26:10 +07:00
Oliver Gugger
3d53d6909a Merge pull request #7681 from yyforyongyu/btcwallet-mempool
mod: update btcwallet's version
2023-05-22 10:24:17 +02:00
Oliver Gugger
d5f5565e50 Merge pull request #7494 from morehouse/fuzz_ci
github: run fuzz tests with unit tests
2023-05-22 10:14:44 +02:00
Matt Morehouse
59bd7b0538 docs: release note for #7494 2023-05-19 15:51:19 -05:00
Matt Morehouse
acace4d330 github: run fuzz tests with unit tests
We download and extract the fuzzing seed corpora into the LND tree so
that "make unit" automatically runs the fuzz tests on the seeds.
2023-05-19 15:48:11 -05:00
yyforyongyu
403b937dca docs: add release notes 0.16.3 2023-05-20 00:33:56 +08:00
yyforyongyu
0b64ba94c0 itest: cleanup channels for testSwitchOfflineDeliveryOutgoingOffline 2023-05-20 00:33:56 +08:00
yyforyongyu
931481c4fe itest: make sure edges are updated in mpp tests 2023-05-20 00:33:56 +08:00
yyforyongyu
c6cfc425a0 lntest+itest: clean mempool in testHtlcTimeoutResolverExtractPreimageRemote 2023-05-20 00:33:04 +08:00
Oliver Gugger
ac3e7be9a0 Merge pull request #7668 from shaurya947/open-channel-memo
multi: accept memo note when opening channel
2023-05-19 16:13:13 +02:00