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