From decker.christian at gmail.com Sun Jul 29 13:59:03 2018 From: decker.christian at gmail.com (Christian Decker) Date: Sun, 29 Jul 2018 15:59:03 +0200 Subject: [Lightning-dev] Lack of capacity field in channel_announcement makes life difficult. Why is it not there? In-Reply-To: References: Message-ID: <87d0v6jg7s.fsf@gmail.com> Robert Olsson writes: > I think however it would be much better and flexible to append a max to > channel_update. We already have htlc_minimum_msat there and could add > htlc_maximum_msat to show capacity (minus fees) > Like this: > > > 1. type: 258 (channel_update) > 2. data: > - [64:signature] > - [32:chain_hash] > - [8:short_channel_id] > - [4:timestamp] > - [2:flags] > - [2:cltv_expiry_delta] > - [8:htlc_minimum_msat] > - [4:fee_base_msat] > - [4:fee_proportional_millionths] > > - [8:htlc_maximum_msat] This isn't about maximum HTLC value, rather ????? is talking about adding the total channel capacity to the channel_announcement. That is a perfectly reasonable idea, as it allows us to safe an on-chain lookup (incidentally that is the main reason we started tracking an internal UTXO set so we can stop asking bitcoind for full blocks just to check a channel's capacity). The channel's capacity is also fixed for the existence of that channel (splice-in and splice-out will result in new short channel IDs), so the announcement is exactly the right place to put this. Cheers, Christian