Commit Graph

17341 Commits

Author SHA1 Message Date
George Tsagkarelis
f2adabb989
docs: update release notes 2024-10-02 18:10:12 -07:00
Olaoluwa Osuntokun
8494887adc
lnd: signal taproot overlay chans based on config
We also add a sanity check to make sure they can't be signaled without
the aux interfaces.
2024-10-02 18:10:11 -07:00
Olaoluwa Osuntokun
c6ba5d11f1
lncfg: add new config option for taproot overlay chans 2024-10-02 18:10:10 -07:00
Olaoluwa Osuntokun
2395c4d0a1
rpc+funding: add taproot overlay as RPC chan type 2024-10-02 18:10:09 -07:00
Olaoluwa Osuntokun
d72de4cdbc
lnrpc: add SIMPLE_TAPROOT_OVERLAY feature bit 2024-10-02 18:10:08 -07:00
Olaoluwa Osuntokun
18521dbe0c
funding: add chan type awareness for new taproot chans overlay 2024-10-02 18:10:07 -07:00
Olaoluwa Osuntokun
0ee9b02094
lnwallet: add awareness of taproot overlay chan type to reservations 2024-10-02 18:10:06 -07:00
Olaoluwa Osuntokun
f21c1165a0
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
2024-10-02 18:10:05 -07:00
Olaoluwa Osuntokun
7f9268c38f
lnwire: add new taproot chans overlay feature bit 2024-10-02 18:10:04 -07:00
Olaoluwa Osuntokun
4920bf6e1a
contractcourt: integration aux sweeper to breach arb
Similar to the sweeper, when we're about to make a new breach
transaction, we ask the sweeper for a new change address, if it has one.
Then when we go to publish, we notify broadcast.
2024-10-02 18:10:03 -07:00
Olaoluwa Osuntokun
c59f11168b
contractcourt: update makeBreachedOutput to accept resolution blob 2024-10-02 18:10:02 -07:00
Olaoluwa Osuntokun
f81cd79bca
contractcourt: update GenSweepScript to return internal key
For the upcoming aux sweeper integration, the internal key is needed for
the call backs.
2024-10-02 18:10:01 -07:00
Olaoluwa Osuntokun
9a181105e2
multi: hook up new aux interfaces 2024-10-02 18:10:00 -07:00
Olaoluwa Osuntokun
47f728e548
contractcourt: pause resolution for HTLCs w/ custom records
This is a hold over until the aux resolution is finalized for HTLC
outputs.
2024-10-02 18:09:59 -07:00
Olaoluwa Osuntokun
eaea11e48f
sweep: update sweeper to use AuxSweeper to add extra change addr
In this commit, we start to use the AuxSweeper (if present) to obtain a
new extra change addr we should add to the sweeping transaction. With
this, we'll take the set of inputs and our change addr, and then maybe
gain a new change addr to add to the sweep transaction.

The extra change addr will be treated as an extra required tx out,
shared across all the relevant inputs. This'll also be used in
NeedWalletInput to make sure that we add an extra input if needed to be
able to pay for the change addr.
2024-10-02 18:09:58 -07:00
Olaoluwa Osuntokun
cb93f8c01a
sweep: add new AuxSweeper interface
In this commit, we add a new AuxSweeper interface. This'll take a set of
inputs, and a change addr for the sweep transaction, then optionally
return a new sweep output to be added to the sweep transaction.

We also add a new NotifyBroadcast method.  This'll be used to notify
that we're _about_ to broadcast a sweeping transaction. The set of
inputs is passed in, which allows the caller to prepare for the ultimate
broadcast of the sweeping transaction.

We also add ExtraTxOut to BumpRequest pass fees to NotifyBroadcast. This
allows the callee to know the total fee of the sweeping transaction.
2024-10-02 18:09:57 -07:00
Olaoluwa Osuntokun
d52d30d46e
server+sweep: convert GenSweepScript to use new addr type
We convert it to use lnwallet.AddrWithKey, as in the future, knowing the
internal key for an address will be useful.
2024-10-02 18:09:56 -07:00
Olaoluwa Osuntokun
88ae4cbb21
contractcourt: set resolution blob in commitSweepResolver 2024-10-02 18:09:55 -07:00
Olaoluwa Osuntokun
bf3cf9ef3c
input: add ResolutionBlob method to inputKit
We also update breachedOutput w/ the new API.
2024-10-02 18:09:54 -07:00
Olaoluwa Osuntokun
3f50339898
input: refactor all inputs to use MakeBaseInput, add opts
In this commit, we refactor all the other constructors for the input to
use MakeBaseInput. We also add a new set of functional options as well.
This'll be useful later on to ensure that new options are properly
applied to all the input types.
2024-10-02 18:09:53 -07:00
Olaoluwa Osuntokun
e0ced8e629
lnwallet+peer: move internalKeyForAddr to lnwallet package
This way we can re-use it. We also make it slightly more generalized.
2024-10-02 18:09:52 -07:00
Olaoluwa Osuntokun
f74d1ce53b
contractcourt: add CommitBlob to taprootBriefcase
This'll be used to store the extra resolution information for the
commitment outputs.
2024-10-02 18:09:51 -07:00
Olaoluwa Osuntokun
4619cefc8f
lnwallet: add new aux resolver interface
This will be used by external callers to modify the way we resolve
contracts on chain. For a given contract, we'll store an extra "blob",
that will later be presented during the sweeping phase.
2024-10-02 18:09:50 -07:00
Olaoluwa Osuntokun
0f2c16de99
contractcourt: convert taprootBriefcase to use new tlv record type
This commit doesn't yet go all the way to modify all the other records
quite yet.
2024-10-02 18:09:49 -07:00
Olaoluwa Osuntokun
bf0bd64023
lnwire: modify TestLightningWireProtocol to use sub-tests
This way, it's possible to run induvidual tests to target failures.
2024-10-02 18:09:48 -07:00
George Tsagkarelis
d1a2dd6bd0
routing: add htlcAmt to PaymentBandwidth method of TlvTrafficShaper
This commit was added to the 0-19-staging branch recently and therefore
didn't make it into a previous part yet. So it's unrelated to the
changes in this part but is required for the whole custom channel saga.
2024-10-02 18:09:46 -07:00
Olaoluwa Osuntokun
6485a816d1
Merge pull request #9134 from ellemouton/checkPayAddrBeforeDeref
routerrpc: check payaddr before using for probing
2024-09-26 14:50:29 +09:00
Elle Mouton
8663950c68
feature: remove b11 feature bit from default invoice set 2024-09-25 14:32:52 +09:00
Elle Mouton
f1015cd58d
server: stop interceptable switch in Stop 2024-09-25 14:32:52 +09:00
Elle Mouton
0bd76ffe32
invoices: init quit channel of modifier
Also add atomic start and stop vars to prevent close of a closed
channel.
2024-09-25 14:32:29 +09:00
Elle Mouton
7dc86acb8c
multi: update PaymentAddr to use fn.Option
Since it is allowed to not be set and so can lead to nil deref panics if
it is a pointer.
2024-09-25 11:14:35 +09:00
Oliver Gugger
84c91f701c
Merge pull request #9062 from Roasbeef/htlc-resolution-sweeper
contractcourt: use the sweeper for HTLC offered remote timeout resolu…
2024-09-19 09:43:16 -06:00
Oliver Gugger
611852fd34
Merge pull request #9123 from guggero/bump-18-99
build: bump master to version v0.18.99-beta
2024-09-19 03:57:11 -06:00
Oliver Gugger
4ff7d77a79
Merge pull request #9095 from lightningnetwork/extract-part4-from-staging-branch
[custom channels 4/5]: Extract PART4 from mega staging branch
2024-09-19 03:45:01 -06:00
Oliver Gugger
e0b4601fb9
multi: add co-op close custom data to close update
With this commit we populate additional information about the close
outputs (including potential custom channel data) in the close update
RPC message.
This will allow custom channels to find out how the additional close
outputs look like on chain and what data they might commit to.

We also hook up the aux custom data formatter, so it can format the
custom channel data to JSON.
2024-09-19 10:18:41 +02:00
Olaoluwa Osuntokun
8dee76a1b8
peer: decorate delivery addr w/ internal key
In this commit, we move to add the internal key to the delivery addr. This way, we give the aux chan closer the extra information it may need to properly augment the normal co-op close process.
2024-09-19 10:18:41 +02:00
Olaoluwa Osuntokun
44ab7e6b10
server+peer: init peer struct w/ AuxChanCloser if present 2024-09-19 10:18:41 +02:00
Olaoluwa Osuntokun
625d426a56
lnwallet: modify CoopCloseBalance to not depend on chan commit 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
8d651b9370
lnwallet/chancloser: add aux chan closer, use in coop flow 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
7ff251ca44
lnwallet/chancloser: add new AuxChanCloser interface 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
117a144f4e
lnwallet: add ability to do custom sort for coop close txn 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
517608ca3b
lnwallet: add ability to add extra co-op close outputs 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
7b396f4969
lnwallet: add FundingBlob method to LightningChannel 2024-09-19 10:18:40 +02:00
Olaoluwa Osuntokun
099f5566bc
lnwire: add CustomRecords to shutdown message 2024-09-19 10:18:39 +02:00
Oliver Gugger
dc32a48246
build: bump master to version v0.18.99-beta
As is customary when preparing for the next major (or minor) release, we
bump the version to .99 to allow us to set the minimum required version
to something like v0.18.4-beta in lndclient and it would still accept
the master branch (even if that target version hasn't been
released/tagged yet).
2024-09-19 09:33:54 +02:00
ffranr
9a972e1b0c
itest: add basic invoice HTLC modifier integration test
This commit introduces a basic integration test for the invoice
HTLC modifier. The test covers scenarios where an invoice is settled with a
payment that is less than the invoice amount, facilitated by the invoice
HTLC modifier.
2024-09-19 09:21:38 +02:00
Oliver Gugger
d37df75bc0
lnrpc+rpcserver: encode custom records as custom channel data
With this commit we encode the custom records as a TLV stream into the
custom channel data field of the invoice HTLC.
This allows the custom data parser to parse those records and replace it
with human-readable JSON on the RPC interface.
2024-09-19 09:21:38 +02:00
ffranr
bbae7148aa
multi: pass UpdateAddHtlc message custom records to invoice modifier 2024-09-19 09:21:38 +02:00
Oliver Gugger
83923c7f33
lnwire: add MergedCopy method to CustomRecords 2024-09-19 09:21:38 +02:00
ffranr
0c6a1558d5
lntest: add HtlcModifier support to node RPC harness
This commit enhances the itest LND node harness to include support for
the new `HtlcModifier` RPC endpoint.
At the same time we move another method to the correct file.
2024-09-19 09:21:38 +02:00