Bitcoin Forum
March 28, 2024, 05:17:11 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Poll
Question: How many BottleCaps do you own?
None - 86 (39.1%)
1-1k - 30 (13.6%)
1k-10k - 28 (12.7%)
More than 10k - 76 (34.5%)
Total Voters: 220

Pages: « 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [57] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 ... 219 »
  Print  
Author Topic: Bottlecaps 2.1 UPDATE REQUIRED - HARDFORK JULY 4 2014 to 200% Annual PoS  (Read 388604 times)
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
August 30, 2013, 10:59:51 AM
 #1121

So the fix is coming soon.  Cool

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
1711646231
Hero Member
*
Offline Offline

Posts: 1711646231

View Profile Personal Message (Offline)

Ignore
1711646231
Reply with quote  #2

1711646231
Report to moderator
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 11:01:39 AM
 #1122

Yes major breakthrough last night with the help of balthazar
Pmalek
Legendary
*
Offline Offline

Activity: 2716
Merit: 7031


Farewell, Leo. You will be missed!


View Profile
August 30, 2013, 11:03:33 AM
 #1123

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...

..JAMBLER.io..Create Your Bitcoin Mixing
Business Now for   F R E E 
▄█████████████████████████████
█████████████████████████
████▀████████████████████
███▀█████▄█▀███▀▀▀██████
██▀█████▄█▄██████████████
██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████
█████▄▄▄██████████▀▄████
█████▀▄█▄██████▀█▄█████
███████▀▄█▀█▄██▀█▄███████
█████████▄█▀▄█▀▄█████████
█████████████████████████
█████████████████████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
      OUR      
PARTNERS

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
▄█████████████████████████████
████████▀▀█████▀▀████████
█████▀█████████████▀█████
████████████████████████
███████████████▄█████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████▀█████████
████████████████████████
█████▄█████████████▄█████
████████▄▄█████▄▄████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
   INVEST   
BITCOIN

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
August 30, 2013, 11:31:48 AM
Last edit: August 30, 2013, 11:42:22 AM by Balthazar
 #1124

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.
GTX-DoX
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
August 30, 2013, 02:04:26 PM
 #1125

When will this be opened again for trade ? Why is it blocked anyways ?
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 02:31:05 PM
 #1126

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();
}
digitalindustry
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


‘Try to be nice’


View Profile WWW
August 30, 2013, 03:14:08 PM
 #1127

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 .

- Twitter @Kolin_Quark
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 04:12:42 PM
 #1128

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
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
August 30, 2013, 04:13:14 PM
 #1129

Fixed client is ready and works fine. I'll publish a pull request after having a dinner.
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 04:26:42 PM
 #1130

Fixed client is ready and works fine. I'll publish a pull request after having a dinner.


This guy deserves a cake^^^ Whos buying?

DrGoose
Member
**
Offline Offline

Activity: 93
Merit: 10



View Profile
August 30, 2013, 05:01:28 PM
Last edit: August 30, 2013, 05:24:30 PM by DrGoose
 #1131

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.








Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
August 30, 2013, 05:06:43 PM
 #1132

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.
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
August 30, 2013, 05:15:10 PM
 #1133

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

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
DrGoose
Member
**
Offline Offline

Activity: 93
Merit: 10



View Profile
August 30, 2013, 05:16:23 PM
 #1134

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?
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 05:25:22 PM
 #1135

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
Entz
Full Member
***
Offline Offline

Activity: 210
Merit: 100


I not use any kind of messenger beware of scammers


View Profile
August 30, 2013, 05:27:36 PM
 #1136

Good job guys Smiley

Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
August 30, 2013, 05:29:13 PM
 #1137

Ok great! Pull request is merged in Smiley
Just sent another one...

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.
Pretty ugly solution. Just use centralized checkpoints, and you no longer will need to do something like adding 100500+ records into checkpoints.cpp.
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
August 30, 2013, 05:35:46 PM
 #1138

grabbed the upgrade, wallet is syncing as we speak Smiley
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 06:14:37 PM
 #1139

Ok great! Pull request is merged in Smiley
Just sent another one...

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.
Pretty ugly solution. Just use centralized checkpoints, and you no longer will need to do something like adding 100500+ records into checkpoints.cpp.


The massive wall of checkpoints was to help assist with syncing. As they would start down the wrong chain and have to restart to correct it. It got ugly and  I was planning on cleaning them up and doing a release pending the fix as those chains are no longer being broadcast. But you are too fast Wink

Centralized checkpoints will be my preferred method from now on next release up
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
August 30, 2013, 06:16:31 PM
 #1140

grabbed the upgrade, wallet is syncing as we speak Smiley

Not quite finished yet have to merge the other request and add a few more things. 20 minutes approx.
Pages: « 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [57] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 ... 219 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!