bitcoin-dev Digest, Vol 10, Issue 13 [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2016-03-09T06:17:50+00:00


Summary:

During a discussion on the Bitcoin-dev mailing list, Daniele Pinna suggested an alternative approach to implementing a proposal for real-time hash rate rebalancing. Instead of adjusting the difficulty at each new block using the current method, Pinna proposed performing a weighted average of the previous 2016 blocks to find an optimal weighting based on historical interblock timing data. The goal was to prevent oscillation between blocks, even when miners switch hardware on and off.Pinna noted that the optimal solution for this rebalancing is the critically damped oscillator. This solution would provide a zero-parameter, optimal damping solution for a varying hashrate. However, Mike Wozniak pointed out that Simplified Payment Verification (SPV) wallets must also calculate retargeting but stated that it is a simple calculation that would not affect the runtime of SPV wallets.Bob McElrath proposed a simple algorithm called the "critically damped harmonic oscillator" for hashrate rebalancing. This algorithm aims to find the first and second derivatives of the hashrate over time, resulting in a damped harmonic oscillator system with two parameters: oscillation frequency and damping factor. The maximum oscillation frequency is determined by the block rate, as any oscillation faster than that cannot be accurately measured by block times. The damping rate is set to twice the oscillation frequency for critical damping.While McElrath's solution is a numeric approximation to a differential equation, it offers an optimal damping solution for a varying hashrate without the need for additional parameters. It is also possible for weak block proposals to obtain better approximations to the hashrate.Dave Hudson suggested that instead of adopting McElrath's proposal, the community should adjust the difficulty at each new block using the current method. However, if faster relaxation in case of adversity is required, a weighted average of the previous 2016 blocks could be performed based on historical interblock timing data. This approach would allow for finding an optimal weighting to address the issue.Overall, the discussion on the Bitcoin-dev mailing list revolved around different approaches to hash rate rebalancing and difficulty adjustment. While Pinna proposed a weighted average based on historical data, McElrath suggested a critically damped harmonic oscillator algorithm. Hudson, on the other hand, advocated for sticking with the current method of difficulty adjustment but acknowledged the potential benefits of a weighted average approach in certain situations.


Updated on: 2023-08-01T17:57:41.897727+00:00