Commit graph

17249 commits

Author SHA1 Message Date
Oliver Gugger
89c84f1da6
lnwallet: fix import issue 2024-10-11 14:46:09 +02:00
Oliver Gugger
a3db2145dc
Merge branch '0-18-4-branch-rc1-9154' into 0-18-4-branch-rc1 2024-10-11 14:23:41 +02:00
ziggie
a5eca91602
multi: bump btcd version.
The new SignCompact return values had to be adopted across the
code base.
2024-10-11 14:23:41 +02:00
Oliver Gugger
5c7be35ca5
Merge branch '0-18-4-branch-rc1-8960' into 0-18-4-branch-rc1 2024-10-11 14:23:05 +02:00
Olaoluwa Osuntokun
16edbf3026
sweep: ensure we factor in extra change addrs in MaxFeeRateAllowed 2024-10-11 14:22:50 +02:00
George Tsagkarelis
00ed751ee5
docs: update release notes 2024-10-11 14:22:47 +02:00
Olaoluwa Osuntokun
9f048b0ea3
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-11 14:22:13 +02:00
Olaoluwa Osuntokun
6619646088
lncfg: add new config option for taproot overlay chans 2024-10-11 14:22:13 +02:00
Olaoluwa Osuntokun
3031f21182
rpc+funding: add taproot overlay as RPC chan type 2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
4eaba9b3db
lnrpc: add SIMPLE_TAPROOT_OVERLAY feature bit 2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
72d437d5c8
funding: add chan type awareness for new taproot chans overlay 2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
4efa39ddb1
lnwallet: add awareness of taproot overlay chan type to reservations 2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
745f3a6181
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
1a3c94a501
lnwire: add new taproot chans overlay feature bit 2024-10-11 14:22:12 +02:00
Olaoluwa Osuntokun
3d7d9d2612
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-11 14:22:12 +02:00
Olaoluwa Osuntokun
4c16e55aca
contractcourt: update makeBreachedOutput to accept resolution blob 2024-10-11 14:22:11 +02:00
Olaoluwa Osuntokun
ded6959fd5
contractcourt: update GenSweepScript to return internal key
For the upcoming aux sweeper integration, the internal key is needed for
the call backs.
2024-10-11 14:22:11 +02:00
Olaoluwa Osuntokun
d0501ab840
multi: hook up new aux interfaces 2024-10-11 14:22:11 +02:00
Olaoluwa Osuntokun
678028cee9
contractcourt: pause resolution for HTLCs w/ custom records
This is a hold over until the aux resolution is finalized for HTLC
outputs.
2024-10-11 14:22:11 +02:00
Olaoluwa Osuntokun
a21fb1b69c
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-11 14:22:11 +02:00
Olaoluwa Osuntokun
23e99ddd4d
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-11 14:22:11 +02:00
Olaoluwa Osuntokun
3726cfa319
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-11 14:22:11 +02:00
Olaoluwa Osuntokun
fef368bb38
contractcourt: set resolution blob in commitSweepResolver 2024-10-11 14:22:10 +02:00
Olaoluwa Osuntokun
080771db62
input: add ResolutionBlob method to inputKit
We also update breachedOutput w/ the new API.
2024-10-11 14:22:10 +02:00
Olaoluwa Osuntokun
fc02cd7b0c
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-11 14:22:10 +02:00
Olaoluwa Osuntokun
07ee114116
lnwallet+peer: move internalKeyForAddr to lnwallet package
This way we can re-use it. We also make it slightly more generalized.
2024-10-11 14:22:10 +02:00
Olaoluwa Osuntokun
74d27f2c7c
contractcourt: add CommitBlob to taprootBriefcase
This'll be used to store the extra resolution information for the
commitment outputs.
2024-10-11 14:22:10 +02:00
Olaoluwa Osuntokun
f4710ca639
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-11 14:22:10 +02:00
Olaoluwa Osuntokun
900a0a114a
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-11 14:22:10 +02:00
Olaoluwa Osuntokun
035126b280
lnwire: modify TestLightningWireProtocol to use sub-tests
This way, it's possible to run induvidual tests to target failures.
2024-10-11 14:22:09 +02:00
George Tsagkarelis
9d50e273a3
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-11 14:22:09 +02:00
Oliver Gugger
053b6bcfad
Merge branch '0-18-4-branch-rc1-9134' into 0-18-4-branch-rc1 2024-10-11 14:20:33 +02:00
Elle Mouton
663f4c251e
feature: remove b11 feature bit from default invoice set 2024-10-11 14:20:19 +02:00
Elle Mouton
6df4f27929
server: stop interceptable switch in Stop 2024-10-11 14:20:19 +02:00
Elle Mouton
575d699917
invoices: init quit channel of modifier
Also add atomic start and stop vars to prevent close of a closed
channel.
2024-10-11 14:20:19 +02:00
Elle Mouton
d2c745e610
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-10-11 14:20:17 +02:00
Oliver Gugger
7857f38f45
Merge branch '0-18-4-branch-rc1-9095' into 0-18-4-branch-rc1 2024-10-11 14:17:28 +02:00
Oliver Gugger
9ce799578c
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-10-11 14:17:28 +02:00
Olaoluwa Osuntokun
39e4e8d8a4
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-10-11 14:17:28 +02:00
Olaoluwa Osuntokun
fbbcecc635
server+peer: init peer struct w/ AuxChanCloser if present 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
8b97d4f833
lnwallet: modify CoopCloseBalance to not depend on chan commit 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
e536cfad0f
lnwallet/chancloser: add aux chan closer, use in coop flow 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
e2dae56698
lnwallet/chancloser: add new AuxChanCloser interface 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
2d8c4fda2f
lnwallet: add ability to do custom sort for coop close txn 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
0cb211e14c
lnwallet: add ability to add extra co-op close outputs 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
7e4f6f5b4a
lnwallet: add FundingBlob method to LightningChannel 2024-10-11 14:17:27 +02:00
Olaoluwa Osuntokun
6feb189a21
lnwire: add CustomRecords to shutdown message 2024-10-11 14:17:26 +02:00
ffranr
35ce62c021
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-10-11 14:17:26 +02:00
Oliver Gugger
0cb599dbf6
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-10-11 14:17:26 +02:00
ffranr
c1aa44c476
multi: pass UpdateAddHtlc message custom records to invoice modifier 2024-10-11 14:17:26 +02:00