Commit Graph

6 Commits

Author SHA1 Message Date
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
Olaoluwa Osuntokun
56a100123b lnwire: add new SerializedSize method to all wire messages
This'll be useful for the bandwidth based rate limiting we'll implement
in the next commit.
2025-03-20 18:27:52 -07:00
Olaoluwa Osuntokun
14eca4406e lnwire: update closing_complete and closing_sig to latest spec draft
Both these messages now carry the address of both parties, so you can
update an address without needing to send shutdown again.
2025-03-18 11:44:20 -05:00
Olaoluwa Osuntokun
540d3c0fc7 multi: switch to lock time from sequence for coop close v2 2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
7feb8b21e1 multi: upgrade new taproot TLVs to use tlv.OptionalRecordT
In this commit, we update new Taproot related TLVs (nonces, partial sig,
sig with nonce, etc). Along the way we were able to get rid of some
boiler plate, but most importantly, we're able to better protect against
API misuse (using a nonce that isn't initialized, etc) with the new
options API. In some areas this introduces a bit of extra boiler plate,
and where applicable I used some new helper functions to help cut down
on the noise.

Note to reviewers: this is done as a single commit, as changing the API
breaks all callers, so if we want things to compile it needs to be in a
wumbo commit.
2024-02-29 11:32:26 -06:00
Olaoluwa Osuntokun
3d88017b38 lnwire: add new closing_complete and closing_sig messages
These two messages will be used to implement the new and improved co-op
closing protocol. This PR also show cases how to use the new
`tlv.OptionalRecord` type to define and handle TLV level parsing.

I think we can make one additional helper function to clean up some of
the boiler plate for the encode/decode.
2024-02-05 16:30:23 -08:00