Skip to content

Conversation

erickcestari
Copy link
Contributor

When an offer has an issuer_id, empty paths should be allowed since the issuer_id can be used for signing. Only when issuer_id is None should we require non-empty paths to extract the blinded node ID for signing.

Find through differential fuzzing where c-lightning is accepting an offer with empty offer_paths and with issuer_id while rust-lightning is rejecting it, even though it's a valid offer.

offer: lno1zqqpyqtezcss8qpgggggggggggggggwjqgll03wgqgll03wgggg8ylllpgpqppqqq

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Aug 18, 2025

👋 Thanks for assigning @jkczyz 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.

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (633cb49) to head (5314ebb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4018      +/-   ##
==========================================
+ Coverage   88.84%   88.86%   +0.02%     
==========================================
  Files         175      175              
  Lines      127723   127725       +2     
  Branches   127723   127725       +2     
==========================================
+ Hits       113472   113501      +29     
+ Misses      11686    11662      -24     
+ Partials     2565     2562       -3     
Flag Coverage Δ
fuzzing 21.76% <0.00%> (-0.01%) ⬇️
tests 88.69% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@tnull tnull requested review from jkczyz and removed request for joostjager August 18, 2025 12:11
…r_id is missing

When an offer has an issuer_id, empty paths should be allowed since the
issuer_id can be used for signing. Only when issuer_id is None should
we require non-empty paths to extract the blinded node ID for signing.
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.

Oops, thanks.

@TheBlueMatt TheBlueMatt merged commit 66a4932 into lightningdevkit:main Aug 18, 2025
25 checks passed
Comment on lines 2005 to 2007
let mut builder = OfferBuilder::new(pubkey(42));
builder.offer.issuer_signing_pubkey = None;
builder.offer.paths = Some(vec![]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a case that shows we can accept empty paths as long as the issuer id is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will open a follow-up PR!

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