Commit Graph

17255 Commits

Author SHA1 Message Date
Oliver Gugger
5e1a98cd43
lnrpc+rpcserver: add and populate custom channel data 2024-09-18 19:07:26 +02:00
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
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
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
Oliver Gugger
edd9ade7e5
Merge pull request #9017 from jharveyb/log_comress_zstd
log: bump logrotate dep, switch to zstd compressor
2024-09-15 01:36:11 -06:00
Yong
da7f8aeb61
Merge pull request #9099 from lightningnetwork/kvdb-wallet-db
kvdb: update to latest walletdb version
2024-09-15 15:22:15 +08:00
Olaoluwa Osuntokun
06b3588512
kvdb: update to latest walletdb version 2024-09-12 16:41:43 -07:00
Jonathan Harvey-Buschel
0a451b6d36
docs: add release notes 2024-09-12 12:31:03 -04:00
Jonathan Harvey-Buschel
b3c25166ed
build+mod: add zstd compressor support 2024-09-12 12:31:03 -04:00
Jonathan Harvey-Buschel
2f71822fe0
mod: bump logrotate to v1.1.2 2024-09-12 12:31:02 -04:00
Jonathan Harvey-Buschel
f360532eb1
lnd+build: add logcompressor flag 2024-09-12 12:31:02 -04:00
Oliver Gugger
750770e190
Merge pull request #8981 from ProofOfKeags/refactor/payment-descriptor-quarantine
[KILO]: Quarantine paymentDescriptor to the lnwallet package
2024-09-12 09:09:02 -06:00
Oliver Gugger
4fc2f4ae87
Merge pull request #9090 from Roasbeef/bolt-update-sept-2024
kvdb: update bbolt to v1.3.11
2024-09-12 06:15:23 -06:00
Olaoluwa Osuntokun
f8962af444
kvdb: update bbolt to v1.3.11 2024-09-11 10:45:12 -07:00
Oliver Gugger
fd154dd726
Merge pull request #9082 from morehouse/fuzz_reply_channel_range_fixes
lnwire: manually compare Timestamps in fuzz test
2024-09-11 05:27:09 -06:00
Oliver Gugger
a518f7dfbc
Merge pull request #9084 from morehouse/detect_invalid_timestamp_field
lnwire: detect invalid timestamp field
2024-09-11 03:31:01 -06:00
Oliver Gugger
a6f0ec9f00
Merge pull request #9077 from rhg4d9ow35/fix-issue-8897
commands: update interactive input in create command description
2024-09-11 03:28:29 -06:00
Oliver Gugger
a6e65d49cc
Merge pull request #9086 from morehouse/fix_fuzz_probability
routing: skip fuzzing when capacity is 0
2024-09-11 02:34:11 -06:00
CharlieZKSmith
000e3381b1 docs: add release notes 2024-09-10 21:46:02 -07:00
Keagan McClelland
93d17a48a8
lnwallet: remove unnecessary chanID argument form unsignedLocalUpdates 2024-09-10 13:57:05 -07:00
Keagan McClelland
4fadbb09bd
htlcswitch+lnwallet: quarantine paymentDescriptor to lnwallet
The objective of this commit is to make paymentDescriptor a private
data structure so we can quarantine it to the lnwallet package.
To accomplish this we had to prevent it from leaking out via the
arguments or return values of the public functions in lnwallet.
This naturally had consequences for the htlcswitch package as we
choose other mechanisms for tracking the data that paymentDescriptor
was responsible for.

Astoundingly, this was highly successful and allowed us to remove
a ton of redundant code. The diff for this commit represents a
substantial reduction in total lines of code as well as extraneous
arguments and return values from key functions.

This also sets the stage for future commits where we actually will
be attempting to rid lnwallet of paymentDescriptor completely.
2024-09-10 13:56:56 -07:00
Matt Morehouse
8373cca43c
routing: skip fuzzing when capacity is 0
probabilityFormula() is expected to return an error if capacity is 0, so
we should exclude that case from fuzzing.

Previously it was attempted to avoid this case by seeding the corpus
with an input that had capacity 1. That is not an effective solution
since the fuzzer can still generate an input with capacity 0.
2024-09-10 15:17:39 -05:00
Matt Morehouse
532fe05b63
discovery: remove check for incorrect number of timestamps
The check is no longer required, as it is now done during decoding.
2024-09-10 14:52:16 -05:00
Matt Morehouse
c1a6d3ac31
lnwire: fail decoding on incorrect number of timestamps
Currently if an incorrect number of timestamps is given, we fail later
on in the GossipSyncer. It makes more sense to fail right away, since we
already do that for incorrect SCID formats (e.g., unsorted or duplicate
SCIDs). There is already a matching check in Encode for incorrect number
of timestamps, so adding this check to Decode makes things symmetric.
2024-09-10 14:36:30 -05:00
Oliver Gugger
779903af9d
Merge pull request #9080 from ziggie1984/ziggie-pgp
scripts: add gpg key for ziggie [skip ci]
2024-09-10 11:50:59 -06:00
ziggie
82d99f3ebf
scripts: add gpg key for ziggie [skip ci] 2024-09-10 19:40:13 +02:00
Matt Morehouse
475cd6e344
lnwire: manually compare Timestamps in fuzz test
We can't use require.Equal because it considers nil slices and empty
slices to be not equal.
2024-09-10 11:41:31 -05:00