Looking in my last push i saw it will never change the diff, could somebody check if this look's good? it should be working after height 535020
// Limit adjustment step
int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
printf(" nActualTimespan = %"PRI64d" before bounds\n", nActualTimespan);
if(pindexLast->nHeight+1 > 535020)
{
// From Digibyte to implement Digishield
static const int64 nAveragingInterval = 10; // 10 blocks
static const int64 nAveragingTargetTimespan = nAveragingInterval * nTargetSpacing; // *10
static const int64 nMaxAdjustDown = 16; // 16% adjustment down
static const int64 nMaxAdjustUp = 8; // adjustment up
static const int64 nMinActualTimespan = nAveragingTargetTimespan * (100 - nMaxAdjustUp) / 100;
static const int64 nMaxActualTimespan = nAveragingTargetTimespan * (100 + nMaxAdjustDown) / 100;
if (nActualTimespan < nMinActualTimespan)
nActualTimespan = nMinActualTimespan;
if (nActualTimespan > nMaxActualTimespan)
nActualTimespan = nMaxActualTimespan;
}
else if(pindexLast->nHeight+1 > 10000)
{
if (nActualTimespan < nTargetTimespan/4)
nActualTimespan = nTargetTimespan/4;
if (nActualTimespan > nTargetTimespan*4)
nActualTimespan = nTargetTimespan*4;
}
else if(pindexLast->nHeight+1 > 5000)
{
if (nActualTimespan < nTargetTimespan/8)
nActualTimespan = nTargetTimespan/8;
if (nActualTimespan > nTargetTimespan*4)
nActualTimespan = nTargetTimespan*4;
}
else
{
if (nActualTimespan < nTargetTimespan/16)
nActualTimespan = nTargetTimespan/16;
if (nActualTimespan > nTargetTimespan*4)
nActualTimespan = nTargetTimespan*4;
}
// Retarget
CBigNum bnNew;
bnNew.SetCompact(pindexLast->nBits);
bnNew *= nActualTimespan;
bnNew /= nTargetTimespan;
if (bnNew > bnProofOfWorkLimit)
bnNew = bnProofOfWorkLimit;
Can these kinds of changes be made without causing a fork? I assumed we need to collect all changes into a new "major release" then get everybody (including the wallets run by any exchanges) to move to the new version ahead of time. Shouldn't there be a built-in block height a few weeks/months in the future at which time the new code changes become live, so we can make sure everyone has upgraded before then? If that's the case then I think we should only choose the specs like block time and difficulty adjustment after some agreement as to what the changes should be.
Also - since @sonountaleban has stated they left the AGAcoin project, I suggest everyone submit code changes to
https://github.com/AGAcoin/amigacoin where we have set up the new GitHub Organization (If you need commit access just ask).
Sorry for the late answer, i was kind of busy developing my own coin, but meanwhile i was able to make some tests. If we modify the diff algorithm and time per block only pool's and solo miners should update its wallets at first. Old wallet's will continue sending a receiving transactions.