2

LN clients can export their view of the network as a JSON file. For instance, in a file obtained from LND, a channel (edge) is described by this structure:

{
    "channel_id": "555479871492063233",
    "chan_point": "dbd46c11d740d7554454d2aad0520e18eedbc9c5e282d21dd065f275cbbe8380:1",
    "last_update": 1540396105,
    "node1_pub": "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e",
    "node2_pub": "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432",
    "capacity": "300000",
    "node1_policy": {
        "time_lock_delta": 14,
        "min_htlc": "0",
        "fee_base_msat": "546000",
        "fee_rate_milli_msat": "10",
        "disabled": false
    },
    "node2_policy": {
        "time_lock_delta": 14,
        "min_htlc": "0",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "10",
        "disabled": true
    }
}

Does node order have a meaning here? In other words, is node1_pub the one who initially opened the channel?

2

The nodes are listed in lexicographical order after compressed DER encoding. It is not possible to tell from the public information about a channel who requested to open it.

The ordering is required so that signature verification of a channel_announcement message always passes. If intermediate nodes were able to rearrange the order of information within the message, it would fail verification even though the information is correct.

Additionally, the numerical ordering is used for channel_update messages, as a single bit is used to denote whether the update applies to node1 or node2.

| improve this answer | |
  • 1
    One could look at the funding TX and see if Bitcoins where spent from a channel that was previously owned by one of the nodes. This would be a rather strong hint. But not directly what the question asked – Rene Pickhardt Nov 28 '19 at 20:27
  • 1
    That's true, but this would also require you to collect and archive historical channel data too. Regular node software should garbage collect such information as soon as they're confirmed spent. I'm sure the spies are already collecting everything. – Mark H Nov 28 '19 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.