Pages:
Author

Topic: very strange program while mining altcoin (Read 2099 times)

sr. member
Activity: 798
Merit: 253
June 11, 2015, 10:59:23 PM
#21
thanks
legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
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.
sr. member
Activity: 798
Merit: 253
Any idea? This will also be the same for pos?
sr. member
Activity: 798
Merit: 253
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
sr. member
Activity: 798
Merit: 253
is this because the mining time is too long? so the nTime of coinbase is much difference from the current time.
what means coinbase?
sr. member
Activity: 798
Merit: 253
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?
sr. member
Activity: 252
Merit: 250
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
sr. member
Activity: 798
Merit: 253
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
sr. member
Activity: 798
Merit: 253
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
sr. member
Activity: 798
Merit: 253
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?
staff
Activity: 3458
Merit: 6793
Just writing some code
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
sr. member
Activity: 798
Merit: 253
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"));
sr. member
Activity: 798
Merit: 253
is it possible because the hash calculation time is too long?
sr. member
Activity: 798
Merit: 253
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?
sr. member
Activity: 798
Merit: 253
thanks, on Control Panel\Clock, Language, and Region, i have set it to be automatically synchronize with 'time.windows.com', the same problem again
legendary
Activity: 1008
Merit: 1022
Set both PC clocks to automatically adjust to internet time.
sr. member
Activity: 798
Merit: 253
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
staff
Activity: 3458
Merit: 6793
Just writing some code
Read the post I linked to. Here it is again: https://bitcointalksearch.org/topic/m.11096853
sr. member
Activity: 798
Merit: 253
I think stopped mining for some time, and this happends
staff
Activity: 3458
Merit: 6793
Just writing some code
Just restart the clients and the miner. For some reason the timestamps get changed. See this post: https://bitcointalksearch.org/topic/m.11096853 for more details.
Pages:
Jump to: