Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: supercanada1 on June 06, 2015, 03:02:29 AM



Title: very strange program while mining altcoin
Post by: supercanada1 on June 06, 2015, 03:02:29 AM
I have mined before and worked before, I run wallet on windows 2008 server and mining x15 altcoin, it shows out of sync and:

CheckWork() : new proof-of-work block found 
  hash: 00000037e5b69926d7be0a7f3adc6917e207118e8a258a0533776501edd80bc9 
target: 00000fffff000000000000000000000000000000000000000000000000000000
CBlock(hash=00000037e5b69926d7be0a7f3adc6917e207118e8a258a0533776501edd80bc9, ver=6, hashPrevBlock=0000003f71ba75e220d7b7e34024deff26ecbf5c6401d70be448e0e7273e41d1, hashMerkleRoot=352136bc498882a6d14ddb9380d04d65f83f82212d543fc12a39cd02e6e88b5d, nTime=1433570079, nBits=1e0fffff, nNonce=377683968, vtx=1, vchBlockSig=)
  Coinbase(hash=352136bc49, nTime=1433568659, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 5e02f800)
    CTxOut(nValue=0.00, scriptPubKey=OP_DUP OP_HASH160 eef024fb8afd69f1309f42934bc6de957a81cf01 OP_EQUALVERIFY OP_CHECKSIG)
  vMerkleTree: 352136bc49
generated 0.00
ERROR: CheckBlock() : coinbase timestamp is too early
ERROR: ProcessBlock() : CheckBlock FAILED
ERROR: CheckWork() : ProcessBlock, block not accepted
connection timeout


Title: Re: very strange program while mining altcoin
Post by: achow101 on June 06, 2015, 03:20:10 AM
Just restart the clients and the miner. For some reason the timestamps get changed. See this post: https://bitcointalk.org/index.php?topic=1025299.msg11096853#msg11096853 for more details.


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 06, 2015, 03:22:41 AM
I think stopped mining for some time, and this happends


Title: Re: very strange program while mining altcoin
Post by: achow101 on June 06, 2015, 03:29:09 AM
Read the post I linked to. Here it is again: https://bitcointalk.org/index.php?topic=1025299.msg11096853#msg11096853


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 06, 2015, 04:00:32 AM
Thanks, I read this article, based on its idea, maybe the easy way to correct this is just to comment out:
if (GetBlockTime() > FutureDrift((int64_t)vtx[0].nTime))
        return DoS(50, error("CheckBlock() : coinbase timestamp is too early"));


it says some altcoin did this? actually I am testing the x15+POS coin


Title: Re: very strange program while mining altcoin
Post by: muddafudda on June 06, 2015, 02:46:17 PM
Set both PC clocks to automatically adjust to internet time.


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 07, 2015, 06:43:51 PM
thanks, on Control Panel\Clock, Language, and Region, i have set it to be automatically synchronize with 'time.windows.com', the same problem again


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 07, 2015, 06:48:34 PM
CheckWork() : new proof-of-work block found 
  hash: 00000014b5e39fa38696507f8d8f1ddaa918cb4a64396f4ef106dc64858b95ac 
target: 00000fffff000000000000000000000000000000000000000000000000000000
CBlock(hash=00000014b5e39fa38696507f8d8f1ddaa918cb4a64396f4ef106dc64858b95ac, ver=6, hashPrevBlock=000000abb9687cbc6b22dce28cf6db72e0269063d6ee262d407a6b13402a0cf4, hashMerkleRoot=8455e8e74a0ebc13d36eaa12f1fda97f717f5480ff68551a231466a6e5f5e803, nTime=1433702821, nBits=1e0fffff, nNonce=1366687808, vtx=1, vchBlockSig=)
  Coinbase(hash=8455e8e74a, nTime=1433701866, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 011102e401)
    CTxOut(nValue=0.00, scriptPubKey=OP_DUP OP_HASH160 73cf226a8646cdb8f44bbd15c911fb1adb7e3934 OP_EQUALVERIFY OP_CHECKSIG)
  vMerkleTree: 8455e8e74a
generated 0.00
ERROR: CheckBlock() : coinbase timestamp is too early
ERROR: ProcessBlock() : CheckBlock FAILED
ERROR: CheckWork() : ProcessBlock, block not accepted

same problem, I restart ubuntu, and then restart local PC, one node and one PC for testing, usually how to solve this?


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 07, 2015, 06:52:34 PM
is it possible because the hash calculation time is too long?


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 07, 2015, 07:29:18 PM
if I comment the following two lines in main.cpp, what will happen? Thanks

//if (GetBlockTime() > FutureDrift((int64_t)vtx[0].nTime))
//        return DoS(50, error("CheckBlock() : coinbase timestamp is too early"));


Title: Re: very strange program while mining altcoin
Post by: achow101 on June 07, 2015, 07:36:11 PM
Anytime you leave your miner off, you will run into the same error because of some time drift for some reason. To fix it, you must restart the nodes and the miner.

if I comment the following two lines in main.cpp, what will happen? Thanks

//if (GetBlockTime() > FutureDrift((int64_t)vtx[0].nTime))
//        return DoS(50, error("CheckBlock() : coinbase timestamp is too early"));
You would become vulnerable to a timejacking attack described here: http://culubas.blogspot.ca/2011/05/timejacking-bitcoin_802.html


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 08, 2015, 12:37:03 AM
Restart the node is hard, if there are a lot of users, how to restart nodes
Any other way to solve this problem without restarting?
If it is a pure pos coin, I can avoid this problem?
If I setup more nodes, whether this problem can be avoided?


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 08, 2015, 05:16:17 AM
or I can change in main.h:

inline int64_t FutureDrift(int64_t nTime) { return nTime + 3 * 60 * 60; } // up to 3 hour from the future

change to 3 hours better? originally it is 10 min.
does this mean I can turn off the miner for 3 hours? or any suggestion to fix this?
if I setup more nodes, it will fix this problem? actually this problem happens a lot. I think this will be the key problem for all the coins


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 08, 2015, 06:10:43 AM
i found timestamp for coinbase and CBlock, there is more than one hour difference, where is that from? I think coinbase not changed, the CBlock keep changing, make the time difference longer and longer. why this happen? how to fix? Thanks


Title: Re: very strange program while mining altcoin
Post by: muhrohmat on June 08, 2015, 02:44:49 PM
well miners are the core of bitcoin and mining its a way of producing good money but theres others and this tecnhical issue can be solved only by good technitians the porblem its not general soo the block chain its not fully affected and if you can overcome this singural porblem and move to a contionus mining do it and try to figure out later this incident dont waste time on one error but in active mining it self


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 08, 2015, 02:50:24 PM
Thanks, I think maybe bitcoin does not have this problem is because there are too many nodes?
So if I set up a few more nodes in the altcoin I can avoid this problem?
For altcoin, keep mining is not easy since there are not so many users, if I change it go pos, can I avoid the error?


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 09, 2015, 04:22:47 AM
is this because the mining time is too long? so the nTime of coinbase is much difference from the current time.
what means coinbase?


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 09, 2015, 07:17:54 PM
inline int64_t FutureDrift(int64_t nTime) { return nTime + 10 * 60; } // up to 3 hour from the future

this is in main.h,
if I change 3 * 60 * 60 to 1 or 2 days, that will be better? since I found the out sync problem maybe because the coin is not mined by many people, also stop mining too often


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 11, 2015, 02:12:12 PM
Any idea? This will also be the same for pos?


Title: Re: very strange program while mining altcoin
Post by: billotronic on June 12, 2015, 03:53:25 AM
Sadly, I do not know the answer to your problem. I would guess that you would want to keep it in the range of minutes and not days

In other news, a suggestion.

Ok, we understand you are working on a coin. It would be a lot more productive for both you and us who are half willing to try and help you, if you had just one thread instead of making a gazillion threads for each question. Things are cluttered enough around here and it would probably help you to get some help from the folks here. Food for thought.


Title: Re: very strange program while mining altcoin
Post by: supercanada1 on June 12, 2015, 03:59:23 AM
thanks