You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll continually edit this. This is my current belief about what is the "best difficulty algorithm".
# WT-50
# Degnr8's WT algo, modified by zawy
# N=50
# T=600
# k=N*(N+1)/2
# limit =10^(3/N)
# adjust = (1+1.3/N) # keeps avg solvetime for N < 200
def next_bits_WMA(N):
target = 0
weight=0
for i in range(-N+1, 0):
weight++
st = (states[i].timestamp - states[i-1].timestamp)
target += st * bits_to_target(states[i].bits) * weight
target *= adjust / k
target_prev= bits_to_target(states[0].bits)
# use the following if bitcoin's -6\*T (MTP of 11) and +12*T of nodes' time are not the limits on the timestamps.
# if target > prev_target*limit: target=prev_target*limit
# if target < prev_target/limit: target=prev_target/limit
return target_to_bits(target)
The text was updated successfully, but these errors were encountered:
zawy12
changed the title
WT-30 with timestamp limits
WT-50 (zawy modification of WT-144)
Nov 3, 2017
I'll continually edit this. This is my current belief about what is the "best difficulty algorithm".
The text was updated successfully, but these errors were encountered: