Skip to content

Commit fef2eba

Browse files
authored
Merge pull request #313 from ariard/2019-02-clarify-test-full-stack-target
Clarify a bit full_stack_target test_no_existing_test_breakage
2 parents 235cf03 + 6031017 commit fef2eba

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

fuzz/fuzz_targets/full_stack_target.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,12 @@ mod tests {
615615
// What each byte represents is broken down below, and then everything is concatenated into
616616
// one large test at the end (you want %s/ -.*//g %s/\n\| \|\t\|\///g).
617617

618+
// Following BOLT 8, lightning message on the wire are: 2-byte encrypted message length +
619+
// 16-byte MAC of the encrypted message length + encrypted Lightning message + 16-byte MAC
620+
// of the Lightning message
621+
// I.e 2nd inbound read, len 18 : 0006 (encrypted message length) + 03000000000000000000000000000000 (MAC of the encrypted message length)
622+
// Len 22 : 0010 00000000 (encrypted lightning message) + 03000000000000000000000000000000 (MAC of the Lightning message)
623+
618624
// 0000000000000000000000000000000000000000000000000000000000000000 - our network key
619625
// 00000000 - fee_proportional_millionths
620626
// 01 - announce_channels_publicly
@@ -627,7 +633,7 @@ mod tests {
627633
// 030012 - inbound read from peer id 0 of len 18
628634
// 0006 03000000000000000000000000000000 - message header indicating message length 6
629635
// 030016 - inbound read from peer id 0 of len 22
630-
// 0010 00000000 03000000000000000000000000000000 - init message with no features (type 16)
636+
// 0010 00000000 03000000000000000000000000000000 - init message with no features (type 16) and mac
631637
//
632638
// 030012 - inbound read from peer id 0 of len 18
633639
// 0141 03000000000000000000000000000000 - message header indicating message length 321
@@ -636,7 +642,7 @@ mod tests {
636642
// 030053 - inbound read from peer id 0 of len 83
637643
// 030000000000000000000000000000000000000000000000000000000000000005 030000000000000000000000000000000000000000000000000000000000000000 01 03000000000000000000000000000000 - rest of open_channel and mac
638644
//
639-
// 00fd00fd00fd - Three feerate requests (all returning min feerate, which our open_channel also uses)
645+
// 00fd00fd00fd - Three feerate requests (all returning min feerate, which our open_channel also uses) (gonna be ingested by FuzzEstimator)
640646
// - client should now respond with accept_channel (CHECK 1: type 33 to peer 03000000)
641647
//
642648
// 030012 - inbound read from peer id 0 of len 18
@@ -678,7 +684,7 @@ mod tests {
678684
// 0010 00000000 01000000000000000000000000000000 - init message with no features (type 16)
679685
//
680686
// 05 01 030200000000000000000000000000000000000000000000000000000000000000 00c350 0003e8 - create outbound channel to peer 1 for 50k sat
681-
// 00fd00fd00fd - Three feerate requests (all returning min feerate)
687+
// 00fd00fd00fd - Three feerate requests (all returning min feerate) (gonna be ingested by FuzzEstimator)
682688
//
683689
// 030112 - inbound read from peer id 1 of len 18
684690
// 0110 01000000000000000000000000000000 - message header indicating message length 272
@@ -717,7 +723,7 @@ mod tests {
717723
// 0300c1 - inbound read from peer id 0 of len 193
718724
// ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ef00000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000 - end of update_add_htlc from 0 to 1 via client and mac
719725
//
720-
// 00fd - A feerate request (returning min feerate, which our open_channel also uses)
726+
// 00fd - A feerate request (returning min feerate, which our open_channel also uses) (gonna be ingested by FuzzEstimator)
721727
//
722728
// 030012 - inbound read from peer id 0 of len 18
723729
// 0064 03000000000000000000000000000000 - message header indicating message length 100
@@ -776,7 +782,7 @@ mod tests {
776782
// 0300c1 - inbound read from peer id 0 of len 193
777783
// ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ef00000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000 - end of update_add_htlc from 0 to 1 via client and mac
778784
//
779-
// 00fd - A feerate request (returning min feerate, which our open_channel also uses)
785+
// 00fd - A feerate request (returning min feerate, which our open_channel also uses) (gonna be ingested by FuzzEstimator)
780786
//
781787
// - now respond to the update_fulfill_htlc+commitment_signed messages the client sent to peer 0
782788
// 030012 - inbound read from peer id 0 of len 18
@@ -854,7 +860,7 @@ mod tests {
854860
// 0300c1 - inbound read from peer id 0 of len 193
855861
// ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ef00000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000 - end of update_add_htlc from 0 to 1 via client and mac
856862
//
857-
// 00fd - A feerate request (returning min feerate, which our open_channel also uses)
863+
// 00fd - A feerate request (returning min feerate, which our open_channel also uses) (gonna be ingested by FuzzEstimator)
858864
//
859865
// 030012 - inbound read from peer id 0 of len 18
860866
// 00a4 03000000000000000000000000000000 - message header indicating message length 164
@@ -871,10 +877,10 @@ mod tests {
871877
// - client now sends id 1 update_add_htlc and commitment_signed (CHECK 7 duplicate)
872878
//
873879
// 0c007d - connect a block with one transaction of len 125
874-
// 02000000013f00000000000000000000000000000000000000000000000000000000000000000000000000000080020001000000000000220020e2000000000000000000000000000000000000000000000000000000000000006cc10000000000001600142e0000000000000000000000000000000000000005000020 - the funding transaction
875-
// 00fd - A feerate request (returning min feerate, which our open_channel also uses)
880+
// 02000000013f00000000000000000000000000000000000000000000000000000000000000000000000000000080020001000000000000220020e2000000000000000000000000000000000000000000000000000000000000006cc10000000000001600142e0000000000000000000000000000000000000005000020 - the commitment transaction for channel 3f00000000000000000000000000000000000000000000000000000000000000
881+
// 00fd - A feerate request (returning min feerate, which our open_channel also uses) (gonna be ingested by FuzzEstimator)
876882
// 0c005e - connect a block with one transaction of len 94
877-
// 0200000001fb00000000000000000000000000000000000000000000000000000000000000000000000000000000014f00000000000000220020f60000000000000000000000000000000000000000000000000000000000000000000000 - the funding transaction
883+
// 0200000001fb00000000000000000000000000000000000000000000000000000000000000000000000000000000014f00000000000000220020f60000000000000000000000000000000000000000000000000000000000000000000000 - the commitment transaction for channel 3d00000000000000000000000000000000000000000000000000000000000000
878884
//
879885
// 07 - process the now-pending HTLC forward
880886
// - client now fails the HTLC backwards as it was unable to extract the payment preimage (CHECK 9 duplicate and CHECK 10)

0 commit comments

Comments
 (0)