public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Daniele Pinna <daniele.pinna@gmail•com>
To: Bitcoin Dev <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] bitcoin-dev Digest, Vol 10, Issue 13
Date: Wed, 9 Mar 2016 02:27:22 +0100	[thread overview]
Message-ID: <CAEgR2PFByXpd5C7X2NUJYt+UE3ji6dd6M5LfZGQvg-QQV7fLnw@mail.gmail.com> (raw)
In-Reply-To: <mailman.6363.1457481624.1673.bitcoin-dev@lists.linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 3055 bytes --]

This seems unnecessarily complicated ("don't use cannon to kill mosquito"
kind of thing). If the community were interested in a realtime hashrate
rebalancing proposal one could simply adjust difficulty at each new block
using the current method.

If faster relaxation in case of adversity is required, it suspect that it
would suffice to perform a weighted average of the previous 2016 blocks
instead of the standard averaging that is currently done. It should be
possible to find an optimal weighting based on historical interblock timing
data. I look into it over the next couple of days.

dpinna




> ------------------------------
>
> Message: 3
> Date: Tue, 8 Mar 2016 22:05:07 +0000
> From: Bob McElrath <bob_bitcoin@mcelrath•org>
> To: Dave Hudson <dave@hashingit•com>
> Cc: bitcoin-dev@lists•linuxfoundation.org
> Subject: Re: [bitcoin-dev] Hardfork to fix difficulty drop algorithm
> Message-ID: <20160308220507.GA4388@mcelrath•org>
> Content-Type: text/plain; charset=us-ascii
>
> Dave Hudson via bitcoin-dev [bitcoin-dev@lists•linuxfoundation.org] wrote:
> > I think the biggest question here would be how would the difficulty
> > retargeting be changed?  Without seeing the algorithm proposal it's
> difficult
> > to assess the impact that it would have, but my intuition is that this is
> > likely to be problematic.
>
> I have no comment on whether this will be *needed* but there's a simple
> algorithm that I haven't seen any coin adopt, that I think needs to be: the
> critically damped harmonic oscillator:
>
>     http://mathworld.wolfram.com/CriticallyDampedSimpleHarmonicMotion.html
>
> In dynamical systems one does a derivative expansion.  Here we want to
> find the
> first and second derivatives (in time) of the hashrate.  These can be
> determined
> by a method of finite differences, or fancier algorithms which use a
> quadratic
> or quartic polynomial approximation.  Two derivatives are generally all
> that is
> needed, and the resulting dynamical system is a damped harmonic oscillator.
>
> A damped harmonic oscillator is basically how your car's shock absorbers
> work.
> The relevant differential equation has two parameters: the oscillation
> frequency
> and damping factor.  The maximum oscillation frequency is the block rate.
> Any
> oscillation faster than the block rate cannot be measured by block times.
> The
> damping rate is an exponential decay and for critical damping is twice the
> oscillation frequency.
>
> So, this is a zero parameter, optimal damping solution for a varying
> hashrate.
> This is inherently a numeric approximation solution to a differential
> equation,
> so questions of approximations for the hashrate enter, but that's all.
> Weak
> block proposals will be able to get better approximations to the hashrate.
>
> If solving this problem is deemed desirable, I can put some time into
> this, or
> direct others as to how to go about it.
>
> --
> Cheers, Bob McElrath
>
> "For every complex problem, there is a solution that is simple, neat, and
> wrong."
>     -- H. L. Mencken
>
>

[-- Attachment #2: Type: text/html, Size: 3935 bytes --]

       reply	other threads:[~2016-03-09  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6363.1457481624.1673.bitcoin-dev@lists.linuxfoundation.org>
2016-03-09  1:27 ` Daniele Pinna [this message]
2016-03-09  6:17   ` Bob McElrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEgR2PFByXpd5C7X2NUJYt+UE3ji6dd6M5LfZGQvg-QQV7fLnw@mail.gmail.com \
    --to=daniele.pinna@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox