Commit Graph

17480 Commits

Author SHA1 Message Date
Jonathan Harvey-Buschel
ea83300942
lnwallet: sort sig jobs before submission
To make sure we attempt to read the results of the sig batches in the
same order they're processed, we sort them _before_ submitting them to
the batch processor.
Otherwise it might happen that we try to read on a result channel that
was never sent on because we aborted due to an error.
We also use slices.SortFunc now which doesn't use reflection and might
be slightly faster.
2024-09-18 19:07:26 +02:00
Olaoluwa Osuntokun
83fdbda2fa
multi: obtain+verify aux sigs for all second level HTLCs
In this commit, we start to use the new AuxSigner to obtain+verify aux sigs for all second level HTLCs. This is similar to the existing SigPool, but we'll only attempt to do this if the AuxSigner is present (won't be for most channels).
2024-09-18 19:04:53 +02:00
Elle Mouton
077273e66e
docs: update release notes 2024-09-18 16:20:28 +02:00
Elle Mouton
a62201b61d
netann: add chan update 2 validate and verify funcs 2024-09-18 16:20:28 +02:00
Elle Mouton
580c10477f
lnwire: add ChannelUpdate2
Add the new ChannelUpdate2 message and ensure that it implements the
ChannelUpdate interface.
2024-09-18 16:20:28 +02:00
Elle Mouton
21c9ef8904
netann: validation and verification funcs for ChannelAnnouncement2 2024-09-18 16:14:59 +02:00
Elle Mouton
5fc1da3abe
netann: add MsgHash helper
This commit adds the MsgHash helper function which can be used to
calculate the digest of a message to be signed using schnorr signatures.
2024-09-18 16:14:59 +02:00
Elle Mouton
a438eb3af3
lnwire: add ChannelAnnouncement2 message
And ensure that it implements the ChannelAnnouncement interface.
2024-09-18 16:14:59 +02:00
Elle Mouton
66302ceb29
lnwire: make RawFeatureVector a Record producer 2024-09-18 16:14:58 +02:00
Elle Mouton
0b4e5a0d83
lnwire: add AnnounceSignatures2 message
And ensure that it implements the AnnounceSignatures interface.
2024-09-18 16:14:58 +02:00
Elle Mouton
ced88a9978
netann: let ChannelUpdate validate methods take in the new interface 2024-09-18 16:14:58 +02:00
Elle Mouton
35d0c61c12
netann: let ValidateChannelAnn take the new interface 2024-09-18 16:14:58 +02:00
Elle Mouton
34e9ee1ee5
lnwire: lnwire: add a ChannelUpdate interface
In this commit, a new ChannelUpdate interface is added and
ChannelUpdate1 is made to implement the new interface.
2024-09-18 16:14:58 +02:00
Elle Mouton
7bbf89625f
multi: move ChannelUpdate validate methods to netann 2024-09-18 16:13:18 +02:00
Elle Mouton
e07d23567c
lnwire: add a ChannelAnnouncement interface
Add a new ChannelAnnouncement interface and ensure that
ChannelAnnouncement1 implements it.
2024-09-18 16:13:17 +02:00
Elle Mouton
615db1fc2e
multi: move channel announcement validation to netann
from the graph package.
2024-09-18 16:13:17 +02:00
Elle Mouton
a6bf76a0b7
discovery+lnwallet: add fetchPKScript helper to gossiper
This commit makes an lnwallet.BlockChainIO available to the gossiper and
uses it to construct a helper that can be used to fetch the pk script
for a given SCID. This will be used for channel announcement
verification in an upcoming commit.
2024-09-18 16:13:17 +02:00
Elle Mouton
9be84c1bdc
graph+lnwallet: move FetchTx logic to lnwallet
So that it can be re-used elsewhere.
2024-09-18 16:13:17 +02:00
Elle Mouton
f230e2c574
lnwire: add AnnounceSignatures interface
Add a AnnounceSignatures interface and ensure that AnnounceSignatures1
implements it.
2024-09-18 16:13:17 +02:00
Elle Mouton
df65b7cad9
lnwire: add FirstBlock and BlockRange to GossipTimestampRange
Add new FirstBlockHeight and BlockRange TLV fields to the
GossipTimestampRange message. This will be used to query for Gossip 1.75
messages which are timestamped using block height instead of Unix
timestamps.
2024-09-18 16:13:17 +02:00
Elle Mouton
60b0e46c36
lnwire: add btc and node announcement nonces to channel_ready
In preparation for Gossip 1.75, we add new TLV's to the `ChannelReady`
message. Namely: `AnnouncementBitcoinNonce` and `AnnouncementNodeNonce`.
These will be used to exchange nones required for producing the partial
signature to be send in the `AnnouncementSignatures2` message.
The type numbers for these new fields are even because if they are set,
then a peer is expecting its peer to understand gossip 1.75 and the new
fields.
2024-09-18 16:13:17 +02:00
Elle Mouton
60f331edb1
multi: rename ChannelUpdate to ChannelUpdate1
In preparation for adding a new ChannelUpdate2 message and a
ChannelUpdate interface, we rename the existing message to
ChannelUpdate1.
2024-09-18 16:13:17 +02:00
Elle Mouton
bb44efa21f
multi: rename ChannelAnnouncement to ChannelAnnouncment1
In preparation for adding the new ChannelAnnouncement2 message along
with a ChannelAnnouncement interface, we rename the existing message to
ChannelAnnouncement1.
2024-09-18 16:13:17 +02:00
Elle Mouton
05d76b696d
multi: rename AnnounceSignatures to AnnounceSignatures1
In preparation for adding a new message, AnnounceSignatures2 along with
an AnnounceSignatures interface, we rename the existing message to
AnnounceSignatures1.
2024-09-18 16:13:16 +02:00
Oliver Gugger
838a32d13c
Merge pull request #9116 from xixishidibei/master
bug: fix incorrect parameters in test cases
2024-09-18 04:04:28 -06:00
Oliver Gugger
bd84fd256e
lnwire: add custom records field to type CommitSig 2024-09-18 10:25:42 +02:00
Olaoluwa Osuntokun
1e85c5054e
lnwallet: add WithAuxSigner option to channel 2024-09-18 10:25:42 +02:00
Oliver Gugger
f52a163334
lnwallet: clarify usage of cancel and response channels 2024-09-18 10:25:42 +02:00
Oliver Gugger
953fb073d4
lnwallet: allow read-only access to HtlcView's HTLCs
Due to a recent refactor, the HTLCs are no longer an exported type.
Custom channels need access to those updates, so we provide them in a
read-only manner.
2024-09-18 10:25:42 +02:00
Olaoluwa Osuntokun
aa0c680e18
lnwallet: add new AuxSigner interface to mirror SigPool
In this commit, we add a new aux signer interface that's meant to mirror the SigPool. If present, this'll be used to (maybe) obtain signatures for second level HTLCs for certain classes of custom channels.
2024-09-18 10:25:42 +02:00
Oliver Gugger
0b64b80642
funding: inform aux controller about channel ready/finalize 2024-09-18 10:25:41 +02:00
Oliver Gugger
5c854a2f53
multi: add tapscript root to gossip message 2024-09-18 10:25:41 +02:00
Olaoluwa Osuntokun
bcb66585d4
funding+lnwallet: finish hook up new aux funding flow
For the initiator, once we get the signal that the PSBT has been
finalized, we'll call into the aux funder to get the funding desc. For
the responder, once we receive the funding_created message, we'll do the
same.

We now also have local+remote aux leaves for the commitment transaction.

Some old TODO comments that in retrospect aren't required anymore are
removed as well.
2024-09-18 10:25:41 +02:00
Olaoluwa Osuntokun
7ec48a5054
funding+lnwallet: only blind tapscript root early in funding flow
In this commit, we modify the aux funding work flow slightly. We won't
be able to generate the full AuxFundingDesc until both sides has
sent+received funding params. So we'll now only attempt to bind the
tapscript root as soon as we send+recv the open_channel message.

We'll now also make sure that we pass the tapscript root all the way
down into the musig2 session creation.
2024-09-18 10:25:41 +02:00
Olaoluwa Osuntokun
bed4562584
lnwallet: for PsbtIntent return the internal key in the POutput
We also add a new assertion to the itests to ensure the field is being properly set.
2024-09-18 10:25:41 +02:00
Olaoluwa Osuntokun
7144a1c733
lnwallet: add TaprootInternalKey method to ShimIntent
If this is a taproot channel, then we'll return the internal key which'll be useful to callers.
2024-09-18 10:25:41 +02:00
Olaoluwa Osuntokun
65f54cb075
config+serer: add AuxFundingController as top level cfg option 2024-09-18 10:25:40 +02:00
Olaoluwa Osuntokun
84cc9a1f0b
funding: create new AuxFundingController interface
In this commit, we make a new `AuxFundingController` interface capable of processing messages off the wire. In addition, we can use it to abstract away details w.r.t how we obtain a `AuxFundingDesc` for a given channel.

We'll now use this whenever we get a channel funding request, to make sure we pass along the custom state that a channel may require.
2024-09-18 10:25:40 +02:00
Olaoluwa Osuntokun
72beb7955d
lnwallet: use AuxFundingDesc to populate all custom chan info
With this commit, we'll now populate all the custom channel information within the OpenChannel and ChannelCommitment structs.
2024-09-18 10:25:40 +02:00
Olaoluwa Osuntokun
116a6430f0
lnwallet: add new AuxFundingDesc struct
This struct will house all the information we'll need to do a class of custom channels that relies primarily on adding additional items to the tapscript root of the HTLC/commitment/funding outputs.
2024-09-18 10:25:40 +02:00
Oliver Gugger
08a7290b81
Merge pull request #9103 from ziggie1984/signing-release
Documentation how to sign a LND/LNCLI release by a developer
2024-09-18 01:49:12 -06:00
Oliver Gugger
191688f316
Merge pull request #9111 from Liongrass/patch-2
Fix links to resolve issue in Builder's Guide (https and redirect)
2024-09-18 01:45:43 -06:00
Oliver Gugger
cd6f72d2f2
Merge pull request #9113 from Liongrass/patch-4
Update http to https in c#.md
2024-09-18 01:45:31 -06:00
Oliver Gugger
375338d816
Merge pull request #9114 from Liongrass/patch-5
Update links in javascript.md
2024-09-18 01:45:16 -06:00
xixishidibei
c7505812c5 bug: fix incorrect parameters in test cases
Signed-off-by: xixishidibei <xixishidibei@outlook.com>
2024-09-18 14:58:41 +08:00
ziggie
eba481e790
docs: add instructions how to sign a LND release. 2024-09-18 01:31:12 +02:00
Leonhard Weese
923153d463
Update links in javascript.md
I updated two `gprc.io` resources.

Additionally the article on [javascript protocol buffers](https://developers.google.com/protocol-buffers/docs/reference/javascript-generated) is no longer available. I believe [this article](https://protobuf.dev/protobuf-javascript/) replaces it and that Google has moved the protobuf documentation to another domain.
2024-09-18 03:34:35 +08:00
Leonhard Weese
ab71c0cf40
Update http to https in c#.md
This pull request changes an outdated link as it causes issue [#670](https://github.com/lightninglabs/docs.lightning.engineering/pull/670). The document is mirrored on the Builder's Guide repo
2024-09-18 03:28:05 +08:00
Leonhard Weese
e494d7401a
Fix links to resolve issue in Builder's Guide (https and redirect)
There are some links in this document that cause issues for pull request [#670](https://github.com/lightninglabs/docs.lightning.engineering/pull/670) in the Builder's Guide Repo.
2024-09-18 03:18:45 +08:00
ziggie
f5f52a65c9
scripts: rename PGP key file.
The name in the verify-install.sh and the PGP key file need to be
the same.
2024-09-16 10:49:18 +02:00