Commit graph

19 commits

Author SHA1 Message Date
optout
649129ddab Add Splicing (and Quiescence) wire message definitions 2023-11-07 12:13:58 +01:00
jbesraa
4f45cdcad6 Implement from_str trait for NetAddress
- Add fuzz test for `NetAddress` `from_str` function
2023-09-06 19:25:30 +03:00
jbesraa
d736ca8595 Add RFC4648 base32 encode and decode functions 2023-09-06 15:07:25 +03:00
Valentine Wallace
02a6d895a5
Receive payment onions as new InboundPayload instead of OnionHopData
To support route blinding, we want to split OnionHopData into two separate
structs, one for inbound onions and one for outbound onions. This is because
blinded payloads change the fields present in the onion hop data struct based
on whether we're sending vs receiving (outbound onions include encrypted blobs,
inbound onions can decrypt those blobs and contain the decrypted fields
themselves).

In upcoming commits, we'll add variants for blinded payloads to the new
InboundPayload enum.
2023-08-02 12:54:34 -07:00
Duncan Dean
2ace882d39
Add & generate dual-funding message fuzzing 2023-05-05 11:40:53 +02:00
Jeffrey Czyz
3d41df025d
Fuzz test for bech32 decoding
Fuzz testing bech32 decoding along with deserializing the underlying
message can result in overly exhaustive searches. Instead, the message
deserializations are now fuzzed separately. Add fuzzing for bech32
decoding.
2023-02-23 18:25:49 -06:00
Jeffrey Czyz
16168d4c07
Fuzz test for parsing Invoice
An invoice is serialized as a TLV stream and encoded as bytes. Add a
fuzz test that parses the TLV stream and deserializes the underlying
Invoice. Then compare the original bytes with those obtained by
re-serializing the Invoice.
2023-02-23 18:25:49 -06:00
Jeffrey Czyz
e049e97993
Fuzz test for parsing InvoiceRequest
An invoice request is serialized as a TLV stream and encoded as bytes.
Add a fuzz test that parses the TLV stream and deserializes the
underlying InvoiceRequest. Then compare the original bytes with those
obtained by re-serializing the InvoiceRequest.
2023-02-23 18:24:41 -06:00
Jeffrey Czyz
0001260f74
Fuzz test for parsing Refund
A refund is serialized as a TLV stream and encoded in bech32 without a
checksum. Add a fuzz test that parses the unencoded TLV stream and
deserializes the underlying Refund. Then compare the original bytes with
those obtained by re-serializing the Refund.
2023-02-08 19:02:17 -06:00
Jeffrey Czyz
53d2d47360
Fuzz test for parsing Offer
An offer is serialized as a TLV stream and encoded in bech32 without a
checksum. Add a fuzz test that parses the unencoded TLV stream and
deserializes the underlying Offer. Then compare the original bytes with
those obtained by re-serializing the Offer.
2023-02-08 18:47:48 -06:00
Matt Corallo
e64b5d9d2e Add a fuzzer to check that IndexedMap is equivalent to BTreeMap 2023-01-25 18:58:51 +00:00
Valentine Wallace
8424f3f054
Fuzz test onion messages
Also update the fuzz ChaCha20Poly1305 to not mark as finished after a single
encrypt_in_place.  This is because more bytes may still need to be encrypted,
causing us to panic at the assertion that finished == false when we go to
encrypt more.

Also fix unused_mut warning in messenger + add log on OM forward for testing
2022-08-16 12:12:10 -04:00
Matt Corallo
d246e61379 [fuzz] Update auto-generated target list 2022-07-01 20:55:26 +00:00
Elias Rohrer
e98f68aee6 Rename FundingLocked to ChannelReady. 2022-05-30 17:07:09 -07:00
Arik Sosman
a58ae4c97b
Introduce graph sync crate for fast-forwarding through gossip data downloaded from a server. 2022-05-25 01:21:33 -07:00
Matt Corallo
7c9302f6a7
Fix a number of bugs in zbase32 and add a fuzzer which caught them. 2021-04-16 07:35:03 +02:00
bmancini55
10e818ac53 Adding fuzzers for gossip_queries messages
This commit adds ser/deser fuzzers for five new structs in ln::msgs used
for gossip_queries.
2020-09-14 16:19:32 -04:00
Gleb Naumenko
8b4f6e8861 Add htlc_maximum_msat field 2020-07-27 14:06:16 +03:00
Matt Corallo
e28fd78e67 Refactor fuzzing to be a C-callable library plus rust binaries
This should help us avoid rust's at-load syscalls by calling the
tests from a C program.
2019-12-11 15:13:14 -05:00