Commit Graph

16933 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
9aa7e7510c
docs/alloy-model: add linear fee function model
In this commit, we add a model for the linear fee function we use in lnd
for fee bumping. This models can be used to reproduce the issue reported
in https://github.com/lightningnetwork/lnd/issues/8741, and can also be
shown that that bug fix resolves a counter example found by the model
checker.
2024-08-01 17:42:31 -07:00
Olaoluwa Osuntokun
7c61dc6dc4
docs/alloy-models: add initial README.md for Alloy models 2024-08-01 17:42:22 -07:00
Olaoluwa Osuntokun
c46b1a467a
Merge pull request #8836 from hieblmi/payment-failure-reason-cancel
routing: add payment failure reason `FailureReasonCancel`
2024-08-01 16:52:06 -07:00
Olaoluwa Osuntokun
4a3c4e4ba7
Merge pull request #8497 from ziggie1984/shutdown-bugfix
routing: shutdown chanrouter correctly.
2024-08-01 16:48:50 -07:00
ProofOfKeags
e3dd886580
Merge pull request #8962 from ProofOfKeags/refactor/quiescence-micro-spinoffs
[NANO]: Refactor/quiescence micro spinoffs
2024-08-01 13:57:29 -06:00
Keagan McClelland
dc03637ae3
htlcswitch: rename for test parameters for accuracy 2024-08-01 11:56:50 -07:00
Olaoluwa Osuntokun
6e9eb1d0f7
Merge pull request #8938 from bhandras/etcd-leader-election-fixups
multi: check leader status with our health checker to correctly shut down LND if network partitions
2024-08-01 11:26:29 -07:00
Andras Banki-Horvath
037161ee6c
docs: add release notes for 0.18.3 2024-08-01 19:04:11 +02:00
Andras Banki-Horvath
f63bccb575
config: update sample-lnd.conf 2024-08-01 19:04:11 +02:00
Andras Banki-Horvath
91d9fb4764
lncfg: increase default leader session TTL to 90 seconds 2024-08-01 19:04:11 +02:00
Andras Banki-Horvath
8e49eb652d
itest: add itest covering the leader healthcheck 2024-08-01 19:04:10 +02:00
Andras Banki-Horvath
8e0534f756
multi: add leader check to the healthcheck monitor
This commit extends our healtcheck with an optional leader check. This
is to ensure that given network partition or other cluster wide failure
we act as soon as possible to avoid a split-brain situation where a new
leader is elected but we still hold onto our etcd client.
2024-08-01 19:04:10 +02:00
Andras Banki-Horvath
7784d6abf6
build: pin healthcheck and kvdb modules temporarily
This is to ensure that the added functionality works correctly and
should be removed once these changes are merged and the packages are
tagged.
2024-08-01 19:04:10 +02:00
Andras Banki-Horvath
2c8d1c878e
kvdb: make etcd calls timeout to ensure liveness
Previously our RPC calls to etcd would hang even in the case of properly
set dial timeouts and even if there was a network partition. To ensure
liveness we need to make sure that calls fail correctly in case of
system failure. To fix this we add a default timeout of 30 seconds to
each etcd RPC call.
2024-08-01 19:04:10 +02:00
Andras Banki-Horvath
0fd4c7d5f9
healthcheck: improve logging of observers 2024-08-01 19:04:09 +02:00
Slyghtning
808d958c9c
docs: update release notes 2024-08-01 10:25:23 +02:00
Slyghtning
0273eac4b2
itest: payment failure reason canceled 2024-08-01 10:25:22 +02:00
Slyghtning
653226d29c
itest: format and typo fixes 2024-08-01 10:24:08 +02:00
Slyghtning
2e3c96f986
routing: new failure reason for cancelled payments 2024-08-01 10:24:08 +02:00
Slyghtning
d18c4d61ce
lnrpc: payment failure reason canceled 2024-08-01 10:24:07 +02:00
Olaoluwa Osuntokun
04dde98edc
Merge pull request #8764 from ellemouton/rb-send-via-multi-path
[3/4] Route Blinding: send MPP over multiple blinded paths
2024-07-31 19:21:49 -07:00
Keagan McClelland
f54c9ea8f7
htlcswitch: replace errors package implementation 2024-07-31 17:54:21 -07:00
Olaoluwa Osuntokun
b21521ff14
Merge pull request #8949 from ProofOfKeags/fn/req
[MICRO]: fn: Add new Req type to abstract the pattern of remote processing.
2024-07-31 17:31:35 -07:00
Olaoluwa Osuntokun
14ff12aa81
Merge pull request #8951 from ProofOfKeags/refactor/lnwallet-channel-channel-party
[MILLI]: Introduce and use ChannelParty
2024-07-31 17:30:32 -07:00
Keagan McClelland
1f9cac5f80
htlcswitch: refactor dust handling to use ChannelParty 2024-07-31 14:50:27 -07:00
Keagan McClelland
1d65f5bd12
peer: refactor createChanCloser to use ChannelParty 2024-07-31 14:50:27 -07:00
Keagan McClelland
0996e4f163
multi: refactor lnwallet/channel.go to use ChannelParty in select places
We also include changes to contractcourt, htlcswitch and peer to stitch the
boundaries together.
2024-07-31 14:50:26 -07:00
Keagan McClelland
33934449ac
multi: refactor select methods within channeldb to use ChannelParty
Also in this commit is a small adjustment to the call-sites to get
the boundaries stitched back together.
2024-07-31 14:50:26 -07:00
Keagan McClelland
3a15085014
input+lnwallet: refactor select methods in input to use ChannelParty 2024-07-31 14:50:26 -07:00
Keagan McClelland
1a5b5c5f62
lntypes: Add a ChannelParty type.
This commit introduces a ChannelParty type to LND. It is useful for
consolidating all references to the duality between the local and
remote nodes. This is currently handled by having named struct rows
or named boolean parameters, named either "local" or "remote". This
change alleviates the programmer from having to decide which node
should be bound to `true` or `false`. In an upcoming commit we will
change callsites to use this.
2024-07-31 14:50:23 -07:00
Keagan McClelland
2c6d229a69
fn: harden and refine the Req[I,O] API.
In this commit we opt to make the internal response channel fully
private and instead expose methods for doing resolution. This
prevents internal implementation details from leaking a little bit
better than the previous iteration.
2024-07-31 12:59:10 -07:00
Keagan McClelland
4835fdf237
fn: Add new Req type to abstract the pattern of remote processing.
It is common throughout the codebase to send data to a remote
goroutine for processing. Typically, along with the data we are
processing, we also send a one-shot channel where we intend to
listen for the response. This type encapsulates that pattern.
2024-07-31 12:59:03 -07:00
Oliver Gugger
16d80f5b5b
Merge pull request #8845 from bitbandi/multiple-etcd-host
Allow multiple etcd host
2024-07-31 08:55:48 -06:00
elbandi
6043ced572
Add configuration description 2024-07-31 15:31:56 +02:00
elbandi
a0ec4f24d6
docs: Add release note item 2024-07-31 15:31:55 +02:00
elbandi
3d48dbdd55
Allow multiple etcd hosts to be specified in db.etcd.host. 2024-07-31 15:31:17 +02:00
Oliver Gugger
72a36da9c6
Merge pull request #8950 from ProofOfKeags/refactor/lnwallet-channel-move-only
[NANO]: Move definitions into their own file
2024-07-31 06:53:19 -06:00
ziggie
0adcb5c316
docs: add release notes for 18.3. 2024-07-31 14:43:34 +02:00
ziggie
02c1264c53
multi: prevent nil panics in stop methods.
With this PR we might call the stop method even when the start
method of a subsystem did not successfully finish therefore we
need to make sure we guard the stop methods for potential panics
if some variables are not initialized in the contructors of the
subsystems.
2024-07-31 14:43:34 +02:00
Elle Mouton
be4c3dd9e4
zpay32: enforce a cipher text upper limit
To prevent an attacker from causing us to assign a huge in-memory
buffer, we place a cap on the maximum cipher text size of a blinded path
hop.
2024-07-31 14:11:00 +02:00
ziggie
e19f891453
graph: add log lines for stop and start func. 2024-07-31 13:12:20 +02:00
ziggie
598d6e23bc
lnd: change startup order of authGossiper. 2024-07-31 13:12:19 +02:00
ziggie
653e2f3667
multi: Allow interrupt of server startup.
This commit does two things. It starts up the server in a way that
it can be interrupted and shutdown gracefully.
Moreover it makes sure that subsystems clean themselves up when
they fail to start. This makes sure that depending subsytems can
shutdown gracefully as well and the shutdown process is not stuck.
2024-07-31 13:12:19 +02:00
ziggie
08b68bbaf7
multi: Add atomic start/stop functions.
Make sure that each subsystem only starts and stop once. This makes
sure we don't close e.g. quit channels twice.
2024-07-31 13:12:19 +02:00
Oliver Gugger
ac4ef28926
Merge pull request #8824 from Crypt-iQ/precise_dust_limit
multi: include commitment fees in dust calculation
2024-07-31 03:13:31 -06:00
Elle Mouton
b271922501
routing: dont use InPolicy for blinded paths
We only need the ChannelID, so no need to use the InPolicy which might
be nil.
2024-07-31 09:36:06 +02:00
Elle Mouton
8a14955a0a
docs: add release note 2024-07-31 09:36:06 +02:00
Elle Mouton
e416501802
itest: test sending MP payment over multiple blinded paths 2024-07-31 09:36:06 +02:00
Elle Mouton
e87110317b
routing: final changes to BlindedPaymentPathSet
Continue adding some complexity behind the BlindedPaymentPathSet. What
we do here is add a new IntroNodeOnlyPath method. The assumption we
make here is: If multiple blinded paths are provided to us in an invoice
but one of those paths only includes an intro node, then there is no
point in looking at any other path since we know that the intro node is
the destination node. So in such a case, we would have discarded any
other path in the `NewBlindedPaymentPathSet` constructor. So then we
would only have a single blinded path made up of an introduction node
only. In this specific case, in the `newRoute` function, no edge passed
to the function would have a blindedPayment associated with it (since
there are no blinded hops in this case). So we will have a case where
`blindedPathSet` passed to `newRoute` is not nil but `blindedPayment` is
nil since nonce was extacted from any edge. If this happens then we can
assume that this is the Intro-Node-Only situation described above. And
so we grabe the associated payment from the path set.
2024-07-31 09:15:43 +02:00
Elle Mouton
daaa24b69c
routing: let BlindedPaymentPathSet handle FinalCLTV logic
Instead of needing to remember how to handle the FinalCLTV value of a
blinded payment path at various points in the code base, we hide the
logic behind a unified FinalCLTVDelta method on the blinded path.
2024-07-31 09:15:24 +02:00