Commit Graph

16914 Commits

Author SHA1 Message Date
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
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
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
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
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
Elle Mouton
8df03de3e9
routing: swap out final hop blinded route pub keys
If multiple blinded paths are provided, they will each have a different
pub key for the destination node. This makes using our existing
pathfinding logic tricky since it depends on having a single destination
node (characterised by a single pub key). We want to re-use this logic.
So what we do is swap out the pub keys of the destinaion hop with a
pseudo target pub key. This will then be used during pathfinding. Later
on once a path is found, we will swap the real destination keys back in
so that onion creation can be done.
2024-07-31 09:14:31 +02:00
Elle Mouton
4a22ec8413
routing: pass BlindedPaymentPathSet around everywhere
Building on from the previous commit, here we pass the PathSet around
everywhere where we previously passed around the single BlindedPayment.
2024-07-31 09:14:28 +02:00
Elle Mouton
3d5f20b70f
multi: introduce BlindedPaymentPathSet
This commit introduces a new type, `BlindedPaymentPathSet`. For now, it
holds only a single `BlindedPayment` but eventually it will hold and
manage a set of blinded payments provided for a specific payment. To
make the PR easier to follow though, we start off just letting it hold a
single one and do some basic replacements.
2024-07-31 09:11:49 +02:00
ProofOfKeags
67c5fa9478
Merge pull request #8946 from ziggie1984/fix-bumpforceclose-behaviour
Fix bumpforceclose behavior for force closes without htlcs.
2024-07-30 14:42:19 -06:00
ziggie
da7b95d4a4
docs: add release-notes. 2024-07-30 20:31:29 +02:00
ziggie
cac5b32d88
itest: adapt itest for the new anchor behavior.
Now we also register anchors when no HTLCs are at stake.
2024-07-30 20:31:29 +02:00
ziggie
e413759669
contractcourt: Always register anchors with sweeper.
Even if no HTLCs are at stake we are going to register the anchor
outputs with the sweeper subsystem with a default high deadline.
We need to do this, because otherwise we are not able to bump the
fee of the closing transaction manually.
2024-07-30 20:31:29 +02:00
Keagan McClelland
82ff360ad2
lnwallet: fix linter errors resulting from commitmentChain move. 2024-07-30 10:22:23 -07:00
Keagan McClelland
4cf7555922
lnwallet: move commitChain to its own file. 2024-07-30 10:18:28 -07:00
Keagan McClelland
3e7866d85c
lnwallet: fix linter errors introduced by updateLog move 2024-07-30 10:17:47 -07:00
Oliver Gugger
7f9fbbe7c4
Merge pull request #8941 from bitromortac/fee-limit-inbound
routing: fix fee limit condition
2024-07-30 10:09:33 -06:00
Oliver Gugger
a1af505df4
Merge pull request #8948 from Filiprogrammer/docs-fix-leader-readiness-probe
docs: fix leader node readiness probe example
2024-07-30 08:54:54 -06:00
bitromortac
0358b3a0fa
routing: use amount to send for time lock weight
The time lock weight for a hop is supposed to be proportional to the
amount that is sent/locked, but in a previous change we switched to the
net amount, where inbound fees aren't yet applied. This is corrected in
this commit.
2024-07-30 08:53:10 +02:00
bitromortac
b0f0715813
routing: fix fee limit condition
When iterating edges, pathfinding checks early whether using an edge
would violate the requested total fee limit for a route. This check is
done on the net amount (an amount the inbound fee is calculated with).
However, a possible next hop's fee discount leads to a reduction in fees
and as such using the net amount leads to assuming a higher cumulative
fee than the route really has, excluding the path erroneously. We
perform the fee limit check on the amount to send, which includes both
inbound and outbound fees. This should be possible as the first hop's
outbound fee is zero and therefore doesn't have to be checked in the
end.
2024-07-30 08:53:09 +02:00
bitromortac
557b33733c
itest: add test for failing send after queryroutes 2024-07-30 08:52:50 +02:00
bitromortac
9b3b309f2d
routing: remove unused param, log 2024-07-30 08:52:49 +02:00
Olaoluwa Osuntokun
9decf80a68
Merge pull request #8735 from ellemouton/rb-receives
[2/4] Route Blinding Receives: Receive and send to a single blinded path in an invoice.
2024-07-29 19:00:06 -07:00
Keagan McClelland
51060aed45
lnwallet: move updateLog to its own file. 2024-07-29 15:26:35 -07:00
Keagan McClelland
39db0221f0
lnwallet: move PaymentDescriptor definition to its own file 2024-07-29 15:26:35 -07:00