<oembed><type>rich</type><version>1.0</version><author_name>npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_name><author_url>https://nostr.ae/npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-12-08&#xA;📝 Original message:&gt; On Mon, Dec 07, 2015 at 10:02:17PM +0000, Gregory Maxwell wrote:&#xA;&gt; &gt; If widely used this proposal gives a 2x capacity increase&#xA;&gt; &gt; (more if multisig is widely used),&#xA;&#xA;So from IRC, this doesn&#39;t seem quite right -- capacity is constrained as&#xA;&#xA;  base_size + witness_size/4 &lt;= 1MB&#xA;&#xA;rather than&#xA;&#xA;  base_size &lt;= 1MB and base_size + witness_size &lt;= 4MB&#xA;&#xA;or similar. So if you have a 500B transaction and move 250B into the&#xA;witness, you&#39;re still using up 250B+250B/4 of the 1MB limit, rather than&#xA;just 250B of the 1MB limit.&#xA;&#xA;In particular, if you use as many p2pkh transactions as possible, you&#39;d&#xA;have 800kB of base data plus 800kB of witness data, and for a block&#xA;filled with 2-of-2 multisig p2sh transactions, you&#39;d hit the limit at&#xA;670kB of base data and 1.33MB of witness data.&#xA;&#xA;That would be 1.6MB and 2MB of total actual data if you hit the limits&#xA;with real transactions, so it&#39;s more like a 1.8x increase for real&#xA;transactions afaics, even with substantial use of multisig addresses.&#xA;&#xA;The 4MB consensus limit could only be hit by having a single trivial&#xA;transaction using as little base data as possible, then a single huge&#xA;4MB witness. So people trying to abuse the system have 4x the blocksize&#xA;for 1 block&#39;s worth of fees, while people using it as intended only get&#xA;1.6x or 2x the blocksize... That seems kinda backwards.&#xA;&#xA;Having a cost function rather than separate limits does make it easier to&#xA;build blocks (approximately) optimally, though (ie, just divide the fee by&#xA;(base_bytes+witness_bytes/4) and sort). Are there any other benefits?&#xA;&#xA;But afaics, you could just have fixed consensus limits and use the cost&#xA;function for building blocks, though? ie sort txs by fee divided by [B +&#xA;S*50 + W/3] (where B is base bytes, S is sigops and W is witness bytes)&#xA;then just fill up the block until one of the three limits (1MB base,&#xA;20k sigops, 3MB witness) is hit?&#xA;&#xA;(Doing a hard fork to make *all* the limits -- base data, witness data,&#xA;and sigop count -- part of a single cost function might be a win; I&#39;m&#xA;just not seeing the gain in forcing witness data to trade off against&#xA;block data when filling blocks is already a 2D knapsack problem)&#xA;&#xA;Cheers,&#xA;aj</html></oembed>