XXX: Track SCID aliases from our counterparty and use them in invoices
authorMatt Corallo <git@bluematt.me>
Wed, 1 Sep 2021 16:48:35 +0000 (16:48 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 21 Dec 2021 00:16:55 +0000 (00:16 +0000)
commit8019842e89c7503df49464d9826016578b1e2b21
treed9bd7f4dcf391f0bf3cc5bbabcf9cb48ef611ccf
parent7e2495e5cbff855e2b5bc5d15f28f53aa544d5fa
XXX: Track SCID aliases from our counterparty and use them in invoices

New `funding_locked` messages can include SCID aliases which our
counterparty will recognize as "ours" for the purposes of relaying
transactions to us. This avoids telling the world about our
on-chain transactions every time we want to receive a payment, and
will allow for receiving payments before the funding transaction
appears on-chain.

Here we store the new SCID aliases and use them in invoices instead
of he "standard" SCIDs.

XXX: Note in spec pr that we need to drop the "MUST NOT retransmit funding_locked"
message in reconnection if we are passed initial reconnect. This may
imply a feature bit, but will at least imply some kind of "MUST NOT
retransmit if it doesn't have evidence the counterparty interpreted the
SCID alias previously sent" (to avoid backwards incompat).
lightning-invoice/src/utils.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/routing/router.rs