ahmed_bodi
|
|
February 12, 2014, 06:31:48 PM |
|
we really need a dev to check. i'll see if i can get hold of one
First couple rounds of beers/shots are on me. -Fuse im muslim i dont drink , but everyone else can have my share A halal feast is in order then. Baraka Allah. -Fuse Halal feast it is, Jazakallah
|
Bitrated user: ahmedbodi.
|
|
|
vesperwillow
|
|
February 12, 2014, 06:48:08 PM |
|
Update I was working on reviewing code, but have been pulled away because of work. If I can come back to it I will.
|
|
|
|
altcoinspool
Newbie
Offline
Activity: 56
Merit: 0
|
|
February 12, 2014, 10:00:36 PM |
|
Have you guys had a previously-confirmed block (or more than one) turn orphan hundreds or thousands of confirmations later? That's always fun.
Did I mention http://altcoinspool.com/lost-tag-coins.txt ? That's just how many confirmed blocks we lost. The sad part is, we sent about 6k to an exchange before deciding to bring them back and hold onto them. Sending the TAG to the exchange worked, and bringing them back worked. They were all orphaned the next morning.
|
|
|
|
altcoinspool
Newbie
Offline
Activity: 56
Merit: 0
|
|
February 12, 2014, 10:07:38 PM |
|
Halal feast it is, Jazakallah Suphaan Allah, May Allah be pleased with all of you for your efforts. BaraqAllahu fiqom.
|
|
|
|
ahmed_bodi
|
|
February 12, 2014, 10:31:08 PM |
|
Halal feast it is, Jazakallah Suphaan Allah, May Allah be pleased with all of you for your efforts. BaraqAllahu fiqom. Inshallah! Nice to see fellow muslims around here
|
Bitrated user: ahmedbodi.
|
|
|
ny2cafuse
Legendary
Offline
Activity: 1582
Merit: 1002
HODL for life.
|
|
February 13, 2014, 05:24:36 AM |
|
Any updates on the code investigation? I'm interested to see what's found out.
-Fuse
|
Community > Devs
|
|
|
vesperwillow
|
|
February 13, 2014, 01:50:01 PM |
|
Any updates on the code investigation? I'm interested to see what's found out.
-Fuse
From the few moments I had to glance it over, the tag difficulty/target math was almost exactly the same as in that example link. There was a function in a different order but the math appeared to be the same overall. I didn't have time to actually break all of the math out and try it. There didn't appear to be anything in place to prevent negative targetspacing, but this was just a cursory glance. Maybe I'll get time to look at it today. I almost want to just take the easy way out and set my private pool's time ahead and see what happens lol.
|
|
|
|
vesperwillow
|
|
February 13, 2014, 02:39:26 PM Last edit: February 13, 2014, 02:54:18 PM by vesperwillow |
|
Here's the TAG source code I snipped out which relates to the discussion. I don't know if it's important, but this appears to only deal with POS. The POW difficulty code is on the other side of the ELSE block, and isn't in use because we're past block 12000. Perhaps there's other code elsewhere, I'll look later.static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // minimum age for coin age (2592000s = 30d) unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // stake age of full weight (7776000s = 90d) unsigned int nStakeTargetSpacing = 4 * 60; // 4-minute block spacing (240s)
static const int64 nTargetTimespan = 2 * 60 * 60; //7200s 2 hrs static const int64 nTargetSpacingProofOfWork = 4 * 60; //240s 4 min static const int64 nTargetSpacingWorkMax = 3 * nTargetSpacingProofOfWork; //720s 12 min
int64 nTargetSpacing = fProofOfStake? nStakeTargetSpacing : min(nTargetSpacingWorkMax, (int64) nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));
//New difficulty algorithm if (nHeight >= 12000) { CBigNum bnTargetLimit = !fProofOfStake ? bnProofOfWorkLimit : bnProofOfStakeLimit;
if (pindexLast == NULL) return bnTargetLimit.GetCompact(); // genesis block
const CBlockIndex* pindexPrev = GetLastBlockIndex(pindexLast, fProofOfStake); if (pindexPrev->pprev == NULL) return bnTargetLimit.GetCompact(); // first block const CBlockIndex* pindexPrevPrev = GetLastBlockIndex(pindexPrev->pprev, fProofOfStake); if (pindexPrevPrev->pprev == NULL) return bnTargetLimit.GetCompact(); // second block
int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime();
// ppcoin: target change every block // ppcoin: retarget with exponential moving toward target spacing CBigNum bnNew; bnNew.SetCompact(pindexPrev->nBits); int64 nTargetSpacing = fProofOfStake? nStakeTargetSpacing : min(nTargetSpacingWorkMax, (int64) nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight)); int64 nInterval = nTargetTimespan / nTargetSpacing; bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing); bnNew /= ((nInterval + 1) * nTargetSpacing);
if (bnNew > bnTargetLimit) bnNew = bnTargetLimit;
return bnNew.GetCompact(); } else //Old difficulty algorithm, prior to block 12000 { if (!fProofOfStake && nHeight<390) //initial funds for distribution and promotion, keep diff low return bnProofOfWorkLimit.GetCompact(); if (!fProofOfStake && nHeight==390) //starting difficulty of 0.5 for PoW return bnInitialProofOfWorkDifficulty.GetCompact(); CBigNum bnTargetLimit = !fProofOfStake ? bnProofOfWorkLimit : bnProofOfStakeLimit;
if (pindexLast == NULL) return bnTargetLimit.GetCompact(); // genesis block
const CBlockIndex* pindexPrev = GetLastBlockIndex(pindexLast, fProofOfStake); if (pindexPrev->pprev == NULL) return bnTargetLimit.GetCompact(); // first block const CBlockIndex* pindexPrevPrev = GetLastBlockIndex(pindexPrev->pprev, fProofOfStake); if (pindexPrevPrev->pprev == NULL) return bnTargetLimit.GetCompact(); // second block CBigNum bnNew; bnNew.SetCompact(pindexPrev->nBits); if (fProofOfStake) //PoS difficulty algo. recalc every block. { int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime(); int64 nTargetSpacing = nStakeTargetSpacing; int64 nInterval = nTargetTimespan / nTargetSpacing; bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing); bnNew /= ((nInterval + 1) * nTargetSpacing); } if (!fProofOfStake) //PoW difficulty algo. recalc every interval. { int64 nInterval = nTargetTimespan / nTargetSpacingProofOfWork; // Only change once per interval if ((nHeight) % nInterval != 0) return pindexLast->nBits; // This fixes an issue where a 51% attack can change difficulty at will. // Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz int blockstogoback = nInterval-1; if ((nHeight) != nInterval) blockstogoback = nInterval;
// Go back by what we want to be the last intervals worth of blocks const CBlockIndex* pindexFirst = pindexLast; for (int i = 0; pindexFirst && i < blockstogoback; i++) pindexFirst = pindexFirst->pprev; assert(pindexFirst); // Limit adjustment step int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime(); printf(" nActualTimespan = %"PRI64d" before bounds\n", nActualTimespan); int64 nActualTimespanMax = nTargetTimespan * 1.25; int64 nActualTimespanMin = nTargetTimespan * 0.75; if (nActualTimespan < nActualTimespanMin) nActualTimespan = nActualTimespanMin; if (nActualTimespan > nActualTimespanMax) nActualTimespan = nActualTimespanMax; bnNew *= nActualTimespan; bnNew /= nTargetTimespan; }
if (bnNew > bnTargetLimit) bnNew = bnTargetLimit;
return bnNew.GetCompact(); }
And here's what appears to be part of the trust section of the protocol which we all waited for Feb 2nd for: /* Old protocol */ if (GetBlockTime() < FIX_SWITCH_TIME) { if (IsProofOfStake()) { // Return trust score as usual return (CBigNum(1)<<256) / (bnTarget+1); } else { // Calculate work amount for block CBigNum bnPoWTrust = (bnProofOfWorkLimit / (bnTarget+1)); return bnPoWTrust > 1 ? bnPoWTrust : 1; } } /* New protocol */ // Calculate work amount for block CBigNum nPoWTrust = (CBigNum(nPoWBase) / (bnTarget+1));
// Set nPowTrust to 1 if we are checking PoS block or PoW difficulty is too low nPoWTrust = (IsProofOfStake() || nPoWTrust < 1) ? 1 : nPoWTrust;
const CBlockIndex* currentIndex = pprev;
if(IsProofOfStake()) { CBigNum bnNewTrust = (CBigNum(1)<<256) / (bnTarget+1);
// Return 1/3 of score if parent block is not the PoW block if (!pprev->IsProofOfWork()) return (bnNewTrust / 3);
int nPoWCount = 0;
// Check last 12 blocks type while (pprev->nHeight - currentIndex->nHeight < 12) { if (currentIndex->IsProofOfWork()) nPoWCount++; currentIndex = currentIndex->pprev; }
// Return 1/3 of score if less than 5 PoW blocks found if (nPoWCount < 5) return (bnNewTrust / 3);
return bnNewTrust; } else { CBigNum bnLastBlockTrust = CBigNum(pprev->bnChainTrust - pprev->pprev->bnChainTrust);
// Return nPoWTrust + 3/4 of previous block score parent block is not PoS if (!pprev->IsProofOfStake()) return nPoWTrust + (3 * bnLastBlockTrust / 4);
int nPoSCount = 0;
// Check last 12 blocks type while (pprev->nHeight - currentIndex->nHeight < 12) { if (currentIndex->IsProofOfStake()) nPoSCount++; currentIndex = currentIndex->pprev; }
// Return nPoWTrust + 3/4 of previous block score if less than 4 PoS blocks found if (nPoSCount < 4) return nPoWTrust + (3 * bnLastBlockTrust / 4);
bnTarget.SetCompact(pprev->nBits);
if (bnTarget <= 0) return 0;
CBigNum bnNewTrust = (CBigNum(1)<<256) / (bnTarget+1);
// Return nPoWTrust + full trust score for previous block nBits return nPoWTrust + bnNewTrust; } }
|
|
|
|
Dabs
Legendary
Offline
Activity: 3416
Merit: 1912
The Concierge of Crypto
|
|
February 14, 2014, 03:42:42 AM |
|
Okay, what's the English version? hehe. LOL, sorry. But I'm asking for everyone else's sake, I'm a some times coder so I can attempt to figure it out.
|
|
|
|
trcwhale
Member
Offline
Activity: 84
Merit: 11
|
|
February 14, 2014, 04:47:28 PM |
|
Okay, what's the English version? hehe. LOL, sorry. But I'm asking for everyone else's sake, I'm a some times coder so I can attempt to figure it out.
I was about to say this as well. Can someone let me know what's going on? Is network still having issues. To disclose I have about 2000 TAG. Dont know what to do.
|
|
|
|
vesperwillow
|
|
February 14, 2014, 05:03:13 PM |
|
I haven't had time to look at the code, but I posted the relevant sniippets in case someone can digest the math from the code. I won't be available for the next few days, for anything other than quick message responses. Otherwise I would've looked into it..
There's still orphans occuring, not as bad as before, but it's odd how some pools seem to get waves and others don't. We're trying to look into possibilities why. I've been focused on POTcoin lately, and even with significant hash flux, it's never been an issue on that coin.
|
|
|
|
ny2cafuse
Legendary
Offline
Activity: 1582
Merit: 1002
HODL for life.
|
|
February 14, 2014, 05:20:38 PM |
|
There's still orphans occuring, not as bad as before, but it's odd how some pools seem to get waves and others don't. We're trying to look into possibilities why.
I've got an idea of why some pools aren't getting hit as hard with orphans lol. Hey, China... how's the weather over there? -Fuse
|
Community > Devs
|
|
|
ahmed_bodi
|
|
February 14, 2014, 06:33:06 PM |
|
There's still orphans occuring, not as bad as before, but it's odd how some pools seem to get waves and others don't. We're trying to look into possibilities why.
I've got an idea of why some pools aren't getting hit as hard with orphans lol. Hey, China... how's the weather over there? -Fuse whats the idea? pm?
|
Bitrated user: ahmedbodi.
|
|
|
tagbond (OP)
|
|
February 14, 2014, 07:36:50 PM |
|
AS far as I am concerned the code and the coin are fine...it seems to be fairly stable other than occasional orphans popping up on mining pools - I thought it may have something to do with not everyone being on the latest version. As for anything else nefarious, that would require a hefty chunk of the hashpower to mess with the chain, more than anyone has right now. But if anyone has any concrete info as to why the occasional orphans appear, let us know. As for the value dropping, well.. BTC has dropped quite a bit and so have most coins. Untill we have a more solid footing with merchants, we are still linked to Bitcoin, as are most coins. TAG is still moving around ok for transactions, and we are still moving ahead with developments with merchants here in the philippines as well as online via our own developments. I will let you know soon about some interesting projects coming out over the next few weeks..
|
|
|
|
vesperwillow
|
|
February 14, 2014, 07:48:29 PM |
|
AS far as I am concerned the code and the coin are fine...it seems to be fairly stable other than occasional orphans popping up on mining pools - I thought it may have something to do with not everyone being on the latest version. As for anything else nefarious, that would require a hefty chunk of the hashpower to mess with the chain, more than anyone has right now. But if anyone has any concrete info as to why the occasional orphans appear, let us know. As for the value dropping, well.. BTC has dropped quite a bit and so have most coins. Untill we have a more solid footing with merchants, we are still linked to Bitcoin, as are most coins. TAG is still moving around ok for transactions, and we are still moving ahead with developments with merchants here in the philippines as well as online via our own developments. I will let you know soon about some interesting projects coming out over the next few weeks.. Mark, there are some attacks which have been carried out in recent weeks which do not rely on hashpower. They simply rely on bandwidth. You could hold 90% of the hashpower, but if you can't talk you're dead in the water. I've also begun noticing an emerging pattern across several coin networks, with TAG being one of the hardest hit: Previously confirmed blocks going orphans. Not just hours later, not just thousands of confirms later, but we're talking days later. Completely out of nowhere, with no network hashrate change. So far the one thing they all have in common is the peculiarity of the situation. I haven't examined what each coin is based off of (to see if it's a code issue), but even if it isn't a code issue, it could in fact be network manipulation. Ghosts in the machine exist for a reason. It's understandable to have a block show up as orphan, even within a few minutes of being found, but as a coin developer/supporter, how can you explain to us blocks which are goin orphan so far after being confirmed? And one other question, why can't you have your primary developer spend 15 minutes to examine the code quoted above, to determine if the negative retarget bug may be affecting TAG? Wouldn't 15 minutes go a long way?
|
|
|
|
ahmed_bodi
|
|
February 14, 2014, 07:56:09 PM |
|
^ very true vesperwillow
|
Bitrated user: ahmedbodi.
|
|
|
crypto777
|
|
February 14, 2014, 10:07:37 PM |
|
TAGCOIN - ON POSITION 55 - TRADING ACTIVITY ON CRYPTSY.COM Here Cryptsy Live Statistics - http://live.myip.ms
|
|
|
|
tagbond (OP)
|
|
February 15, 2014, 09:59:00 AM Last edit: February 15, 2014, 10:10:11 AM by tagbond |
|
@vesperwillow - we wrote that code, and so far we don't see anything wrong with it. Can you?..As for orphans being created from old confirmed blocks, we are at a loss as to explain this. Can you say what other coins this is happening to? maxpower just created a mac version of the 1.0.5 wallet: https://www.dropbox.com/s/gyyra84qm9zcdmu/TagCoin-Qt-1.0.5-Mac.zipJust trying to push that up to the server from here in Korea, but not going up just yet...can use the link above till then..will work on the ubuntu version when I am back in the office on Tuesday.
|
|
|
|
ahmed_bodi
|
|
February 15, 2014, 05:30:38 PM |
|
@vesperwillow - we wrote that code, and so far we don't see anything wrong with it. Can you?..As for orphans being created from old confirmed blocks, we are at a loss as to explain this. Can you say what other coins this is happening to? maxpower just created a mac version of the 1.0.5 wallet: https://www.dropbox.com/s/gyyra84qm9zcdmu/TagCoin-Qt-1.0.5-Mac.zipJust trying to push that up to the server from here in Korea, but not going up just yet...can use the link above till then..will work on the ubuntu version when I am back in the office on Tuesday. the main ones that its happened to is orbitcoin, i believe android tokens, starcoin, colossuscoin and possibly others may have had this issue
|
Bitrated user: ahmedbodi.
|
|
|
tagbond (OP)
|
|
February 16, 2014, 04:26:10 AM |
|
I think that what is happening is due to old versions of the client still in use, some back to 1.0.2. Using getpeerinfo you can check that for yourself. Not a lot I can do about it except remind people to use the latest version. so as far as I am concerned the code is stable, the chain is stable and I can move forward with developments to use TAG in earnest.
|
|
|
|
|