<oembed><type>rich</type><version>1.0</version><author_name>npub1s4lj77xuzcu7wy04afcr487f0r3za0f8n2775xrpkld2sv639mjqsd44kw</author_name><author_url>https://nostr.ae/npub1s4lj77xuzcu7wy04afcr487f0r3za0f8n2775xrpkld2sv639mjqsd44kw</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-05-28&#xA;📝 Original message:On Fri, May 8, 2015 at 3:20 AM, Matt Whitlock &lt;bip at mattwhitlock.name&gt; wrote:&#xA;&#xA;&gt; Between all the flames on this list, several ideas were raised that did&#xA;&gt; not get much attention. I hereby resubmit these ideas for consideration and&#xA;&gt; discussion.&#xA;&gt;&#xA;&gt; - Perhaps the hard block size limit should be a function of the actual&#xA;&gt; block sizes over some trailing sampling period. For example, take the&#xA;&gt; median block size among the most recent 2016 blocks and multiply it by 1.5.&#xA;&gt; This allows Bitcoin to scale up gradually and organically, rather than&#xA;&gt; having human beings guessing at what is an appropriate limit.&#xA;&gt;&#xA;&#xA;A lot of people like this idea, or something like it. It is nice and&#xA;simple, which is really important for consensus-critical code.&#xA;&#xA;With this rule in place, I believe there would be more &#34;fee pressure&#34;&#xA;(miners would be creating smaller blocks) today. I created a couple of&#xA;histograms of block sizes to infer what policy miners are ACTUALLY&#xA;following today with respect to block size:&#xA;&#xA;Last 1,000 blocks:&#xA;  http://bitcoincore.org/~gavin/sizes_last1000.html&#xA;&#xA;Notice a big spike at 750K -- the default size for Bitcoin Core.&#xA;This graph might be misleading, because transaction volume or fees might&#xA;not be high enough over the last few days to fill blocks to whatever limit&#xA;miners are willing to mine.&#xA;&#xA;So I graphed a time when (according to statoshi.info) there WERE a lot of&#xA;transactions waiting to be confirmed:&#xA;   http://bitcoincore.org/~gavin/sizes_357511.html&#xA;&#xA;That might also be misleading, because it is possible there were a lot of&#xA;transactions waiting to be confirmed because miners who choose to create&#xA;small blocks got lucky and found more blocks than normal.  In fact, it&#xA;looks like that is what happened: more smaller-than-normal blocks were&#xA;found, and the memory pool backed up.&#xA;&#xA;So: what if we had a dynamic maximum size limit based on recent history?&#xA;&#xA;The average block size is about 400K, so a 1.5x rule would make the max&#xA;block size 600K; miners would definitely be squeezing out transactions /&#xA;putting pressure to increase transaction fees. Even a 2x rule (implying&#xA;800K max blocks) would, today, be squeezing out transactions / putting&#xA;pressure to increase fees.&#xA;&#xA;Using a median size instead of an average means the size can increase or&#xA;decrease more quickly. For example, imagine the rule is &#34;median of last&#xA;2016 blocks&#34; and 49% of miners are producing 0-size blocks and 51% are&#xA;producing max-size blocks. The median is max-size, so the 51% have total&#xA;control over making blocks bigger.  Swap the roles, and the median is&#xA;min-size.&#xA;&#xA;Because of that, I think using an average is better-- it means the max size&#xA;will change (up or down) more slowly.&#xA;&#xA;I also think 2016 blocks is too long, because transaction volumes change&#xA;quicker than that. An average over 144 blocks (last 24 hours) would be&#xA;better able to handle increased transaction volume around major holidays,&#xA;and would also be able to react more quickly if an economically irrational&#xA;attacker attempted to flood the network with fee-paying transactions.&#xA;&#xA;So my straw-man proposal would be:  max size 2x average size over last 144&#xA;blocks, calculated at every block.&#xA;&#xA;There are a couple of other changes I&#39;d pair with that consensus change:&#xA;&#xA;+ Make the default mining policy for Bitcoin Core neutral-- have its target&#xA;block size be the average size, so miners that don&#39;t care will &#34;go along&#xA;with the people who do care.&#34;&#xA;&#xA;+ Use something like Greg&#39;s formula for size instead of bytes-on-the-wire,&#xA;to discourage bloating the UTXO set.&#xA;&#xA;&#xA;---------&#xA;&#xA;When I&#39;ve proposed (privately, to the other core committers) some dynamic&#xA;algorithm the objection has been &#34;but that gives miners complete control&#xA;over the max block size.&#34;&#xA;&#xA;I think that worry is unjustified right now-- certainly, until we have&#xA;size-independent new block propagation there is an incentive for miners to&#xA;keep their blocks small, and we see miners creating small blocks even when&#xA;there are fee-paying transactions waiting to be confirmed.&#xA;&#xA;I don&#39;t even think it will be a problem if/when we do have size-independent&#xA;new block propagation, because I think the combination of the random timing&#xA;of block-finding plus a dynamic limit as described above will create a&#xA;healthy system.&#xA;&#xA;If I&#39;m wrong, then it seems to me the miners will have a very strong&#xA;incentive to, collectively, impose whatever rules are necessary (maybe a&#xA;soft-fork to put a hard cap on block size) to make the system healthy again.&#xA;&#xA;&#xA;-- &#xA;--&#xA;Gavin Andresen&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150528/5681756b/attachment.html&gt;</html></oembed>