<oembed><type>rich</type><version>1.0</version><author_name>npub1r375vdaydp5nnnytff6ee2kwzxak8whmwkmnkm6h67agr7dadfkqxn6ccq</author_name><author_url>https://nostr.ae/npub1r375vdaydp5nnnytff6ee2kwzxak8whmwkmnkm6h67agr7dadfkqxn6ccq</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-12-27&#xA;📝 Original message:&#xA;Andy Schroder&#xA;&#xA;On 12/27/2017 01:06 AM, ZmnSCPxj wrote:&#xA;&gt; Good morning Andy,&#xA;&gt;&#xA;&gt;&gt; Andy Schroder&#xA;&gt;&gt; On 12/27/2017 12:18 AM, Andy Schroder wrote:&#xA;&gt;&gt;&gt;&gt; Channel closing&#xA;&gt;&gt;&gt;&gt; costs dwarf the gains to be made from cheating, however.&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; Since millisatoshis is used, is there a maximum channel funding size?&#xA;&gt;&gt;&gt;&gt; Yes, the upper 32 bits must be zero, from BOLT #2:&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;    - for channels with `chain_hash` identifying the Bitcoin &#xA;&gt;&gt;&gt;&gt; blockchain:&#xA;&gt;&gt;&gt;&gt;      - MUST set the four most significant bytes of `amount_msat` to 0.&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; This gives a maximum HTLC value of .04294967295 BTC, which, back when&#xA;&gt;&gt;&gt;&gt; we started, was about $10.&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; What&#39;s the point of wasting the upper 32 bits? Seems like this is a &#xA;&gt;&gt;&gt; waste of data?&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; If you have the lower 32 bits of data to use, and &#xA;&gt;&gt;&gt; 2^32=4,294,967,296, then you have 4,294,967,296 milli satoshis. 1 &#xA;&gt;&gt;&gt; BTC=10^11 milli satoshis, so 4,294,967,296 milli satoshis/((10^11 &#xA;&gt;&gt;&gt; milli satoshis)/1BTC) = 0.04294967296 BTC. That is off by 1 milli &#xA;&gt;&gt;&gt; satoshi from what you say above. Why is this?&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Regardless of the discrepancy of 1 milli satoshi, it still seems &#xA;&gt;&gt;&gt; like 0.04294967296 BTC is kind of a low maximum channel size for a &#xA;&gt;&gt;&gt; lot of business applications. Why do you want to limit this when you &#xA;&gt;&gt;&gt; have those extra 4 bytes set to zero? You think any more is too much &#xA;&gt;&gt;&gt; to safely have in a hot wallet? You felt keeping it low will &#xA;&gt;&gt;&gt; encourage decentralization? Something else?&#xA;&gt;&gt;&gt;&#xA;&gt;&#xA;&gt; Yes, I believe Rusty did indeed consider 42mBTC as a reasonable amount &#xA;&gt; to transfer on Lightning.  So that in case of trouble on Lightning, &#xA;&gt; not a lot of money gets lost.  At the time he decided this 42mBTC &#xA;&gt; limit, it was about 10 USD only, so Rusty could always just buy you a &#xA;&gt; drink if he somehow causes c-lightning to lose that much.&#xA;&gt;&#xA;&gt; Of course, 42mBTC today is much larger.&#xA;&gt;&#xA;&gt; For myself, I think the channel limit of 167mBTC is good as it &#xA;&gt; encourages decentralization by encouraging people to make many small &#xA;&gt; channels than one large channel. Many small channels helps in keeping &#xA;&gt; your funds resilient against temporary outages of your fellow nodes.&#xA;&#xA;I understand what you are saying about decentralization, but is this &#xA;really something that will be enforceable? Seems like people will just &#xA;make an alt-lightning network layer with different limits to get around &#xA;this, since there isn&#39;t really a consensus rule set like on the block &#xA;chain to motivate them.&#xA;&#xA;&#xA;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Is the max HTLC value the same as the maximum channel size?&#xA;&gt;&gt;&#xA;&gt;&gt; Okay, so I may have discovered part of this answer to this question &#xA;&gt;&gt; in BOLT 2 where it says: &#34;MUST set|funding_satoshis| to less than &#xA;&gt;&gt; 2^24 satoshi&#34;. However, I still don&#39;t understand the rational of why &#xA;&gt;&gt; |max ||funding_satoshis doesn&#39;t equal max |amount_msat, or where the &#xA;&gt;&gt; values of (2^24)*10^3 and 2^32 milli satoshis came from. Also, why &#xA;&gt;&gt; don&#39;t you use units of millisatoshis everywhere in the spec? &#xA;&gt;&gt; Sometimes it&#39;s satoshis and sometimes it&#39;s milli satoshis.&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt; This is actually very simple. Everything that touches the chain &#xA;&gt; (opening and closing) uses satoshis. Everything that does not, uses &#xA;&gt; millisatoshis.  This is because the chain uses satoshis as the &#xA;&gt; smallest amount.  Offchain, we can use millisatoshis, and it is used &#xA;&gt; everywhere offchain.&#xA;&#xA;Okay, the unit choices now make sense!&#xA;&#xA;&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt;&#xA;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20171227/51e762f0/attachment-0001.html&gt;</html></oembed>