Allow recipient to pay for blinded route fees#2993
Merged
thomash-acinq merged 6 commits intomasterfrom Feb 25, 2025
Merged
Conversation
3025a99 to
69dbea4
Compare
When using blinded payment paths, the fees of the blinded path should be paid by the recipient, not the sender. - It is more fair: the sender chooses the non blinded part of the path and pays the corresponding fees, the recipient chooses the blinded part of the path and pays the corresponding fees. - It is more private: the sender does not learn the actual fees for the path and can't use this information to unblind the path.
69dbea4 to
c8a54d0
Compare
t-bast
requested changes
Feb 13, 2025
eclair-core/src/main/scala/fr/acinq/eclair/router/BlindedRouteCreation.scala
Show resolved
Hide resolved
9f401d4 to
bf75abf
Compare
bf75abf to
8b4920b
Compare
We clarify that the previously named "hiddenFee" is actually the blinded path fee that is being paid by the recipient (by deducing it from the amount it plans on receiving). We thus rename variables and add docs. We also revert the validation flow: instead of generating a payment part for that fee based on the difference between the paid amount and the onion value, we generate that payment part based on the blinded path fee we recorded in the `path_id` and validate that it matches what the payer is sending. We revert some of the changes to the `MultiPartHandler` which aren't necessary and do some clean-up of some unused code paths.
t-bast
requested changes
Feb 17, 2025
eclair-core/src/main/scala/fr/acinq/eclair/payment/offer/OfferPaymentMetadata.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/offer/OfferManager.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/offer/OfferManager.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/offer/OfferManager.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/receive/MultiPartHandler.scala
Outdated
Show resolved
Hide resolved
efd1c63 to
510faab
Compare
510faab to
59e934b
Compare
Contributor
Author
|
I've merged your improvements but changed a bit the way the recipient path fees are computed:
|
t-bast
reviewed
Feb 25, 2025
Member
t-bast
left a comment
There was a problem hiding this comment.
LGTM, a few test nits and this should be good to go 👍
eclair-core/src/test/scala/fr/acinq/eclair/payment/offer/OfferManagerSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/integration/basic/payment/OfferPaymentSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/integration/basic/payment/OfferPaymentSpec.scala
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/integration/basic/payment/OfferPaymentSpec.scala
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using blinded payment paths, the fees of the blinded path should be paid by the recipient, not the sender.