Skip to content

Commit 217a99e

Browse files
committed
fixup! BOLT 4: onion message support.
@thomash-acinq points out: 1. We absolutely can put other fields in `encrypted_data_tlv`, esp. padding, and test vectors do this. 2. Presumably it was supposed to refer to onionmsg_tlv, so fix that. 3. And of course we need to allow payload fields!
1 parent 27d6dc2 commit 217a99e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

04-onion-routing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,6 @@ The creator of `encrypted_recipient_data` (usually, the recipient of the onion):
14881488
- MUST create the `encrypted_recipient_data` from the `encrypted_data_tlv` as required in [Route Blinding](#route-blinding).
14891489
- MUST NOT include `short_channel_id`, `payment_relay` or `payment_constraints` in any `encrypted_data_tlv`
14901490
- MUST include `encrypted_data_tlv.next_node_id` for each non-final node.
1491-
- MUST NOT include any other fields in `encrypted_data_tlv` for any non-final node.
14921491
- MUST create the `encrypted_recipient_data` from the `encrypted_data_tlv` as required in [Route Blinding](#route-blinding).
14931492

14941493
The writer:
@@ -1499,7 +1498,7 @@ The writer:
14991498
- SHOULD set `onion_message_packet` `len` to 1366 or 32834.
15001499
- SHOULD retry via a different path if it expects a response and doesn't receive one after a reasonable period.
15011500
- For the non-final nodes' `onionmsg_tlv`:
1502-
- MUST NOT set `reply_path`
1501+
- MUST NOT set fields other than `encrypted_recipient_data`.
15031502
- For the final node's `onionmsg_tlv`:
15041503
- if the final node is permitted to reply:
15051504
- MUST set `reply_path` `blinding` to the initial blinding factor for the `first_node_id`
@@ -1538,7 +1537,7 @@ The reader:
15381537
- otherwise (unknown or unset `path_id`):
15391538
- if the onion message is a reply to an onion message which contained a `path_id`:
15401539
- MUST respond (or not respond) exactly as if it did not send the initial onion message.
1541-
- if the `onionmsg_tlv` contains other tlv fields than `encrypted_recipient_data` and `reply_path`:
1540+
- if the `onionmsg_tlv` contains more than one payload field:
15421541
- MUST ignore the message.
15431542
- if it wants to send a reply:
15441543
- MUST create an onion message using `reply_path`.

0 commit comments

Comments
 (0)