Skip to content

Conversation

@Prabhat1308
Copy link
Contributor

@Prabhat1308 Prabhat1308 commented Jun 22, 2025

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 for BlindedMessagePath one of the struct that implements Readable trait.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jun 22, 2025

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

#[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 {});
} No newline at end of file
Copy link
Contributor

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.

Suggested change
}
}

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@ldk-reviews-bot ldk-reviews-bot requested a review from jkczyz June 22, 2025 18:59
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 2nd Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

jkczyz
jkczyz previously approved these changes Jun 27, 2025
Copy link
Contributor

@jkczyz jkczyz left a 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.

@jkczyz jkczyz requested a review from TheBlueMatt June 27, 2025 20:28
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a 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.

Adds fuzz target for BlindedMessagePath that implements `Readable` to check for correct deserialisation
@Prabhat1308 Prabhat1308 force-pushed the probot/BlindedMessagePath_fuzz branch from f4098cd to ec692f9 Compare June 28, 2025 13:16
@Prabhat1308
Copy link
Contributor Author

Used the fuzz/src/msg_targets/gen_target.sh in the reformed commit and rebased to the current main branch. Linting failure unrelated to the PR changes

@codecov
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (808d1dc) to head (ec692f9).
Report is 12 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

GEN_TEST lightning::ln::msgs::SpliceAck test_msg_simple ""
GEN_TEST lightning::ln::msgs::SpliceLocked test_msg_simple ""

GEN_TEST lightning::blinded_path::message::BlindedMessagePath test_msg_simple ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a proper editor that includes trailing EOL at the end of files :). No idea what text editor is even so broken that it doesn't :)

@TheBlueMatt TheBlueMatt merged commit c4eb457 into lightningdevkit:main Jun 29, 2025
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants