Commit graph

17088 commits

Author SHA1 Message Date
Keagan McClelland
22e34702d8
funding: replace newly edited log values with lazier variants 2024-08-01 12:11:52 -07:00
Keagan McClelland
e3a9d0acbe
multi: break ChannelConstraints into two sub-structures
This commit breaks the ChannelConstraints structure into two
sub-structures that reflect the fundamental differences in how
these parameters are used. On its face it may not seem necessary,
however the distinction introduced here is relevant for how we
will be implementing the Dynamic Commitments proposal.
2024-08-01 12:00:32 -07: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
ffranr
2a6e54016f
Makefile: add lint check for Go version in Dockerfile and YAML
Implemented linter scripts to ensure consistency of the Go version
specified in Dockerfiles and YAML files. These scripts verify that the
Go version used across these files is uniform, enhancing maintainability
and reducing configuration errors.

This commit also introduces a `GO_VERSION` Makefile variable to control
the Go version used throughout the project.
2024-08-01 14:09:58 +01:00
bitromortac
c18694ff5e
routing: backward pass determines unified edges
We shift the duty of determining the policies to the backward pass as
the forward pass will only be responsible for finding the corrected
receiver amount.

Note that this is not a pure refactor as demonstrated in the test, as
the forward pass doesn't select new policies anymore, which is less
flexible and doesn't lead to the highest possible receiver amount. This
is however neccessary as we otherwise won't be able to compute
forwarding amounts involving inbound fees and this edge case is unlikely
to occur, because we search for a min amount for a route that was most
likely constructed for a larger amount.
2024-08-01 11:16:18 +02:00
bitromortac
e4c7c10618
routing: handle both amounts equally
We duplicate the function calls to handle the min amount and known
amount cases in a similar manner, to make the next diff easier to
parse.
2024-08-01 11:16:15 +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
04c37344ae
lnwallet: refactor channel to use new typed List 2024-07-31 13:03:34 -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
ffranr
077e6682fa
Makefile: rename variable to ACTIVE_GO_VERSION
Renamed the Makefile variable `GO_VERSION` to `ACTIVE_GO_VERSION` for
improved clarity. This change also frees up the name `GO_VERSION` to be
used for defining the global Go version for reproducible binaries in a
subsequent commit.
2024-07-31 16:53:47 +01:00
ffranr
d7a81a1fe3
multi: use Go version 1.22.5 throughout 2024-07-31 16:53:47 +01: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