rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Compact `BlindedPath` representation for onion messaging

Open jkczyz opened this issue 11 months ago • 9 comments

BOLT 12 defines a compact representation for BlindedPaths, which uses short_channel_id in place of next_node_id for use in an OnionMessage packet's hop data: https://github.com/lightning/bolts/pull/798/commits/ba2b95a98a415a24c27685a34648c1f64468a4bf

Additionally, the blinded path's introduction node can use a short channel id with a direction byte: https://github.com/lightning/bolts/pull/798/commits/3db064e4cb943885ff5557181ae655d03ac8ce79

TODO:

  • [ ] Create a BlindedPath that uses a directed scid introduction node #3011
  • [x] Parse a BlindedPath that uses a directed scid introduction node
  • [x] Pay a BlindedPath that uses a directed scid introduction node
  • [x] Resolve a directed scid from a BlindedPath introduction node
  • [ ] Create BlindedHop::encrypted_payload that use an scid as the next hop #3011
  • [x] Parse ForwardTlvs that use an scid as the next hop
  • [x] Resolve an scid from a PeeledOnion::Forward

Related issues:

  • [x] Create an OnionMessage using a BlindedPath that has the sender as introduction node correctly #2951
  • [ ] Pay using a BlindedPath that has the payer as the introduction node

jkczyz avatar Mar 04 '24 21:03 jkczyz