-
Notifications
You must be signed in to change notification settings - Fork 414
fuzz: add fuzz target for BlindedMessagePath
#3879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fuzz: add fuzz target for BlindedMessagePath
#3879
Conversation
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
fuzz/src/blinded_path_deser.rs
Outdated
#[no_mangle] | ||
pub extern "C" fn blinded_path_deser_run(data: *const u8, datalen: usize) { | ||
do_test(unsafe { std::slice::from_raw_parts(data, datalen) }, test_logger::DevNull {}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a newline character at the end of the file. The file currently ends without a newline, which is indicated by the \
at the end of line 30.
} | |
} | |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
🔔 1st Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 2nd Reminder Hey @jkczyz! This PR has been waiting for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though note we would cover this as part of BOLT12 message fuzzing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Rather than doing this by manually writing out a fuzzer, this one might be easier by just adding an entry in fuzz/src/msg_targets/gen_target.sh
.
90b64c0
to
f4098cd
Compare
Adds fuzz target for BlindedMessagePath that implements `Readable` to check for correct deserialisation
f4098cd
to
ec692f9
Compare
Used the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3879 +/- ##
==========================================
- Coverage 88.90% 88.89% -0.01%
==========================================
Files 165 165
Lines 119158 119158
Branches 119158 119158
==========================================
- Hits 105941 105930 -11
- Misses 10897 10907 +10
- Partials 2320 2321 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Many upper level structs implementing
Readable
don't have fuzz coverage because of no fuzz targets created for them . This PR is one of the efforts to add Fuzz target forBlindedMessagePath
one of the struct that implementsReadable
trait.