Commit Graph

23 Commits

Author SHA1 Message Date
Elle Mouton
b8ff9fbef3 lnwire: define NodeAnnouncement2
In this commit, the lnwire.NodeAnnouncement2 type is defined. This will
be used to represent the `node_announcement_2` message used in the
Gossip 2 (1.75) protocol.
2025-10-02 12:15:16 +02:00
Elle Mouton
e24dd2f9e0 lnwire: let DNSAddress implement RecordProducer
In preparation for using this type as a TLV record, we let it implement
the RecordProducer interface.
2025-10-01 13:49:15 +02:00
Elle Mouton
e9a4f22dd6 lnwire: add inbound fee to ChannelUpdate2
We leave a TODO that should be addressed after a discussion at the spec
meeting. For now, having the incorrect TLV type is not a problem since
this ChannelUpdate2 type is not used in production.
2025-10-01 13:13:32 +02:00
Elle Mouton
b8abe130a5 multi: rename lnwire.NodeAnnouncement
In preparation for adding a NodeAnnouncement2 struct along with a
NodeAnnouncement interface, this commit renames the existing
NodeAnnouncment struct to NodeAnnouncement1.
2025-10-01 13:13:32 +02:00
Elle Mouton
8372524edf lnwire: add Outpoint to ChannelAnnouncement2
The latest version of the spec has the outpoint included in the
`channel_announcement2` message.
2025-10-01 13:13:32 +02:00
George Tsagkarelis
68bd35f7ad lnwire: update tests for init message 2025-09-23 19:05:46 +02:00
Elle Mouton
b77b698b9d lnwire: update AnnounceSigs2 to use pure TLV 2025-09-01 12:10:30 +02:00
Elle Mouton
b6b764da71 lnwire+netann: update ChannelUpdate2
such that all fields are now TLV including the signature.
2025-09-01 12:10:30 +02:00
Elle Mouton
1f71f14587 lnwire+netann: update ChannelAnnouncement2 structure
Such that all fields are now TLV (including the signature).
2025-09-01 12:06:18 +02:00
yyforyongyu
91797ad1d2 lnwire: patch test and fix extra data in DynCommit 2025-07-11 04:11:31 +03:00
yyforyongyu
e6ab37305c lnwire: add missing record LocalNonce
This record was never added to the `DynCommit`, but it's inherited from
the embedding msg `DynAck`.
2025-07-11 04:11:30 +03:00
yyforyongyu
f39c3679f2 lnwire: make LocalNonce an optional tlv record and fix extra data
It should be an optional record instead of an fn option. In addition,
its tlv type is bumped to be 14 as this record is also included in the
`DynCommit`. If we use tlv type 0, it will create a conflict in the msg
`DynCommit`, which is fixed in the following commit.
2025-07-11 04:11:30 +03:00
yyforyongyu
b7d2f68ed0 lnwire: patch uint test for DynAck 2025-07-11 04:11:30 +03:00
yyforyongyu
5961f7a1bd lnwire: add method ParseAndExtractExtraData
Similar to `ParseAndExtractCustomRecords`, we now add this helper method
to make sure the extra data is parsed correctly.
2025-07-11 04:11:30 +03:00
yyforyongyu
5e9365552c lnwire: fix encoding ExtraData in DynPropose
Previously we encode all the fields plus extra data to the field
`ExtraData`, this is now fixed by encoding only unknown data to extra
data. For known records, they are already encoded into the message
fields.
2025-07-11 04:11:29 +03:00
yyforyongyu
0f1cb54eb2 lnwire: use BigSize for encoding btc amount 2025-07-11 04:09:11 +03:00
yyforyongyu
828486e35a lnwire: fix unit test for DynCommit 2025-06-25 14:53:20 +08:00
Keagan McClelland
a72cadf2ed lnwire: convert DynPropose and DynCommit to use typed tlv records 2025-06-25 02:22:22 +08:00
Keagan McClelland
f40530e4f4 lnwire: remove FundingKey from DynPropose and DynCommit 2025-06-25 02:08:56 +08:00
Keagan McClelland
cbca5b1152 lnwire: remove kickoff feerate from propose/commit 2025-06-25 02:08:22 +08:00
Keagan McClelland
c6861770de lnwire: remove no longer used initiator field 2025-06-25 01:10:46 +08:00
Elle Mouton
420001a98c lnwire: add InboundFee TLV record to ChannelUpdate 2025-06-09 08:32:52 +02:00
Olaoluwa Osuntokun
eb877db2ff lnwire: add new TestMessage interface for property tests
In this commit, we add a new `TestMessage` interface for use in property
tests. With this, we'll be able to generate a random instance of a given
message, using the rapid byte stream. This can also eventually be useful
for fuzzing.
2025-03-20 18:28:07 -07:00