Skip to content

Commit 803a532

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 f0f35ec commit 803a532

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
@@ -1493,7 +1493,6 @@ The creator of `encrypted_recipient_data` (usually, the recipient of the onion):
14931493
- MUST create the `encrypted_recipient_data` from the `encrypted_data_tlv` as required in [Route Blinding](#route-blinding).
14941494
- MUST NOT include `short_channel_id`, `payment_relay` or `payment_constraints` in any `encrypted_data_tlv`
14951495
- MUST include `encrypted_data_tlv.next_node_id` for each non-final node.
1496-
- MUST NOT include any other fields in `encrypted_data_tlv` for any non-final node.
14971496
- MUST create the `encrypted_recipient_data` from the `encrypted_data_tlv` as required in [Route Blinding](#route-blinding).
14981497

14991498
The writer:
@@ -1504,7 +1503,7 @@ The writer:
15041503
- SHOULD set `onion_message_packet` `len` to 1366 or 32834.
15051504
- SHOULD retry via a different path if it expects a response and doesn't receive one after a reasonable period.
15061505
- For the non-final nodes' `onionmsg_tlv`:
1507-
- MUST NOT set `reply_path`
1506+
- MUST NOT set fields other than `encrypted_recipient_data`.
15081507
- For the final node's `onionmsg_tlv`:
15091508
- if the final node is permitted to reply:
15101509
- MUST set `reply_path` `blinding` to the initial blinding factor for the `first_node_id`
@@ -1543,7 +1542,7 @@ The reader:
15431542
- otherwise (unknown or unset `path_id`):
15441543
- if the onion message is a reply to an onion message which contained a `path_id`:
15451544
- MUST respond (or not respond) exactly as if it did not send the initial onion message.
1546-
- if the `onionmsg_tlv` contains other tlv fields than `encrypted_recipient_data` and `reply_path`:
1545+
- if the `onionmsg_tlv` contains more than one payload field:
15471546
- MUST ignore the message.
15481547
- if it wants to send a reply:
15491548
- MUST create an onion message using `reply_path`.

0 commit comments

Comments
 (0)