rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Introduce Reply Paths for BOLT12 Invoice in Offers Flow.

Open shaavan opened this issue 1 year ago • 7 comments

This PR builds on #3087 and addresses this comment.

Changes:

  1. Updates the Offers message flow to include reply_path with the sent BOLT12Invoice.
  2. Ensures that in case of an error, the counterparty can send back any InvoiceError along the reply_path.
  3. Updates the Offers test to check for the invoice's reply_path wherever applicable.

shaavan avatar Jul 09 '24 14:07 shaavan

Codecov Report

Attention: Patch coverage is 77.04918% with 14 lines in your changes missing coverage. Please review.

Project coverage is 90.39%. Comparing base (5e62df7) to head (7b49993). Report is 62 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/channelmanager.rs 66.66% 9 Missing :warning:
lightning/src/offers/signer.rs 68.75% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3163      +/-   ##
==========================================
+ Coverage   89.82%   90.39%   +0.57%     
==========================================
  Files         126      126              
  Lines      103024   108017    +4993     
  Branches   103024   108017    +4993     
==========================================
+ Hits        92543    97644    +5101     
- Misses       7769     7815      +46     
+ Partials     2712     2558     -154     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jul 09 '24 14:07 codecov-commenter

Needs rebase now.

TheBlueMatt avatar Jul 16 '24 20:07 TheBlueMatt

Updated from pr3163.01 to pr3163.02 (diff): Addressed @jkczyz and @TheBlueMatt comments

Changes:

  1. Rebase on main.
  2. Introduce a fixup commit to introduce context in respond_with_reply_path.

shaavan avatar Jul 17 '24 13:07 shaavan

Please include details about what you're doing and why in the commit messages.

TheBlueMatt avatar Jul 17 '24 14:07 TheBlueMatt

Please include details about what you're doing and why in the commit messages.

Sorry about being lax when reviewing this. @shaavan I recommend this reference, which we mention in the project contributor guidelines: https://cbea.ms/git-commit/

jkczyz avatar Jul 17 '24 14:07 jkczyz

I'm usually pretty lax as long as its clear from the code what's going on, but in this case I look at the commit and we're just adding a blinded path, which doesn't tell me anything about why. I have some context from a separate commit in a different PR, but I don't want to rely on that :)

TheBlueMatt avatar Jul 17 '24 15:07 TheBlueMatt

Updated from pr3163.02 to pr3163.03 (diff): Addressed @TheBlueMatt and @jkczyz comments

Changes:

  1. Squashed the commits
  2. Update the Commit description to be clearly detailed.

Thanks, @TheBlueMatt for the suggestion, and @jkczyz for the resource!

shaavan avatar Jul 18 '24 10:07 shaavan

Updated from pr3163.03 to pr3163.04 (diff):

Changes:

  1. Rebase on main, to resolve merge conflicts.

shaavan avatar Aug 20 '24 12:08 shaavan

Updated from pr3163.04 to pr3163.05 (diff):

Changes:

  1. Moved the relevant change to the relevant commit to have a clean commit history.

shaavan avatar Aug 21 '24 09:08 shaavan

Updated from pr3163.05 to pr3163.06 (diff):

Changes:

  1. Rebase on main.

shaavan avatar Aug 28 '24 08:08 shaavan

Updated from pr3163.06 to pr3163.07 (diff): Addressed @jkczyz comment

  1. Update the check in a test to maintain channel setup consistency with the other tests.

shaavan avatar Aug 28 '24 08:08 shaavan

Updated from pr3163.07 to pr3163.08 (diff): Addressed @jkczyz comment

  1. Remove an extra redundant node introduced earlier in the test.

shaavan avatar Aug 29 '24 11:08 shaavan

Updated from pr3163.08 to pr3163.09 (diff): Addressed @TheBlueMatt comment

Changes:

  1. Introduce HMAC calculation and verification for OffersContext::InboundPayment.

shaavan avatar Sep 06 '24 12:09 shaavan

Updated from pr3163.09 to pr3163.10 (diff): Addressed @jkczyz comments

Changes:

  1. Update docs.
  2. Always use new nonce for the reply path sent with Bolt12Invoice.

shaavan avatar Sep 09 '24 12:09 shaavan

Updated from pr3163.10 to pr3163.11 (diff): Addressed @jkczyz comment

Changes:

  1. Introduce Verification trait that define the public function required for creating and verifying HMAC.
  2. Define the trait impl for PaymentId, and PaymentHash.

shaavan avatar Sep 10 '24 10:09 shaavan

Updated from pr3163.11 to pr3163.12 (diff): Addressed @TheBlueMatt comment

Changes:

  1. Squash fixups.

shaavan avatar Sep 11 '24 13:09 shaavan