mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
13c15e8038
This intent of this change is to prevent privacy leaks when routing with aliases and also to allow routing when using an alias. The aliases are our aliases. Introduces are two maps: * aliasToReal: This is an N->1 mapping for a channel. The keys are the set of aliases and the value is the confirmed, on-chain SCID. * baseIndex: This is also an N->1 mapping for a channel. The keys are the set of aliases and the value is the "base" SCID (whatever is in the OpenChannel.ShortChannelID field). There is also a base->base mapping, so not all keys are aliases. The above maps are populated when a link is added to the switch and when the channel has confirmed on-chain. The maps are not removed from if the link is removed, but this is fine since forwarding won't occur. * getLinkByMapping This function is introduced to adhere to the spec requirements that using the confirmed SCID of a private, scid-alias-feature-bit channel does not work. Lnd implements a stricter version of the spec and disallows this behavior if the feature-bit was negotiated, rather than just the channel type. The old, privacy-leak behavior is preserved. The spec also requires that if we must fail back an HTLC, the ChannelUpdate must use the SCID of whatever was in the onion, to avoid a privacy leak. This is also done by passing in the relevant SCID to the mailbox and link. Lnd will also cancel back on the "incoming" side if the InterceptableSwitch was used or if the link failed to decrypt the onion. In this case, we are cautious and replace the SCID if an alias exists. |
||
---|---|---|
.. | ||
hodl | ||
hop | ||
circuit_map_test.go | ||
circuit_map.go | ||
circuit_test.go | ||
circuit.go | ||
decayedlog_test.go | ||
decayedlog.go | ||
failure_detail.go | ||
failure.go | ||
htlcnotifier.go | ||
interceptable_switch.go | ||
interfaces.go | ||
link_isolated_test.go | ||
link_test.go | ||
link.go | ||
linkfailure.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
payment_result_test.go | ||
payment_result.go | ||
resolution_store_test.go | ||
resolution_store.go | ||
sequencer.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |