Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify trampoline to legacy diagram #1607

Merged
merged 2 commits into from
Nov 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions eclair-core/src/main/scala/fr/acinq/eclair/wire/Onion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,27 @@ Notes:

TRAMPOLINE PAYMENT TO LEGACY RECIPIENT (the last trampoline node converts to a standard payment to the final recipient):

a -------------> b ---------------------------> t1 -----------------------------> t2 ------------------------------ -> e ---------------------------> f
+----------------------+ +---------------------------+ +---------------------------------+ +-----------------------+ +-------------------------+
| amount_fwd: 950 msat | | amount_fwd: 950 msat | | amount_fwd: 750 msat | | amount_fwd: 1000 msat | | amount_fwd: 1000 msat |
| expiry: 600112 | | expiry: 600112 | | expiry: 600042 | | expiry: 600000 | | expiry: 600000 |
| channel_id: 42 | | secret: yyyyy | | secret: zzzzz | | channel_id: 42 | | secret: xyz | <- invoice secret (omitted if not supported by invoice)
|----------------------| | total_amount: 1750 msat | | total_amount: 1600 msat | |-----------------------| | total_amount: 2500 msat | <- t2 is using multi-part to pay 1500 msat to f, for a total payment
| (encrypted) | | trampoline_onion: | | trampoline_onion: | | (encrypted) | +-------------------------+ of 2500 msat split between multiple trampoline routes (omitted if
+----------------------+ | +-----------------------+ | | +-----------------------------+ | +-----------------------+ | EOF | MPP not supported by invoice)
| | amount_fwd: 1600 msat | | | | amount_fwd: 1500 msat | | +-------------------------+
| | expiry: 600042 | | | | expiry: 600000 | |
| | node_id: t2 | | | | total_amount: 2500 msat | |
| +-----------------------+ | | | secret: xyz | |
| | (encrypted) | | | | node_id: f | |
| +-----------------------+ | | | invoice_features: 0x0a | |
+---------------------------+ | | invoice_routing_info: ..... | |
| EOF | | +-----------------------------+ |
+---------------------------+ | | (encrypted) | |
| +-----------------------------+ |
+---------------------------------+
| EOF |
+---------------------------------+
a -------------> b ----------------------------> t1 -----------------------------> t2 ---------------------------------- -> e ---------------------------> f
+-----------------------+ +---------------------------+ +---------------------------------+ +-----------------------+ +-------------------------+
| amount_fwd: 1750 msat | | amount_fwd: 1750 msat | | amount_fwd: 1600 msat | | amount_fwd: 1000 msat | | amount_fwd: 1000 msat |
| expiry: 600112 | | expiry: 600112 | | expiry: 600042 | | expiry: 600000 | | expiry: 600000 |
| channel_id: 42 | | secret: yyyyy | | secret: zzzzz | +---->| channel_id: 42 |---->| secret: xyz | <- invoice secret (omitted if not supported by invoice)
+-----------------------+ | total_amount: 1750 msat | | total_amount: 1600 msat | | +-----------------------+ | total_amount: 2500 msat | <- t2 is using multi-part to pay 1500 msat to f, for a total payment
pm47 marked this conversation as resolved.
Show resolved Hide resolved
| (encrypted) | | trampoline_onion: | | trampoline_onion: | | | (encrypted) | +-------------------------+ of 2500 msat split between multiple trampoline routes (omitted if
+-----------------------+ | +-----------------------+ | | +-----------------------------+ | | +-----------------------+ | EOF | MPP not supported by invoice)
| | amount_fwd: 1600 msat | | | | amount_fwd: 1500 msat | | | +-------------------------+
| | expiry: 600042 | | | | expiry: 600000 | |--+
| | node_id: t2 | | | | total_amount: 2500 msat | | | +-----------------------+ +-------------------------+
pm47 marked this conversation as resolved.
Show resolved Hide resolved
| +-----------------------+ | | | secret: xyz | | | | amount_fwd: 500 msat | | amount_fwd: 500 msat |
| | (encrypted) | | | | node_id: f | | | | expiry: 600000 | | expiry: 600000 |
| +-----------------------+ | | | invoice_features: 0x0a | | +---->| channel_id: 43 |---->| secret: xyz |
+---------------------------+ | | invoice_routing_info: ..... | | +-----------------------+ | total_amount: 2500 msat |
pm47 marked this conversation as resolved.
Show resolved Hide resolved
| EOF | | +-----------------------------+ | | (encrypted) | +-------------------------+
+---------------------------+ | | (encrypted) | | +-----------------------+ | EOF |
| +-----------------------------+ | +-------------------------+
+---------------------------------+
| EOF |
+---------------------------------+

Notes:
- the last trampoline node learns the payment details (who the recipient is, the payment amount and secret)
Expand Down