lightning-dev

[BOLT Draft] Onion Routing Spec

[BOLT Draft] Onion Routing Spec

Original Postby Rusty Russell

Posted on: August 5, 2016 00:52 UTC

A proposal was made to combine the "header" and "per-hop payload" into a single 40-byte field since they are not meaningfully distinct for lightning.

However, it was suggested that ephemeral key and mac make sense as a header, but a different next hop address format could be used for different networks. An explicit network byte makes sense since multiple networks can be eventually supported. A flag for the terminal node is needed anyway. The author proposed some terminology changes such as using HTLC-hash and HTLC-preimage instead of r-hash.An alternative approach to replay avoidance using privkeys with point addition scheme was suggested which no longer makes having two HTLCs with the same pubkey an issue. However, it is not clear how one can switch to priv/pub key-based HTLC's without modifying Bitcoin Script.