well, dynamic difficulty adjustment is pretty much ... hmmm not really sure, it's not something that needs new tools, and it was only because i happened to be working for a shitcoin project that was building a hybrid proof of work/proof of stake algorithm that the CTO happened to be a trained physicist and noticed that difficulty adjustments were like a type of device he was familiar with from his work in physics, the PID controller

PID stands for Proportional Integral Derivative and it uses a set of parameters for each of those over a historical sample of data points to adjust a system, usually a linear parameter, to the inputs its getting

in my experimenting with it, i built a simulator that tested parameters for P, I and D I found it was possible to adjust smoothly, or be more accurate but it had a high noise component

i've since read a little more about how to work with these things and learned that the derivative can help a lot but in my tests it just added noise - the trick was to apply a band pass filter to cut the high frequencies out, and that probably would allow it to become faster at adjusting to changes without adding the noise factor that the P and I factor create when tweaked for fast adjustment

the fact is that the bitcoin difficulty adjustment is actually sufficient for the task, and due to its simplicity is preferable, but i could write a dynamic adjustment that is resistant to timewarp attacks and would reduce the amount of variance of solution times

Gotcha. I thought you meant you developed a more accurate way to estimate the total network hashrate on Bitcoin, than simply deriving it from difficulty and block count per day/week/etc

Reply to this note

Please Login to reply.

Discussion

no, i was talking about a dynamic difficulty adjustment, which uses statistical analysis to derive an estimate of the current difficulty target

you got me thinking though... would be quite interesting to create a simple app that just follows the bitcoin chain and demonstrates what a better dificulty adjustment would give you at each block height versus the existing scheme

Yea that would be a cool study. But in practice, I think a more dynamic system like that would be easier for a large miner to game or cause havoc.

well, i have studied the subject pretty close, i think that if it's properly written it can be better

it's a hard job because it really needs to be as simple as possible

i'd love to do something like this though, just to demonstrate it... easy to capture the data, and you can have an app that derives the system's estimations and shows you the error divergence at each block due to the super simple adjustment scheme, and lets you see several alternative methodologies applied... i think it would be a great educational tool and maybe it would lead to an upgrade of this element of bitcoin protocol due to the clear advantage

it really isn't that complicated... current system is like a thermostat that adjusts every 2 weeks... advanced adjustment systems have been long settled in other fields of tech, like the segway/hoverboard things... that is exactly this math applied to motion, and it's extremely stable now, ridiculously stable, hell i remember 14 years ago it was being applied to military jets to improve their maneuverability