user131784: To look up information of a channel on 1ML.com, I wonder how the channel_id is built.
Reading this question and the corresponding BOLT02, I see that
channel_id = funding_txid XOR funding_output_index

As the funding_txid is a 32 byte string (e.g. 399986f8d47b36d4f21c07de0ce7d422de244ed58a72e6b44d26985fe1e7465c), the channel_id has also 32 bytes.
However, when looking at a specific channel at 1ML.com, the channel_id is much shorter (e.g., 735416048958177281).
Hence my question is:

Is the above definition of the channel_id correct? If so, what is the difference to the one of 1ML.com?
Otherwise: How is the channel_id computed correctly?


user81940: The channel_id in 1ml seems to be the lnd encoding of the short_channel_id. Note that the short Channel ID is just 3 bytes of blockheight, 3 bytes of transaction index within the and 2 bytes for the output index within the transaction. While BOLTs recommend to serialize this as HEIGHTxINDEXxOUTPUT lnd just concatenated those 8 bytes and displays them as a single large integer. I guess since lightning explorer tend to take over the APIs of implementations we have this confusion

131784: <p>To look up information of a channel on <a href="https://1ML.com" rel="nofollow noreferrer">1ML.com</a>, I wonder how the <code>channel_id</code> is built.</p>
<p>Reading <a href="https://bitcoin.stackexchange.com/questions/84795/how-to-obtain-the-channel-id-from-the-short-channel-id">this question</a> and the <a href="https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-funding_signed-message" rel="nofollow noreferrer">corresponding BOLT02</a>, I see that</p>
<pre><code>channel_id = funding_txid XOR funding_output_index
</code></pre>
<p>As the <code>funding_txid</code> is a 32 byte string (e.g. <code>399986f8d47b36d4f21c07de0ce7d422de244ed58a72e6b44d26985fe1e7465c</code>), the <code>channel_id</code> has also 32 bytes.</p>
<p>However, when looking at a <a href="https://1ml.com/channel/617430754733195265" rel="nofollow noreferrer">specific channel at 1ML.com</a>, the <code>channel_id</code> is much shorter (e.g., <code>735416048958177281</code>).</p>
<p>Hence my question is:</p>
<ul>
<li>Is the above definition of the <code>channel_id</code> correct? If so, what is the difference to the one of 1ML.com?</li>
<li>Otherwise: How is the <code>channel_id</code> computed correctly?</li>
</ul>
 81940: <p>The <code>channel_id</code> in 1ml seems to be the lnd encoding of the <code>short_channel_id</code>. Note that the short Channel ID is just 3 bytes of blockheight, 3 bytes of transaction index within the and 2 bytes for the output index within the transaction. While BOLTs recommend to serialize this as HEIGHTxINDEXxOUTPUT lnd just concatenated those 8 bytes and displays them as a single large integer. I guess since lightning explorer tend to take over the APIs of implementations we have this confusion</p>
