<oembed><type>rich</type><version>1.0</version><author_name>npub1re22dhneg8azw7z3979njqn2sp4gxzp4703g62tsrvmsvnj76heqj679nu</author_name><author_url>https://nostr.ae/npub1re22dhneg8azw7z3979njqn2sp4gxzp4703g62tsrvmsvnj76heqj679nu</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2016-03-09&#xA;📝 Original message:A damping-based design would seem like the obvious choice (I can think of a few variations on a theme here, but most are found in the realms of control theory somewhere).  The problem, though, is working working out a timeframe over which to run the derivative calculations.&#xA;&#xA;The problem is the measurement of the hashrate, which is pretty inaccurate at best because even 2016 events isn&#39;t really enough (with a completely constant hash rate running indefinitely we&#39;d see difficulty swings of up to +/- 5% even with the current algorithm).  In order to meaningfully react to a major loss of hashing we&#39;d still need to be considering a window of probably 2 weeks.&#xA;&#xA;My other concern is that if we allow quick retargets to lower difficulties then that seems likely to expose the chain to being gamed.  I&#39;d need to think about this some more, but a few scenarios I was thinking about earlier this week appeared to risk making some types of selfish mining strategies quite a lot more profitable.&#xA;&#xA;With all this said though I&#39;ll be very surprised if there&#39;s a huge drop in the hash rate come July.  The hash rate has jumped up by almost 70% in the last 6 to 7 months and that implies some pretty serious investments by miners who are quite aware of the halving.  My guess is that quite a lot of the baseline 30% has also been replaced in the same cycle.  These same miners were mining with a coin price around $250 last year so in terms of profitability I&#39;m pretty sure that one around $400 won&#39;t be a huge concern.&#xA;&#xA;I&#39;m sure that there will be some very public &#34;I&#39;m done with mining&#34; announcements from a few smaller miners come July, but I suspect the bulk of the network will have a relatively small blip and continue on its way.&#xA;&#xA;&#xA;Cheers,&#xA;Dave&#xA;&#xA;&#xA;&gt; On 8 Mar 2016, at 22:05, Bob McElrath &lt;bob_bitcoin at mcelrath.org&gt; wrote:&#xA;&gt; &#xA;&gt; Dave Hudson via bitcoin-dev [bitcoin-dev at lists.linuxfoundation.org] wrote:&#xA;&gt;&gt; I think the biggest question here would be how would the difficulty&#xA;&gt;&gt; retargeting be changed?  Without seeing the algorithm proposal it&#39;s difficult&#xA;&gt;&gt; to assess the impact that it would have, but my intuition is that this is&#xA;&gt;&gt; likely to be problematic.&#xA;&gt; &#xA;&gt; I have no comment on whether this will be *needed* but there&#39;s a simple&#xA;&gt; algorithm that I haven&#39;t seen any coin adopt, that I think needs to be: the&#xA;&gt; critically damped harmonic oscillator:&#xA;&gt; &#xA;&gt;    http://mathworld.wolfram.com/CriticallyDampedSimpleHarmonicMotion.html&#xA;&gt; &#xA;&gt; In dynamical systems one does a derivative expansion.  Here we want to find the&#xA;&gt; first and second derivatives (in time) of the hashrate.  These can be determined&#xA;&gt; by a method of finite differences, or fancier algorithms which use a quadratic&#xA;&gt; or quartic polynomial approximation.  Two derivatives are generally all that is&#xA;&gt; needed, and the resulting dynamical system is a damped harmonic oscillator.  &#xA;&gt; &#xA;&gt; A damped harmonic oscillator is basically how your car&#39;s shock absorbers work.&#xA;&gt; The relevant differential equation has two parameters: the oscillation frequency&#xA;&gt; and damping factor.  The maximum oscillation frequency is the block rate.  Any&#xA;&gt; oscillation faster than the block rate cannot be measured by block times.  The&#xA;&gt; damping rate is an exponential decay and for critical damping is twice the&#xA;&gt; oscillation frequency.&#xA;&gt; &#xA;&gt; So, this is a zero parameter, optimal damping solution for a varying hashrate.&#xA;&gt; This is inherently a numeric approximation solution to a differential equation,&#xA;&gt; so questions of approximations for the hashrate enter, but that&#39;s all.  Weak&#xA;&gt; block proposals will be able to get better approximations to the hashrate.&#xA;&gt; &#xA;&gt; If solving this problem is deemed desirable, I can put some time into this, or&#xA;&gt; direct others as to how to go about it.&#xA;&gt; &#xA;&gt; --&#xA;&gt; Cheers, Bob McElrath&#xA;&gt; &#xA;&gt; &#34;For every complex problem, there is a solution that is simple, neat, and wrong.&#34;&#xA;&gt;    -- H. L. Mencken &#xA;&gt;</html></oembed>