<div>Good morning Thomas,<br></div><div><br></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" id="divtagdefaultwrapper"><p style="margin-top:0;margin-bottom:0">Does node GOSSIP also&nbsp;reveal the funding/balance of channels, same way&nbsp;it does the fees?<br></p><p style="margin-top:0;margin-bottom:0"><br></p><p style="margin-top:0;margin-bottom:0"><br></p><p style="margin-top:0;margin-bottom:0">I'm trying to understand how to make an informed payment&nbsp;routing decision as a sender, based on the&nbsp;fees (that you have already explained), but also the funding/balance of each channel,&nbsp;to select the cheapest route with
 the highest chance of success.<br></p><p style="margin-top:0;margin-bottom:0"><br></p><p style="margin-top:0;margin-bottom:0"><br></p><p style=""><span class="font" style="font-family:Calibri, Helvetica, sans-serif, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols"><span class="size" style="font-size:16px">I have looked through the RFC and can't seem to find an explanation on whether or not the channel funding/balance information is available from GOSSIP&nbsp;or how else you'd&nbsp;handle this kind of thing?</span></span><br></p></div></blockquote><div>No, channel balance of each peer on the channel is not revealed on node gossip.<br></div><div><br></div><div>Logically, invert the question: do you want to report how much you spend/receive on each of your channels to the network?&nbsp; Do you want to report how much you own on Lightning to be reported to everyone on Lightning?<br></div><div><br></div><div>Since the balance on each peer is effectively the amount of money each peer owns on that channel, and each change to that balance represents a send/receive on that channel, you will not want to report your balance, and any changes in that balance, to the entire network.<br></div><div><br></div><div>Logically you can then expect not to receive such updates from anybody else, either.<br></div><div><br></div><div>How do real-life implementations like c-lightning get your payment routes then?&nbsp; By brute-force trial-and-error.&nbsp; If one channel on a route fails, we just mark it as temporarily unuseable and plot a new route that does not include that channel.&nbsp; If a channel on THAT route fails, we mark it and plot another route.&nbsp; And so on until we run out of possible routes because all possible channels to the destination are blocked.<br></div><div><br></div><div>--<br></div><div><br></div><div>Note though that you can easily get the channel total capacity for each channel (just not how the channel is divided between the two parties).<br></div><div><br></div><div>Each published channel has a short channel id composed of blockheight, transaction index within block, and output index within transaction.&nbsp; This identifies a specific txout on the blockchain you are using.&nbsp; If that txout is spent, then the channel has been closed and you cannot use it for routing.&nbsp; If that txout is unspent, then the value of that UTXO is the total channel capacity.&nbsp; C-lightning records this but does not (yet) use the total channel capacity (logically if your payment would exceed the total channel capacity then the channel is unuseable for that payment, and if it is a large fraction of that total channel capacity then it is very unlikely to be useable); but the existing brute-force trial-and-error algorithm works well enough already.<br></div><div><br></div><div>Regards,<br></div><div>ZmnSCPxj<br></div>