Commit Graph

17072 Commits

Author SHA1 Message Date
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
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
2edbe6b878
routing: extract getEdgeUnifiers
We split up the functionality in getRouteUnifiers into checking that all
edges exist via getEdgeUnifiers and then add a backward pass that will
be responsible for determining the sender amount.

We remove the node pub key from the error string, as in route building
this is duplicate info, which can be determined from the input keys,
further it's not available in the backward pass anymore.

We refactor the BuildRoute test to use the require library and add a
test case for a max HTLC violation on the last hop.
2024-07-30 15:49:50 +02:00