Commit Graph

17236 Commits

Author SHA1 Message Date
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
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
Oliver Gugger
65046561c4
Merge pull request #9079 from ziggie1984/remove-unsupported-nolint-directive
chanfunding: remove unsupported linter directive.
2024-09-10 09:01:50 -06:00
ziggie
6f26f2a5b3
chanfunding: remove unsupported linter directive.
Remove unsupported linter and also change ifelse clause to
switch statement.
2024-09-10 16:32:59 +02:00
Oliver Gugger
556c664984
Merge pull request #9078 from yyforyongyu/itest-log
Makefile: add `-test.v` for `make itest`
2024-09-10 08:04:52 -06:00
yyforyongyu
db332db025
Makefile: add -test.v for make itest 2024-09-10 17:21:03 +08:00
Keagan McClelland
27ff5f085a
lnwallet: remove unused function PayDescsFromRemoteLogUpdates
This function is no longer used as of the last commit and it is the
last remaining leak of the PaymentDescriptor type through the public
API.
2024-09-09 20:59:41 -06:00
Keagan McClelland
dc60f78f7f
htlcswitch: remove PaymentDescriptor conversion from reforwardSettleFails
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 20:59:41 -06:00
Keagan McClelland
957557a937
htlcswitch+lnwallet: remove PaymentDescriptor from ReceiveRevocation returns
This is part of a systematic removal of PaymentDescriptor from the public
API of the lnwallet package. This marks the last change needed before we
make the PaymentDescriptor structure private.
2024-09-09 20:59:22 -06:00
Keagan McClelland
1ae5705954
htlcswitch: remove PaymentDescriptor from processRemoteSettleFails call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 17:15:31 -06:00
Keagan McClelland
aa38041240
htlcswitch: remove PaymentDescriptor from processRemoteAdds call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 17:15:30 -06:00
Keagan McClelland
d881809a4d
htlcswitch: remove PaymentDescriptor from hodlHtlc
This is part of a systematic removal of PaymentDescriptor from the
mechanics of the htlcswitch package.
2024-09-09 16:53:11 -06:00
Keagan McClelland
a0818a0d16
htlcswitch: remove PaymentDescriptor from the processExitHop's call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
07647fe53a
htlcswitch: remove PaymentDescriptor from settleHTLC's call signature
This is done as part of a systematic removal of PaymentDescriptor from
the mechanics of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
877d29c717
htlcswitch: remove PaymentDescriptor from sendHTLCError's call signature
This is done as part of a systematic removal of PaymentDescriptor from
the mechanics of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
0fb29b2598
channeldb: add convenience functions for generating Source/Dest Refs 2024-09-09 16:53:10 -06:00
Keagan McClelland
1e2bf3e0b3
lnwallet: add function to convert paymentDescriptor to LogUpdate
Here we add a function that is capable of recovering LogUpdates from
paymentDescriptors and we refactor the lnwallet code to use this
rather than doing JIT inline construction of the LogUpdates.
2024-09-09 16:53:08 -06:00
Keagan McClelland
721a0c5edc
lnwire+htlcswitch: change NewInvalidBlinding to use array instead of slice 2024-09-09 16:26:41 -06:00
Keagan McClelland
5505b6daff
htlcswitch: change sendMalformedHTLCError to take array instead of slice 2024-09-09 16:26:41 -06:00
Keagan McClelland
5deb4c253a
htlcswitch+lnwallet: fix OnionBlob to 1366 bytes 2024-09-09 16:26:41 -06:00
Keagan McClelland
df3c6b72ab
lnwallet: track ChannelID on PaymentDescriptor
In this commit we track the ChannelID on the PaymentDescriptor.
This will be useful in upcoming commits that need to be able to
reconstruct lnwire.Message values from PaymentDescriptors as the
Messages that are exchanged to update channel state all include
the ChannelID.
2024-09-09 16:26:41 -06:00