summaryrefslogtreecommitdiff
path: root/c7/21ad4e9fdde013678ba58dc5ae63495dda2df3
blob: 47eaa8da8be8d13c2a35868442d1943540008acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Return-Path: <bob_bitcoin@mcelrath.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id AD834C95
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  8 Mar 2016 22:16:24 +0000 (UTC)
X-Greylist: delayed 00:10:49 by SQLgrey-1.7.6
Received: from mcelrath.org (moya.mcelrath.org [50.31.3.130])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CD1CEEE
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  8 Mar 2016 22:16:23 +0000 (UTC)
Received: from mcelrath.org (localhost [127.0.0.1])
	by mcelrath.org (8.14.3/8.14.3/Debian-9.4) with ESMTP id u28M575e023769
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Tue, 8 Mar 2016 22:05:07 GMT
Received: (from mcelrath@localhost)
	by mcelrath.org (8.14.3/8.14.3/Submit) id u28M57B8023768;
	Tue, 8 Mar 2016 22:05:07 GMT
X-Authentication-Warning: mcelrath.org: mcelrath set sender to
	bob_bitcoin@mcelrath.org using -f
Date: Tue, 8 Mar 2016 22:05:07 +0000
From: Bob McElrath <bob_bitcoin@mcelrath.org>
To: Dave Hudson <dave@hashingit.com>
Message-ID: <20160308220507.GA4388@mcelrath.org>
References: <201603021456.15820.luke@dashjr.org>
	<5E6E8EFD-2BC0-47F6-8005-5A63821C4276@hashingit.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5E6E8EFD-2BC0-47F6-8005-5A63821C4276@hashingit.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Tue, 08 Mar 2016 22:54:03 +0000
Cc: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] Hardfork to fix difficulty drop algorithm
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Mar 2016 22:16:24 -0000
X-List-Received-Date: Tue, 08 Mar 2016 22:16:24 -0000

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