Commit Graph

16897 Commits

Author SHA1 Message Date
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
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
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
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
Filiprogrammer
060befd027
docs: fix leader node readiness probe example [skip ci]
Add the missing SERVER_ACTIVE state to the readiness probe. Without
this, a node that is ready to accept RPC calls would be incorrectly
considered not ready.
2024-07-29 21:31:24 +02:00
Eugene Siegel
74636e9bdd
release-notes: update for 0.18.3 2024-07-29 14:13:22 -04:00
Eugene Siegel
c1138af4ab
itest: modify async_bidirectional_payments itest to pass 2024-07-29 14:13:22 -04:00
Eugene Siegel
d6001d033b
htlcswitch+lnwallet: calculate fee exposure as commit fees + dust
This commit expands the definition of the dust limit to take into
account commitment fees as well as dust HTLCs. The dust limit is now
known as a fee exposure threshold. Dust HTLCs are fees anyways so it
makes sense to account for commitment fees as well. The link has
been modified slightly to calculate dust. In the future, the switch
dust calculations can be removed.
2024-07-29 14:13:21 -04:00
Oliver Gugger
b7c59b36a7
Merge pull request #8896 from ziggie1984/batchopen-feerate-fix
Fix batchopen fee calculation
2024-07-26 05:52:48 -06:00
Elle Mouton
c490279002
blindedpath: smarter dummy hop policy selection
This commit introduces more sophisticated code for selecting dummy hop
policy values for dummy hops in blinded paths.

For the case where the path does contain real hops, the dummy hop policy
values are derived by taking the average of those hop polices. For the
case where there are no real hops (in other words, we are the
introduction node), we use the default policy values used for normal
ChannelUpdates but then for the MaxHTLC value, we take the average of
all our open channel capacities.
2024-07-26 13:03:07 +02:00
ziggie
eb7818a633
docs: add release-notes. 2024-07-26 10:48:00 +02:00
ziggie
bf38aed87f
lnd: unify the default setting behaviour.
Setting default values for the channel opening fee rate is already
done elsewhere therefore we remove on of those checks and return
an error if no fee rate is specified.
2024-07-26 10:48:00 +02:00
ziggie
d0a7765c68
rpcserver: include fee calc. for psbt flow.
Include the fee calculaltion for the psbt flow. Moreover include
fee rate testing in the itest environment.
2024-07-26 10:48:00 +02:00
Elle Mouton
60a856ab65
record/routing: set minimum padding size 2024-07-26 10:32:47 +02:00
Elle Mouton
398623bde5
blindedpath: move blinded path logic to own pkg 2024-07-26 09:54:59 +02:00
Elle Mouton
c62a9c235e
itest: test blinded paths over private channels 2024-07-26 09:54:38 +02:00
Elle Mouton
74e45ec4bf
docs: update release notes 2024-07-26 09:54:38 +02:00
Elle Mouton
66765de413
itest: add route blinding dummy hops test
Add an itest that tests the addition of dummy hops to a blinded path. By
testing that invoices containing such a path can be paid, it also tests
the peeling of dummy hops by the receiver.
2024-07-26 09:54:38 +02:00
Elle Mouton
f0558babf3
multi: send MPP payment to blinded path
Make various sender side adjustments so that a sender is able to send an
MP payment to a single blinded path without actually including an MPP
record in the payment.
2024-07-26 09:54:38 +02:00
Elle Mouton
64a99d4a8e
itest: end to end route blinding invoices test
Update one of the route blinding itests to do a full end-to-end test
where the recipient generates and invoice with a blinded path and the
sender just provides that invoice to SendPayment.

The tests also covers the edge case where the recipient is the
introduction node.
2024-07-26 09:54:38 +02:00
Elle Mouton
735d7d9738
multi: send to a blinded path in an invoice
Update the SendPayment flow so that it is able to send to an invoice
containing a blinded path.
2024-07-26 09:54:37 +02:00