Feathercoin daemon and wallet production version 0.19.1
Old daemon and wallet version 0.18.3

Difficulty re-targeting

  • | Tip bluebox

    UFO has recently experienced some kind of issue with “block extraction” — “stuck blocks” on the explorer or whatever you’d call it — perhaps related to difficulty re-targeting, perhaps brought about by higher network hashrate fluctuations from multipool algo-switchers. At least that’s what Cryptofarmer at Mining-Dutch.nl seems to think, that the diff retarget algo in UFO is broken somehow.

    So here’s a thread for continuing discussion related to this, so that we (ok, I) can better understand it! 🙂

  • Moderators | Tip Wellenreiter

    I don’t think, that the diff retargeting algorithm is broken.

    Typically the difficulty calculation is done based on the average hashrate of the last N blocks.

    The problem with difficulty adjustments is that it is relatively easy to do if the hashrate jumps up.
    Then many blocks are found in a short time and the algorithm gets enough blocks to adjust the difficulty. and also the new difficulty can be applied fast as the next block is available within seconds.
    The adjustment normally is done in a rampup/rampdown, so it needs several blocks to reach the target difficulty.

    If the hashrate drops heavily, the problem is that there are no block found by the remaining miners for minutes or even hour(s).
    This means, that the difficulty needs an extremly long time to adjust and worst case wallets start reporting bad network connections, because they expected X blocks during the last hour(s), but received only Y.

  • | Tip bluebox

    Here’s a screenshot for reference, showing the stop/start and diff of blocks.


    This has been going on since 8/28 7am EST. Sometimes an hour passes, sometimes less. Worst case yet, on block 1081099 with a quarter million coins and diff of 63.85 (!) took nearly three hours to “un-stick”.

    If it’s stuck on an extremely low diff block (>0.1 for example), multipools switch miners to UFO because of perceived profitability, and the reverse is true as well, perhaps aggravating the situation now that UFO is currently trading at 6 sat and would normally be very profitable…

  • | Tip bluebox

    @Wellenreiter Sorry, was fiddling with last post while you posted…

    Based on your explanation I can see why the huge multiport miner on mining-dutch may have been causing the disruption, in that his 120+MH/s switching in and out was just too much — going from 30MH net rate to over 175MH (600-700% change) and back was killing the diff algo.

    It’s not too bad now, as it appears a “smaller” algo switcher with ~15MH doing the same thing now, but the “stuck block” disruption seems less to a degree…

    What’s needed is a more consistent+higher network hashrate to better absorb those huge individual hashrate swings, I guess? Or better said, get through “re-growing pains” now that @Bushstar is back… 😉

  • Moderators | Tip Wellenreiter

    Indeed, a solid basic hashrate helps to stabilize the difficulty and increase the adaption when the hashrate drops

  • | Tip Bushstar

    NGW/DGW coins tend to do get stuck. It may be worth considering Feathercoin’s eHRC to smooth out the difficulty. I’ll speak with Wrapper as I imagine he’d have some idea about eHRC improvements for a smaller coins.

  • | Tip bluebox

    @Bushstar Just trying to figure out why all hell broke loose on the blockchain mining UFO the other day, when it went from 2 to over 6 sat on coinexchange… 🙂

    I think the shock in going from low nethash (30MH/s) to 600%+ and back down due to mining-dutch multiport is part of the culprit, besides the NGW issue.

    FTC’s diff algo also plays games with multipool “profitability” calculations as well, depending on sample timing. Can see this on whattomine, FTC is up one minute and down the next. 😵

    Thanks for working on all of this!

  • Moderators | Tip Wellenreiter

    @bluebox said in Difficulty re-targeting:

    FTC’s diff algo also plays games with multipool “profitability” calculations as well, depending on sample timing. Can see this on whattomine, FTC is up one minute and down the next.

    Yes, that is EHRC at work.
    What the big coin switching pools do is also called ‘selfish mining’ as they throw in high hash power, mine a lot of coins compared to the ‘permanent miners’ and switch away, leaving the permanent miners with a low hash rate and high difficulty and less coins mined than they normally would with a constant hash rate.

    EHRC was designed to react fast on changes in hash rate, driving away the coin switching pool shortly after they switch on and also adjust the difficulty down fast, so the loss of income for the ‘permanent miners’ is mitigated.

Log in to reply