<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:On Tue, Dec 08, 2015 at 05:21:18AM +0000, Gregory Maxwell via bitcoin-dev wrote:&#xA;&gt; On Tue, Dec 8, 2015 at 4:58 AM, Anthony Towns via bitcoin-dev&#xA;&gt; &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &gt; Having a cost function rather than separate limits does make it easier to&#xA;&gt; &gt; build blocks (approximately) optimally, though (ie, just divide the fee by&#xA;&gt; &gt; (base_bytes+witness_bytes/4) and sort). Are there any other benefits?&#xA;&gt; Actually being able to compute fees for your transaction: If there are&#xA;&gt; multiple limits that are &#34;at play&#34; then how you need to pay would&#xA;&gt; depend on the entire set of other candidate transactions, which is&#xA;&gt; unknown to you.&#xA;&#xA;Isn&#39;t that solvable in the short term, if miners just agree to order&#xA;transactions via a cost function, without enforcing it at consensus&#xA;level until a later hard fork that can also change the existing limits&#xA;to enforce that balance?&#xA;&#xA;(1MB base + 3MB witness + 20k sigops) with segwit initially, to something&#xA;like (B + W + 200*U + 40*S &lt; 5e6) where B is base bytes, W is witness&#xA;bytes, U is number of UTXOs added (or removed) and S is number of sigops,&#xA;or whatever factors actually make sense.&#xA;&#xA;I guess segwit does allow soft-forking more sigops immediately -- segwit&#xA;transactions only add sigops into the segregated witness, which doesn&#39;t&#xA;get counted for existing consensus. So it would be possible to take the&#xA;opposite approach, and make the rule immediately be something like:&#xA;&#xA;  50*S &lt; 1M&#xA;  B + W/4 + 25*S&#39; &lt; 1M&#xA;&#xA;(where S is sigops in base data, and S&#39; is sigops in witness) and&#xA;just rely on S trending to zero (or soft-fork in a requirement that&#xA;non-segregated witness transactions have fewer than B/50 sigops) so that&#xA;there&#39;s only one (linear) equation to optimise, when deciding fees or&#xA;creating a block. (I don&#39;t see how you could safely set the coefficient&#xA;for S&#39; too much smaller though)&#xA;&#xA;B+W/4+25*S&#39; for a 2-in/2-out p2pkh would still be 178+206/4+25*2=280&#xA;though, which would allow 3570 transactions per block, versus 2700 now,&#xA;which would only be a 32% increase...&#xA;&#xA;&gt; These don&#39;t, however, apply all that strongly if only one limit is&#xA;&gt; likely to be the limiting limit... though I am unsure about counting&#xA;&gt; on that; after all if the other limits wouldn&#39;t be limiting, why have&#xA;&gt; them?&#xA;&#xA;Sure, but, at least for now, there&#39;s already two limits that are being&#xA;hit. Having one is *much* better than two, but I don&#39;t think two is a&#xA;lot better than three?&#xA;&#xA;(Also, the ratio between the parameters doesn&#39;t necessary seem like a&#xA;constant; it&#39;s not clear to me that hardcoding a formula with a single&#xA;limit is actually better than hardcoding separate limits, and letting&#xA;miners/the market work out coefficients that match the sort of contracts&#xA;that are actually being used)&#xA;&#xA;&gt; &gt; That seems kinda backwards.&#xA;&gt; It can seem that way, but all limiting schemes have pathological cases&#xA;&gt; where someone runs up against the limit in the most costly way. Keep&#xA;&gt; in mind that casual pathological behavior can be suppressed via&#xA;&gt; IsStandard like rules without baking them into consensus; so long as&#xA;&gt; the candidate attacker isn&#39;t miners themselves. Doing so where&#xA;&gt; possible can help avoid cases like the current sigops limiting which&#xA;&gt; is just ... pretty broken.&#xA;&#xA;Sure; it just seems to be halving the increase in block space (60% versus&#xA;100% extra for p2pkh, 100% versus 200% for 2/2 multisig p2sh) for what&#xA;doesn&#39;t actually look like that much of a benefit in fee comparisons?&#xA;&#xA;I mean, as far as I&#39;m concerned, segwit is great even if it doesn&#39;t buy&#xA;any improvement in transactions/block, so even a 1% gain is brilliant.&#xA;I&#39;d just rather the 100%-200% gain I was expecting. :)&#xA;&#xA;Cheers,&#xA;aj</html></oembed>