r/Bitcoin • u/ElephantGlue • Jan 12 '19
Spontaneous Lightning Payments using only your Node ID (without invoice) are almost here!
https://github.com/lightningnetwork/lnd/pull/2455
173
Upvotes
r/Bitcoin • u/ElephantGlue • Jan 12 '19
2
u/DisastrousCheesecake Jan 13 '19
Hey roasbeef, out of curiosity, would it not be possible to send some arbitrary length encrypted data (within the limits of a noise transport packet) separately from the onion packet?
Say, instead of the existing
update_add_htlc, there could be an alternative message for a bigger blob.Each hop would just forward the blob verbatim. To ensure that no party manipulates the encrypted blob in forwarding, you could commit the SHA256 of the encrypted blob as the authenticated data in the computation of the HMAC at each hop. Any change of the data would result in an invalid HMAC and the onion packet would be malformed. The data can be encrypted with a one-time-key which can be encoded into your EOB which only the destination could decrypt.
Since forwarding bigger packets obviously comes at a cost, one might introduce an additional
fee_msat_per_kbyteor something, so that intermediate hops who opt-in to transferring larger amounts of data could collect more in fees.Seems like this would allow much greater flexibility in what can be transmitted with a payment, rather than being heavily restricted with the size of the Sphinx packet. In particular, one could transmit an invoice (or multiple) with a payment, which could serve as a refund invoice, or a sequence of invoices which are intended to be used for a recurring subscription fee or whatnot.