lightning-dev

[BOLT Draft] Onion Routing Spec

[BOLT Draft] Onion Routing Spec

Original Postby Rusty Russell

Posted on: August 13, 2016 10:04 UTC

The Lightning Network developers are discussing the format of the next-hop address within a payment onion.

Rusty Russell suggests a format that includes an ephemeral key, mac, realm and per-realm-information. Olaoluwa Osuntokun thinks that the next-hop field should be an opaque blob with no explicit meaning at the specification level. Nodes on different chains can parse the address accordingly. The explicit network byte should be within the main p2p message header rather than the header for the onion blob itself. When crossing chains, nodes will properly set the net magic in the outer message header. However, some node will have to straddle two chains, so the onion needs to be explicit that this transfer to another chain is what the sender intended. Rusty suggests using HTLC-hash and HTLC-preimage (H-hash & H-preimage) for proposal 1 and committx-hash and committx-preimage (C-hash / C-preimage) for the commitment transaction revocation for proposal 2. This avoids R altogether, which is overloaded.