Commit graph

16503 commits

Author SHA1 Message Date
ffranr
795aff5f42
lnwire: add unit tests for ExtraOpaqueData.PackRecords 2024-05-15 16:47:08 +01:00
ffranr
71c32511dd
lnwire: add type CustomRecords
This commit introduces the `CustomRecords` type in the `lnwire` package,
designed to hold arbitrary byte slices. Each entry in this map can
associate with TLV type values that are greater than or equal to 65536.
2024-05-15 16:47:08 +01:00
ffranr
8b1d9c9248
htlcswitch: add missing method doc 2024-05-14 11:57:17 +01:00
ffranr
043f6963e8
multi: improve comment grammar 2024-05-14 11:57:16 +01:00
Oliver Gugger
81970eac6a
Merge pull request #8684 from lightningnetwork/aux-leaf-fetcher
[2/?]: lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
2024-05-01 15:51:11 +02:00
Oliver Gugger
72f7b80c28
lnwallet: thread thru input.AuxTapleaf to all relevant areas
In this commit, we start to thread thru the new aux tap leaf structures to all relevant areas. This includes: commitment outputs, resolution creation, breach handling, and also HTLC scripts.
2024-05-01 11:19:55 +02:00
Oliver Gugger
33f2db1c25
multi: thread thru the AuxLeafStore everywhere 2024-05-01 11:19:55 +02:00
Olaoluwa Osuntokun
2ac360a1b6
lnwallet: add TLV blob to PaymentDescriptor + htlc add
In this commit, we add a TLV blob to the PaymentDescriptor struct. We also now thread through this value from the UpdateAddHTLC message to the PaymentDescriptor mapping, and the other way around.
2024-05-01 11:19:55 +02:00
Olaoluwa Osuntokun
2cf38540e0
channeldb: add HtlcIndex to HTLCEntry
This may be useful for custom channel types that base everything off the index (a global value) rather than the output index (can change with each state).
2024-05-01 11:19:53 +02:00
Olaoluwa Osuntokun
d5f595e641
channeldb: add custom blobs to RevocationLog+HTLCEntry
This'll be useful for custom channel types that want to store extra information that'll be useful to help handle channel revocation cases.
2024-05-01 11:19:20 +02:00
Olaoluwa Osuntokun
0bf20500a7
channeldb: convert RevocationLog to use RecordT 2024-05-01 11:19:19 +02:00
Olaoluwa Osuntokun
f3655da070
channeldb: convert HTLCEntry to use tlv.RecordT 2024-05-01 11:19:15 +02:00
Olaoluwa Osuntokun
258dd5c96e
lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
In this commit, we add a new AuxLeafStore which can be used to dynamically fetch the latest aux leaves for a given state. This is useful for custom channel types that will store some extra information in the form of a custom blob, then will use that information to derive the new leaf tapscript leaves that may be attached to reach state.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
fc44ff4bff
input: add some utility type definitions for aux leaves
In this commit, we add some useful type definitions for the aux leaf.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
12acbac16a
lnwallet: add custom tlv blob to internal commitment struct
In this commit, we also add the custom TLV blob to the internal commitment struct that we use within the in-memory commitment linked list.

This'll be useful to ensure that we're tracking the current blob for our in memory commitment for when we need to write it to disk.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
5733bbb55c
lnwallet: export the HtlcView struct
We'll need this later on to ensure we can always interact with the new aux blobs at all stages of commitment transaction construction.
2024-05-01 10:13:09 +02:00
Olaoluwa Osuntokun
cbaa0c780d
channeldb: new custom blob nested TLV
In this commit, for each channel, we'll now start to store an optional custom blob. This can be used to store extra information for custom channels in an opauqe manner.
2024-05-01 10:13:09 +02:00
Oliver Gugger
51c2a1a9eb
mod: bump tlv to v1.2.5 2024-05-01 10:13:09 +02:00
Olaoluwa Osuntokun
6cf449168c
input+lnwallet: update taproot scripts to accept optional aux leaf
In this commit, we update all the taproot scripts to also accept an
optional aux leaf. This aux leaf can be used to add more redemption
paths for advanced channels, or just as an extra commitment space.
2024-05-01 10:13:09 +02:00
Oliver Gugger
bb44793cbd
Merge pull request #8683 from lightningnetwork/funding-tapcript
[1/?]: multi: add ability to fund+use musig2 channels that commit to a tapscript root
2024-04-30 18:12:16 +02:00
Olaoluwa Osuntokun
26ce8ee729
lnwallet: add initial unit tests for musig2+tapscript root chans 2024-04-30 16:39:21 +02:00
Olaoluwa Osuntokun
66fa0a20c1
lnwallet+peer: add tapscript root awareness to musig2 sessions
With this commit, the channel is now aware of if it's a musig2 channel, that also has a tapscript root. We'll need to always pass in the tapscript root each time we: make the funding output, sign a new state, and also verify a new state.
2024-04-30 16:39:21 +02:00
Olaoluwa Osuntokun
9466224805
lnwallet: update internal funding flow w/ tapscript root
This isn't hooked up yet to the funding manager, but with this commit, we can now start to write internal unit tests that handle musig2 channels with a tapscript root.
2024-04-30 16:39:20 +02:00
Olaoluwa Osuntokun
a4a7d11e88
multi: update GenTaprootFundingScript to pass tapscript root
In most cases, we won't yet be passing a root. The option usage helps us keep the control flow mostly unchanged.
2024-04-30 16:39:20 +02:00
Olaoluwa Osuntokun
8a0c25b5d6
lnwallet/chanfunding: add optional tapscript root 2024-04-30 16:39:20 +02:00
Olaoluwa Osuntokun
159f853bb2
input: add new tapscript root func op to GenTaprootFundingScript
This'll allow us to create a funding output that uses musig2, but uses a tapscript tweak rather than a normal BIP 86 tweak.
2024-04-30 16:39:20 +02:00
Olaoluwa Osuntokun
89cf4c274f
channeldb: add optional TapscriptRoot field + feature bit 2024-04-30 16:39:18 +02:00
Olaoluwa Osuntokun
1f110dcb24
channeldb: consolidate root bucket TLVs into new struct
In this commit, we consolidate the root bucket TLVs into a new struct.
This makes it easier to see all the new TLV fields at a glance. We also
convert TLV usage to use the new type param based APis.
2024-04-30 16:37:43 +02:00
Olaoluwa Osuntokun
bb0fb862f5
lnwallet/chanfunding: rename assembler.go to interface.go
In this commit, we rename the files as assembler.go houses the primary
interfaces/abstractions of the package. In the rest of the codebase,
this file is near uniformly called interface.go, so we rename the file
to make the repo more digestible at a scan.
2024-04-29 21:36:31 +02:00
Oliver Gugger
7fb233326e
Merge pull request #8674 from yyforyongyu/sweeper-remove-and-docs
sweep: add docs and remove dead code
2024-04-23 11:12:24 -06:00
yyforyongyu
e855421095
docs: update release notes 2024-04-23 23:19:41 +08:00
yyforyongyu
83024585bb
sweep: add README 2024-04-23 23:17:44 +08:00
Oliver Gugger
2b74a34301
Merge pull request #8678 from hieblmi/add-hieblmi-to-verify-install
Add hieblmi to verify install script
2024-04-23 06:16:43 -06:00
Slyghtning
ffaf4da1da
release: add hieblmi to verify install script 2024-04-23 10:03:23 +02:00
yyforyongyu
9c5124e117
sweep: remove unused param Fee 2024-04-23 04:44:00 +08:00
yyforyongyu
54aaeea491
sweep: remove dead code and dead tests 2024-04-23 04:44:00 +08:00
Olaoluwa Osuntokun
7af195768a
Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
Oliver Gugger
73fd389e9a
Merge pull request #8627 from feelancer21/inbound-fees-reject
lnrpc: rejects positive inbound fees by default
2024-04-22 01:56:02 -06:00
Oliver Gugger
a201d5e365
Merge pull request #8661 from ProofOfKeags/feature/record-producer-axiom
tlv: add axiomatic RecordProducer implementation for Record
2024-04-22 01:42:06 -06:00
feelancer21
a2319e4313 lnrpc: rejects positive inbound fees by default
Positive inbound are now rejected by default. The user can enable positive
inbound fees with the option 'accept-positive-inbound-fees'.
2024-04-20 00:11:36 +02:00
yyforyongyu
4d96f9c4c1
docs: add release notes 2024-04-20 04:41:31 +08:00
yyforyongyu
d854c80aa7
itest+lntest: fix itest re the new sweeping behavior 2024-04-20 04:41:29 +08:00
yyforyongyu
e0f0f5c6a9
sweep: skip wallet inputs in isThirdPartySpent 2024-04-19 21:33:40 +08:00
yyforyongyu
a50cdd64c5
sweep: assign deadline values to inputs in handleNewInput
This commit changes how we transform from a deadline option to a
concrete deadline value - previously this is done when we decide to
cluster inputs, and we now move it to a step earlier - once an input is
received via `SweeperInput`, we will immediately transform its optional
deadline into a real value. For inputs that come with a deadline option,
since the Some will be used, it makes no difference. For inputs with
None as their deadlines, we need this change to make sure the default
deadlines are assigned accurately.
2024-04-19 21:33:39 +08:00
yyforyongyu
96883f307c
itest+sweep: add itest testSweepCommitOutputAndAnchor
This commit adds a test case to check the no deadline sweeping behavior.
The sweeper is updated to make sure it can handle the case for neutrino
backend.
2024-04-19 21:33:39 +08:00
yyforyongyu
f5a321d0d3
contractcourt: remove unused param to please linter 2024-04-19 21:33:39 +08:00
yyforyongyu
871cab4bc0
sweep: make sure inputs with different locktime values are not grouped 2024-04-19 21:33:39 +08:00
yyforyongyu
49cfb91af1
contractcourt: make sure sweep happens immediately on startup
This commit makes sure the time-sensitive outputs are swept immediately
during startup.
2024-04-19 21:33:39 +08:00
yyforyongyu
7abefa7760
cmd: update bumpfee, bumpclosefee and bumpforceclosefee 2024-04-19 21:33:38 +08:00
yyforyongyu
6f55a7af05
itest: add new test to check BumpFee and PendingSweeps 2024-04-19 21:33:38 +08:00