<oembed><type>rich</type><version>1.0</version><author_name>npub1xddusuj8cyeqaqalq0zklafvdgr26pt32t0tvquw5mmwwwm3dehsqlkyw0</author_name><author_url>https://nostr.ae/npub1xddusuj8cyeqaqalq0zklafvdgr26pt32t0tvquw5mmwwwm3dehsqlkyw0</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-05-08&#xA;📝 Original message:Sergio,&#xA;&#xA;I&#39;m not sure what the data you present has to do with the discount.  A 75%&#xA;discount prevents witness spam precisely because it is 75%, nothing more.&#xA;The current usage simply gives a guideline on how much capacity is gained&#xA;through a particular discount.  With the data you show, it would imply that&#xA;those blocks, with SegWit used where possible, would result in blocks of&#xA;~1.8MB.&#xA;&#xA;&#xA;&#xA;On Mon, May 8, 2017 at 5:42 PM, Sergio Demian Lerner via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; I have processed 1000 blocks starting from Block #461653.&#xA;&gt;&#xA;&gt; I computed several metrics, including the supposed size of witness data&#xA;&gt; and non-witness data (onchain), assuming all P2SH inputs/outputs are&#xA;&gt; converted to P2PWSH and all P2PKH inputs/outputs are converted to P2WPKH.&#xA;&gt;&#xA;&gt; This takes into account that other types of transactions will not be&#xA;&gt; modified by Segwit (e.g. OP_RETURN outputs, or P2PK). This analysis doesn&#39;t&#xA;&gt; take into account that LN transactions may affect the current state,&#xA;&gt;  increasing the segwit/nosegwit ratio.&#xA;&gt;&#xA;&gt; Among a lot of information, I&#39;ve got the following real world results...&#xA;&gt;&#xA;&gt; acMainChainSpace =352608924&#xA;&gt; acSegwitSpace =599400403&#xA;&gt; Ratio segwit/nosegwit=1.6999&#xA;&gt;&#xA;&gt; This implies that the 75% that discount is not the best option to prevent&#xA;&gt; witness spam in a block of 4 MB, as stated in https://segwit.org/why-a-&#xA;&gt; discount-factor-of-4-why-not-2-or-8-bbcebe91721e.&#xA;&gt;&#xA;&gt; The non-witness data weight factor should not be 4 but 2.35. The closest&#xA;&gt; integer value is 2, which leads to a 50% witness discount.&#xA;&gt;&#xA;&gt; The Bitcoinj source code is available for anyone to review. I encourage&#xA;&gt; anyone to re-compute this with another utility to cross-check. Maybe&#xA;&gt; Antoine Le Calvez (p2sh.info) would like to double-check.&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170508/eda3ff72/attachment.html&gt;</html></oembed>