How much privacy does Lightning actually have? I can't find any information on what information is actually contained within a lightning transaction.
Lets say Alice wants to pay Bob on lightning and routes through R1, R2, R3 in the following order
Alice &gt; R1 &gt; R2 &gt; R3 &gt; Bob
I assume Bob needs to know information regarding the channel UTXO from Alice, otherwise how would Bob know that the channel is funded?
If this assumption is true, how is Lightning more private than Bitcoin? (except for the fact that nodes don't need to store the information on channel UTXO's [but they can if they want...])
If Bob is known amongst authorities as a common endpoint for whoever they are targeting, they can compel Bob to reveal if he received a payment which was funded from a channel with some known UTXO (they would know the channel UTXO from on-chain analysis of their tracking of Alice). If Bob is logging the information he's paid with, then he would have the ability to comply with this authority, effectively making this Lightning payment no more private than a Bitcoin payment. If Alice gave Bob some personal information in relation to the payment, this would completely dox Alice to authorities.
Also, does R1, R2, R3 also know the channel UTXO?
If the channel UTXO is not known amongst participants, how does the target channel validate that the source channel is funded?
Would appreciate guidance on this
Thank you
Bob only knows the channel R3--Bob and his other channels.
in particular due to the onion routing Bob has no way of knowing who send the payment or say anything about the channels of the sender (as Bob does not know the sender)
Routing only know their incoming and outgoing channel. So the only thing that R2 would know is that there was and HTLC offered by R1 and that it is supposed to be forwarded to R3.
With respect to your question of how does Bob know about Alices channel. As said Bob doesn't but you could invert the question. If alice wants to pay Bob, how does she know about the R3 - Bob channel? There are two possibilities. Either Bob specified a Routing hint in the invoice or she does so (with other channels on the path) with a probing trial and error approach. This is well described in https://arxiv.org/abs/2103.08576 where this was also used to probe for the balance values of channels. In that sense the information on Lightning Network is not strictly private.
However probing takes time and might be inacurate as there are counter measures to probing channel balances. (In comparison if you see something on chain it is pretty clear that this is the reality)