Author

Topic: Bottlecaps 2.1 UPDATE REQUIRED - HARDFORK JULY 4 2014 to 200% Annual PoS - page 163. (Read 388610 times)

legendary
Activity: 1064
Merit: 1002
Ok great! Pull request is merged in Smiley

For now here is the plan. Ill include the small tx value stake fix for now set to take effect in 1 week since most if not all users will update to the new fix.

As far as the other plans. I can set them i n to take place far enough in the future that users will likely not notice anything when it comes around. Due to the PoS difficulty being low still I will need to add checkpoints every 10 days to keep the network secure as the difficulty rises.

So i see no isse with releasing these fixes and getting us back live on cryptsy here soon. I will set the other update to 30 days out from the release of the client including the fix. That way you will have 30 days to update and have to miss 3 clients for you to be left behind.

If you guys see any issue with this let me know. But the changes will likely go off unnoticed and no special updates will be required as the checkpoints will keep you updating for the time being anyways. These other changes are not effecting the network right now they are just to ensure security in the long run.

Give me 1 hour for the next release Smiley
member
Activity: 93
Merit: 10
Fixed client is ready and works fine. I'll publish a pull request after having a dinner.

This guy deserves a cake^^^ Whos buying?

0.25 BTC on the way to Balthazar for the cake... may be someone else would like to buy the beer or coffee?
legendary
Activity: 2674
Merit: 2965
Terminated.
Thanks. I also prefer that all the major changes/fixes to be done (and a bit time tested) while we are not on Cryptys/coinchoose and such... should be better to come back with a single solid 1.5 upgrade then "bothering" a larger crowd with multiple smaller upgrades.

Less upgrades -> Less confusion -> more confidence into the coin -> higher value -> me happy.

One way or another, I am very thankful to mullick and balthazar (and others if any) for the hard work on this issue.
I must kind of agree to this right now aswell.
I think that it would be beneficial to push more things into this update right now, there are less people checking up on caps, less clients and so on. We have some time I think.  Smiley
legendary
Activity: 3108
Merit: 1359
https://github.com/bottlecaps-foundation/bottlecaps/pull/4

No hard-fork required to resolve this. But you need to delete the blockchain files and download it again, otherwise you can get a problem.
member
Activity: 93
Merit: 10
Thanks. I also prefer that all the major changes/fixes to be done (and a bit time tested) while we are not on Cryptys/coinchoose and such... should be better to come back with a single solid 1.5 upgrade than "bothering" a larger crowd with multiple smaller upgrades.

Less upgrades -> Less confusion -> more confidence into the coin -> higher value -> me happy.

One way or another, I am very thankful to mullick and balthazar (and others if any) for the hard work on this issue.








legendary
Activity: 1064
Merit: 1002
Fixed client is ready and works fine. I'll publish a pull request after having a dinner.


This guy deserves a cake^^^ Whos buying?

legendary
Activity: 3108
Merit: 1359
Fixed client is ready and works fine. I'll publish a pull request after having a dinner.
legendary
Activity: 1064
Merit: 1002
I completely agree. If i do roll in the fixes to the stake system now it will take a bit more time. It is not necessary right now so I may do it at a later date. I would set the switch out plenty of time in advance so users would likely not notice.

It would take me a little time as i am still getting familiar with bitcoin coding. It is quite unique.

Say you have an application and want to change a major function. You change it and release a new update BAM its fixed. Bitcoin is special as you have to work around and delay they switch which is still quite new to me. Im learning fast and more every day
hero member
Activity: 798
Merit: 1000
‘Try to be nice’
So it is hard fork?
And I must ask... Are you SURE that this fixes the issues? Better not release it yet if you are not sure...

Yes I am fairly confident. The trouble was finding out why no other caps clones have been effected. This simple yet rather tricky little bug was hard to locate for me but to the more experienced eye was easier to pinpoint. I will be taking the updates balthazar puts out and adding the other fixes caps needs as well as.

As the stake system functions its not doing what is is designed to do. Users are really not protecting the network with such short block times and low block maturity. It is not decided if I will address these separate issues at a later date or roll them all into one update while we are doing the hard fork now

The problems have arisen from the High starting difficulty caps was born with :

Caps: Note the minimum difficulty for Proof of Work is much higher than that of Proof of Stake
Code:
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 30);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);

NVC: Note PoS difficulty is set higher than PoW difficulty
Code:
CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // "standard" scrypt target limit for proof of work, results with 0,000244140625 proof-of-work difficulty
CBigNum bnProofOfStakeLegacyLimit(~uint256(0) >> 24); // proof of stake target limit from block #15000 and until 20 June 2013, results with 0,00390625 proof of stake difficulty
CBigNum bnProofOfStakeLimit(~uint256(0) >> 27); // proof of stake target limit since 20 June 2013, equal to 0.03125  proof of stake difficulty


The function the PoS blocks were failing and leading to the issues when combined with other factors was computeminwork() as seen below in Caps. It was originally believed since it was never adjusted to match the shorter nTargetTimespan it was causing the issues. But there was no indication as to why no other clones had been effected (as the code for this was identical in all). But I knew it was failing that function and obviously had never been correctly adjusted. So in 1.4.1 this function was lowered from 24 * 60 * 60 to the value below but the issue remained:
Code:
static const int64 nTargetTimespan = 0.16 * 24 * 60 * 60;  // 4-hour
static const int64 nTargetSpacingWorkMax = 12 * nStakeTargetSpacing; // 2-hour

//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
//
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
{
    CBigNum bnTargetLimit = bnProofOfWorkLimit;

    CBigNum bnResult;
    bnResult.SetCompact(nBase);
    bnResult *= 2;
    while (nTime > 0 && bnResult < bnTargetLimit)
    {
        // Maximum 200% adjustment per day...
        bnResult *= 2;
        nTime -= 0.16 * 24 * 60 * 60;
    }
    if (bnResult > bnTargetLimit)
        bnResult = bnTargetLimit;
    return bnResult.GetCompact();
}



As you can see it is calculated using the bnProofOfWorkLimit which is much higher than the bnProofOfStakeLimit. This has never been an issue with any other PoS implementation because bnProofOfStake is usually higher

NVC uses a different function as Balthazar has a independent development path from PPC. This function is correct for NVC as it has 10 minute block spacing and a 1 week nTargetTimespan:

Code:
//
// minimum amount of work that could possibly be required nTime after
// minimum proof-of-work required was nBase
//
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
{
    return ComputeMaxBits(bnProofOfWorkLimit, nBase, nTime);
}

Code:
//
// maximum nBits value could possible be required nTime after
//
unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64 nTime)
{
    CBigNum bnResult;
    bnResult.SetCompact(nBase);
    bnResult *= 2;
    while (nTime > 0 && bnResult < bnTargetLimit)
    {
        // Maximum 200% adjustment per day...
        bnResult *= 2;
        nTime -= 24 * 60 * 60;
    }
    if (bnResult > bnTargetLimit)
        bnResult = bnTargetLimit;
    return bnResult.GetCompact();
}

this is all great news , my advice is that the time to Fork is now , when the Currency is off exchange and theoretically  the lowest number of people are using clients.

also reinstating and a Hardfork causing an issue could have bad effects, so to do it here in the "shade" would be smarter, just my opinion , i don't own a lot of Caps at this time.

this has been quite educational .
legendary
Activity: 1064
Merit: 1002
So it is hard fork?
And I must ask... Are you SURE that this fixes the issues? Better not release it yet if you are not sure...

Yes I am fairly confident. The trouble was finding out why no other caps clones have been effected. This simple yet rather tricky little bug was hard to locate for me but to the more experienced eye was easier to pinpoint. I will be taking the updates balthazar puts out and adding the other fixes caps needs as well as.

As the stake system functions its not doing what is is designed to do. Users are really not protecting the network with such short block times and low block maturity. It is not decided if I will address these separate issues at a later date or roll them all into one update while we are doing the hard fork now

The problems have arisen from the High starting difficulty caps was born with :

Caps: Note the minimum difficulty for Proof of Work is much higher than that of Proof of Stake
Code:
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 30);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);

NVC: Note PoS difficulty is set higher than PoW difficulty
Code:
CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // "standard" scrypt target limit for proof of work, results with 0,000244140625 proof-of-work difficulty
CBigNum bnProofOfStakeLegacyLimit(~uint256(0) >> 24); // proof of stake target limit from block #15000 and until 20 June 2013, results with 0,00390625 proof of stake difficulty
CBigNum bnProofOfStakeLimit(~uint256(0) >> 27); // proof of stake target limit since 20 June 2013, equal to 0.03125  proof of stake difficulty


The function the PoS blocks were failing and leading to the issues when combined with other factors was computeminwork() as seen below in Caps. It was originally believed since it was never adjusted to match the shorter nTargetTimespan it was causing the issues. But there was no indication as to why no other clones had been effected (as the code for this was identical in all). But I knew it was failing that function and obviously had never been correctly adjusted. So in 1.4.1 this function was lowered from 24 * 60 * 60 to the value below but the issue remained:
Code:
static const int64 nTargetTimespan = 0.16 * 24 * 60 * 60;  // 4-hour
static const int64 nTargetSpacingWorkMax = 12 * nStakeTargetSpacing; // 2-hour

//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
//
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
{
    CBigNum bnTargetLimit = bnProofOfWorkLimit;

    CBigNum bnResult;
    bnResult.SetCompact(nBase);
    bnResult *= 2;
    while (nTime > 0 && bnResult < bnTargetLimit)
    {
        // Maximum 200% adjustment per day...
        bnResult *= 2;
        nTime -= 0.16 * 24 * 60 * 60;
    }
    if (bnResult > bnTargetLimit)
        bnResult = bnTargetLimit;
    return bnResult.GetCompact();
}



As you can see it is calculated using the bnProofOfWorkLimit which is much higher than the bnProofOfStakeLimit. This has never been an issue with any other PoS implementation because bnProofOfStake is usually higher

NVC uses a different function as Balthazar has a independent development path from PPC. This function is correct for NVC as it has 10 minute block spacing and a 1 week nTargetTimespan:

Code:
//
// minimum amount of work that could possibly be required nTime after
// minimum proof-of-work required was nBase
//
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
{
    return ComputeMaxBits(bnProofOfWorkLimit, nBase, nTime);
}

Code:
//
// maximum nBits value could possible be required nTime after
//
unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64 nTime)
{
    CBigNum bnResult;
    bnResult.SetCompact(nBase);
    bnResult *= 2;
    while (nTime > 0 && bnResult < bnTargetLimit)
    {
        // Maximum 200% adjustment per day...
        bnResult *= 2;
        nTime -= 24 * 60 * 60;
    }
    if (bnResult > bnTargetLimit)
        bnResult = bnTargetLimit;
    return bnResult.GetCompact();
}
full member
Activity: 168
Merit: 100
When will this be opened again for trade ? Why is it blocked anyways ?
legendary
Activity: 3108
Merit: 1359
Yes, it will fix all the issues caused by the bug. Just like with PHS case, the bug is quite simple and introduced by original developer after forking this project from NovaCoin.

P.S. It's also possible to include a hard-fork to change target limits and spacing, I haven't decided yet.
legendary
Activity: 2730
Merit: 7065
So it is hard fork?
And I must ask... Are you SURE that this fixes the issues? Better not release it yet if you are not sure...
legendary
Activity: 1064
Merit: 1002
Yes major breakthrough last night with the help of balthazar
legendary
Activity: 2674
Merit: 2965
Terminated.
So the fix is coming soon.  Cool
legendary
Activity: 1064
Merit: 1002
1.4.3 will be released tonight just some code cleanup and more sync fixes. Will go a long way in helping here.

May be late tonight not sure when ill be home. But it will be tonight


I have some great news finally. Patches will be put out tomorrow along with a new client. More info on this as I get it out tomorrow but this is the fix we have been waiting for. Balthazar has been a great help today
legendary
Activity: 2674
Merit: 2965
Terminated.
It too have several thousand coins and typically plan to sell half and hold half..I have around around 5-6 BTC worth if still around 0.0002 (5000 per btc)..I'm somewhere around 33k...but this delay in getting back on the exchange is getting lengthy and hopefully will be back soon...as well as getting the coin fixed finally.
Any possible date or timeframe on client 1.5 release?
I'm going to wait on mining again until finally fixed and also back on exchange..hopefully soon! But glad to hear that most think the value won't likely take a big hit if at all...glad to hear.

Hopefully, the major update should hit in a few days.
newbie
Activity: 55
Merit: 0
It too have several thousand coins and typically plan to sell half and hold half..I have around around 5-6 BTC worth if still around 0.0002 (5000 per btc)..I'm somewhere around 33k...but this delay in getting back on the exchange is getting lengthy and hopefully will be back soon...as well as getting the coin fixed finally.
Any possible date or timeframe on client 1.5 release?
I'm going to wait on mining again until finally fixed and also back on exchange..hopefully soon! But glad to hear that most think the value won't likely take a big hit if at all...glad to hear.

PS..obviously even to stay the same as before the exchange value should drop as BTC has been on big rise lately and trading at $120+ when it was in $80's when this started...So 0.000133 would be the same as .0002 in comparison of BTC being worth $120 compared to $80...(7500 coins per btc now compared to 5000 approx before)..
hero member
Activity: 504
Merit: 500
I don't think it will go below that. The reason that the price has dropped to due to all of these problems accuring with it. Once it is fixed I belive the price should go up, maybe even to 0.001.

It has also dropped, like all coins have, due to BTC rising in value. (Thus, it takes less coins to equal the same dollars for exchange.)

All coins still have a strong trade-tie to BTC, so they all do this. They do not all do it proportionally by value, or at once, but they all do it.

Simply stand your ground and don't settle for less, and take advantage of those crazy enough to sell for less, by buying them when they are listed low. They just saved you from having to mine them, to make money.

Also, the more coins there are to mine, for a better value, the less that it leaves any single coin to remain valuable. They don't understand that they are the reason the coins they earned never reach the value they mined them at, because they are hopping. Then they sell short and live with the losses, defeating the purpose of mining the coins in the first place. Again, their loss, not ours, if we swipe those cheap coins up.
legendary
Activity: 2674
Merit: 2965
Terminated.
If things remain good over the next days/weeks and continue to stay on track as they are is there any chance Cryptsy will re-enable trading of Caps without release of client 1.5? And whenever it does go back to trading does anyone know  or have any clue what it is likely to trade at? I assume it will take a big hit and likely be MUCH lower then last 0.0002 btc u think?

With the exception of the small sale I made recently, I plan on holding most of mine, and I'm a fairly big holder (several thousands), and I assume mullick plans to do so also, and he actually has an order up for 1k CAPs on my spreadsheet exchange. I don't think it will go much below .0002 as long as most of the bigger holders hold for a little while. Plus the CAP marketshare in BTC is rather small, it wouldn't take much to wall it off at .0002.

I have a fair amount and do not plan on selling anytime soon. I believe it is undervalued and will go substantially higher. Might even buy some if it dips much.
I don't think it will go below that. The reason that the price has dropped to due to all of these problems accuring with it. Once it is fixed I belive the price should go up, maybe even to 0.001.
Jump to: