-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various refactoring for trampoline blinded paths (#2952)
* Fix offer description documentation And remove the `currency` fields as we have no short-term plans to support currency conversion in `eclair`. * Relax `payment_constraints` requirement in final blinded payload We don't always need to include a `payment_constraints` field for ourselves: it's fine to accept payment that don't contain one as long as we created the `encrypted_recipient_data`, which we can verify using the `path_id`. We were too restrictive for no good reason. * Allow omitting `total_amount` in blinded payments If the `total_amount` field isn't provided, we can safely default to using the `amount`, which saves space in the onion. Note that we keep always encoding it in the outgoing payments we send, we're simply more permissive when receiving payments. * Refactor `decryptEncryptedRecipientData` We extract a helper method for decrypting encrypted recipient data which will be used when decrypting trampoline blinded paths. * Use relay methods in `PaymentOnion.IntermediatePayload.NodeRelay` In order to support blinded trampoline payments, we won't have access to a direct `amount_to_forward` field, but will use a `payment_relay` TLV instead, which only allows calculating the outgoing amount from the incoming amount (same thing for the expiry). We refactor this to simplify the diff when introducing blinded trampoline payments.
- Loading branch information
Showing
10 changed files
with
94 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.