From: Matt Corallo Date: Thu, 4 May 2023 23:26:34 +0000 (+0000) Subject: Move `channel_reestablish` messages to the `simple` message fuzzer X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2023-04-fix-reestablish-msg-fuzz;p=rust-lightning Move `channel_reestablish` messages to the `simple` message fuzzer In 16d0f2ff4a4dd968f30e1fbbf938a332267ddcf2 the `ChannelReestablish` messages was converted to the `impl_writeable_msg` serialization macro which handles a TLV stream suffix. In the case of our fuzzers, this implies we need to use the `test_msg_simple` checker rather than the `test_msg` one. `test_msg` checks that any bytes which were read must be present when we write the message back out, which is useful for gossip processing, however if we don't store ignored TLVs we cannot possibly meet the requirements. Instead, `test_msg_simple` only ensures that, if we serialized the message we can round-trip it exactly, i.e. at least the fields we understand round-trip. --- diff --git a/fuzz/src/msg_targets/gen_target.sh b/fuzz/src/msg_targets/gen_target.sh index 753a98325..17b8d9f9c 100755 --- a/fuzz/src/msg_targets/gen_target.sh +++ b/fuzz/src/msg_targets/gen_target.sh @@ -17,6 +17,7 @@ GEN_TEST lightning::ln::msgs::ClosingSigned test_msg_simple "" GEN_TEST lightning::ln::msgs::CommitmentSigned test_msg_simple "" GEN_TEST lightning::ln::msgs::FundingCreated test_msg_simple "" GEN_TEST lightning::ln::msgs::ChannelReady test_msg_simple "" +GEN_TEST lightning::ln::msgs::ChannelReestablish test_msg_simple "" GEN_TEST lightning::ln::msgs::FundingSigned test_msg_simple "" GEN_TEST lightning::ln::msgs::GossipTimestampFilter test_msg_simple "" GEN_TEST lightning::ln::msgs::Init test_msg_simple "" @@ -34,7 +35,6 @@ GEN_TEST lightning::ln::msgs::UpdateFailMalformedHTLC test_msg_simple "" GEN_TEST lightning::ln::msgs::UpdateFee test_msg_simple "" GEN_TEST lightning::ln::msgs::UpdateFulfillHTLC test_msg_simple "" -GEN_TEST lightning::ln::msgs::ChannelReestablish test_msg "" GEN_TEST lightning::ln::msgs::DecodedOnionErrorPacket test_msg "" GEN_TEST lightning::ln::msgs::ChannelAnnouncement test_msg_exact ""