3

In lightning network, is the balance publicly announced in Real-time?

From one hand, it should be public as it crucial to the routing mechanism.

But, in case that the balance might reveal some private information to the network..

I didn't found the answer in BOLT documentation.

Thanks.

1

The channel balance is not a public information. If you look at the channel_announcement-message in BOLT7 you see that the following information of the channel is public:

[64:node_signature_1] [64:node_signature_2] [64:bitcoin_signature_1] [64:bitcoin_signature_2] [2:len] [len:features] [32:chain_hash] [8:short_channel_id] [33:node_id_1] [33:node_id_2] [33:bitcoin_key_1] [33:bitcoin_key_2]

There you can see neither capacity nor balance however the short_channel_id consists of the blockheight of the funding transaction and the index of the transaction and the index of the output within the transaction as described here.

Also from BOLT7 you can take the following quote about the channel_update_message:

Note that the htlc_maximum_msat field is static in the current protocol over the life of the channel: it is not designed to be indicative of real-time channel capacity in each direction, which would be both a massive data leak and uselessly spam the network (it takes an average of 30 seconds for gossip to propagate each hop).

I hope both points give you a definite answer (:

1

Channels do not publicly announce their balance for several obvious reasons

  • It would be a huge privacy concern if balances could be viewed live on the network. People could monitor large parts of the network and aggregate data about how balances change over time, which could then be used to trace payments through the network and deanonymize users.

  • If every transaction by every node required a broadcast of the new channel balance, then bandwidth usage would become extremely large. The network would not scale for the same reasons Bitcoin can't have massive blocks. It would make running a node impossible on a commodity computer and internet connection.

  • Broadcasting channel balance would really be quite useless because the concept of "real-time" does not exist in a distributed network. A node could advertize its channel balances to its peers, but before any peer has chance to act on that data, those balances could have changed if they route a payment for another peer. The system is in constant change, and there is no way to atomically check a channel balance and then send a payment over that channel. It would be a bad idea to attempt to add such locks because there is no central coordinator of them, and it would result in all kinds of race conditions happening, like livelocks and deadlocks.

Channels only advertize their capacities, features, fees, minimum and maximum (optional) transaction values. There is no guarantee that a payment will route successfully even if you've provided a valid amount between the minimum and maximum with the correct fees.

0

A lightning channel can be either public, or private.

Private channels are not available for routing, but they keep the participant's financial details private. Transactions can be communicated off-band, so a private channel does not need to communicate or announce itself to the network at all.

In contrast, a public channel participates in the lightning network and can route payments, but doing so may sacrifice some financial privacy.

  • Thanks! my question is specifically related to public channels. does they must reveal their current balance in real time? or they keep them secret to specifics queries? – user1387682 Oct 16 '18 at 5:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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