defaced
Legendary
Offline
Activity: 2198
Merit: 1014
Franko is Freedom
|
|
April 08, 2014, 01:09:07 PM |
|
Edit: For the sake of possible future readers, rather than handing them a fully baked solution, I will just give outline of the procedure. Y'know. give man a fish / teach him to fish and so on... So if you want to get a new genesis block out of Darkcoin that uses X11 or any coin at all that has been forked out of Bitcoin, here are the steps, most of which can be inferred from this thread also. You need to change szTimesstamp and nTime. Zero the nonce, merkle root and old genesis block. Compile and run. Boom. Here's the genesis block and merkle root as they come from the printf statements in InitBlockIndex(). If you substitute them into the code, your gen block will be accepted, but you will run into this: hash doesn't match nBits. The code snippet (see above) that begins with if (true && block.GetHash() != hashGenesisBlock)
will help you to find the right hash and nBits. You just need to read what it does. It is looping an algorithm and increasing nonce to find a block that satisfies the difficulty. I.e. it is mining. Is it running scrypt? No it isn't, this is X11, so get rid of all that. Where do you get the X11 algorithm? Take a look at the error message you're getting. That should be enough... I think this is the best way to handle it. Teaching people to fish that is.
|
|
|
|
apple_talk
Sr. Member
Offline
Activity: 473
Merit: 250
"Proof-of-Asset Protocol"
|
|
April 08, 2014, 08:42:48 PM |
|
did not work, it failed.
Worked for me. What error report? PM you error message yesterday.btw, found X11 relate gen code, not sure if this is valid... if (true && block.GetHash() != hashGenesisBlock) { printf("Searching for genesis block...\n"); uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); uint256 thash;
loop { thash = block.GetHash(); if (thash <= hashTarget) break; if ((block.nNonce & 0xFFF) == 0) { printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str()); } ++block.nNonce; if (block.nNonce == 0) { printf("NONCE WRAPPED, incrementing time\n"); ++block.nTime; } } printf("block.nTime = %u \n", block.nTime); printf("block.nNonce = %u \n", block.nNonce); printf("block.nVersion = %u \n", block.nVersion); printf("block.GetHash = %s\n", block.GetHash().ToString().c_str()); } //// debug print uint256 hash = block.GetHash(); printf("%s\n", hash.ToString().c_str()); printf("%s\n", hashGenesisBlock.ToString().c_str()); printf("%s\n", block.hashMerkleRoot.ToString().c_str()); assert(block.hashMerkleRoot == uint256("0x"));
|
|
|
|
YarkoL
Legendary
Offline
Activity: 996
Merit: 1013
|
|
April 08, 2014, 09:10:45 PM |
|
apple_talk: replied to your pm btw, found X11 relate gen code, not sure if this is valid...
Why not try and see?
|
“God does not play dice"
|
|
|
joblessminer
|
|
April 09, 2014, 05:08:57 PM |
|
I think this is the best way to handle it. Teaching people to fish that is.
Haha... you are part of some jealous assh#ole herd, I see assh## like you never help anyone & can't stand anyone else helping out as well. If anyone needs help with genesis please contact me, I will help out for free.
|
|
|
|
anush3070
Member
Offline
Activity: 111
Merit: 10
|
|
April 15, 2014, 09:21:21 AM |
|
Hello, You can use this Code to find Genesis Block for N-Scrypt, Insert it before ///debug print comment which would be near hashMerkleRoot and compile ^_^: if (true &&block.GetHash() != hashGenesisBlock) { printf("Searching for genesis block...\n"); // This will figure out a valid hash and Nonce if you're // creating a different genesis block: uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); uint256 thash;
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(block.nTime) + 1)) * 128 ) + 63; char scratchpad[scrypt_scratpad_size_current_block];
loop { // Generic scrypt scrypt_N_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad, GetNfactor(block.nTime));
if (thash <= hashTarget) { printf ("found it!\n"); break; } if ((block.nNonce & 0xFFF) == 0) { printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str()); } ++block.nNonce; if (block.nNonce == 0) { printf("NONCE WRAPPED, incrementing time\n"); ++block.nTime; } } }
|
CLOSED!
Only Existing Customers will be Served.
|
|
|
nesticely
Newbie
Offline
Activity: 15
Merit: 0
|
|
April 18, 2014, 08:17:48 AM |
|
I have the following problem - when I compile daemon based on fehcoin (with pszTimestamp, block.nTime etc. changes) and I run it, I get empty nNonce: Loading block index... CBlock(hash=c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2, nTime=1388419211, nBits=1f00ffff, nNonce=0, vtx=1, vchBlockSig=) Coinbase(hash=25cc2e3283, nTime=1375995262, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d020f272957687920776f756c6420796f75206e65656420426974207768656e20796f7520686176652053776167) CTxOut(empty) vMerkleTree: 25cc2e3283 block.GetHash() == c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f block.hashMerkleRoot == 25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2 block.nTime = 1388419211 block.nNonce = 0 block.nNonce = 0 Why is this happening?
|
|
|
|
anush3070
Member
Offline
Activity: 111
Merit: 10
|
|
April 18, 2014, 08:22:01 AM |
|
I have the following problem - when I compile daemon based on fehcoin (with pszTimestamp, block.nTime etc. changes) and I run it, I get empty nNonce: Loading block index... CBlock(hash=c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2, nTime=1388419211, nBits=1f00ffff, nNonce=0, vtx=1, vchBlockSig=) Coinbase(hash=25cc2e3283, nTime=1375995262, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d020f272957687920776f756c6420796f75206e65656420426974207768656e20796f7520686176652053776167) CTxOut(empty) vMerkleTree: 25cc2e3283 block.GetHash() == c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f block.hashMerkleRoot == 25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2 block.nTime = 1388419211 block.nNonce = 0 block.nNonce = 0 Why is this happening? Do This Modification in the Code: Hello, You can use this Code to find Genesis Block for N-Scrypt, Insert it before ///debug print comment which would be near hashMerkleRoot and compile ^_^: if (true &&block.GetHash() != hashGenesisBlock) { printf("Searching for genesis block...\n"); // This will figure out a valid hash and Nonce if you're // creating a different genesis block: uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); uint256 thash;
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(block.nTime) + 1)) * 128 ) + 63; char scratchpad[scrypt_scratpad_size_current_block];
loop { // Generic scrypt scrypt_N_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad, GetNfactor(block.nTime));
if (thash <= hashTarget) { printf ("found it!\n"); break; } if ((block.nNonce & 0xFFF) == 0) { printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str()); } ++block.nNonce; if (block.nNonce == 0) { printf("NONCE WRAPPED, incrementing time\n"); ++block.nTime; } } }
|
CLOSED!
Only Existing Customers will be Served.
|
|
|
nesticely
Newbie
Offline
Activity: 15
Merit: 0
|
|
April 18, 2014, 06:06:04 PM |
|
I have the following problem - when I compile daemon based on fehcoin (with pszTimestamp, block.nTime etc. changes) and I run it, I get empty nNonce: Loading block index... CBlock(hash=c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2, nTime=1388419211, nBits=1f00ffff, nNonce=0, vtx=1, vchBlockSig=) Coinbase(hash=25cc2e3283, nTime=1375995262, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d020f272957687920776f756c6420796f75206e65656420426974207768656e20796f7520686176652053776167) CTxOut(empty) vMerkleTree: 25cc2e3283 block.GetHash() == c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f block.hashMerkleRoot == 25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2 block.nTime = 1388419211 block.nNonce = 0 block.nNonce = 0 Why is this happening? Do This Modification in the Code: Hello, You can use this Code to find Genesis Block for N-Scrypt, Insert it before ///debug print comment which would be near hashMerkleRoot and compile ^_^: if (true &&block.GetHash() != hashGenesisBlock) { printf("Searching for genesis block...\n"); // This will figure out a valid hash and Nonce if you're // creating a different genesis block: uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); uint256 thash;
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(block.nTime) + 1)) * 128 ) + 63; char scratchpad[scrypt_scratpad_size_current_block];
loop { // Generic scrypt scrypt_N_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad, GetNfactor(block.nTime));
if (thash <= hashTarget) { printf ("found it!\n"); break; } if ((block.nNonce & 0xFFF) == 0) { printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str()); } ++block.nNonce; if (block.nNonce == 0) { printf("NONCE WRAPPED, incrementing time\n"); ++block.nTime; } } } thank
|
|
|
|
hadi
|
|
May 26, 2014, 09:36:59 AM |
|
Hey... My x11 source code is //// debug print uint256 hash = block.GetHash(); printf("%s\n", hash.ToString().c_str()); printf("%s\n", hashGenesisBlock.ToString().c_str()); printf("%s\n", block.hashMerkleRoot.ToString().c_str()); assert(block.hashMerkleRoot == uint256("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7")); block.print(); assert(hash == hashGenesisBlock); i cant get hashGenesisBlock. after compiling with true time and hash,just recieve this error " failed to read block " what i do ?
|
|
|
|
voileipa
Member
Offline
Activity: 116
Merit: 10
|
|
May 26, 2014, 10:01:46 AM |
|
Hey... My x11 source code is //// debug print uint256 hash = block.GetHash(); printf("%s\n", hash.ToString().c_str()); printf("%s\n", hashGenesisBlock.ToString().c_str()); printf("%s\n", block.hashMerkleRoot.ToString().c_str()); assert(block.hashMerkleRoot == uint256("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7")); block.print(); assert(hash == hashGenesisBlock); i cant get hashGenesisBlock. after compiling with true time and hash,just recieve this error " failed to read block " what i do ? At first you should check the debug log for more specific error information.
|
|
|
|
PereguineBerty
Member
Offline
Activity: 109
Merit: 35
|
|
May 26, 2014, 08:27:05 PM |
|
See what you guys mean with X11 errors. I've played around with Scrypt in the past and it's pretty much plain sailing but with x11 PoS it's been an absolute nightmare so far... Even after getting what appears to be valid merkle root, nonce and genesis hash, it still fails when running on both testnet and main-net with this error: Assertion `block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)' failed. I've taken Yarkol's advice and it has been pretty helpful but if the debug.log clearly states these values and no other errors, then I'm a loss as to why the genesis blocks aren't being created. Opened LevelDB successfully CBlock(hash=000030b4df1fca238412d3acb536f920fb3fe4fc2b1255c40e78d54ac791e1ac, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=00f5217426974f0aae85ef32ed69f99543993ebb8e995c4089febecd87f5e1b5, nTime=1401124588, nBits=1f00ffff, nNonce=29392, vtx=1, vchBlockSig=) Coinbase(hash=00f5217426, nTime=1401124588, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 00012a4154686973206973206f6e652070656173616e7473207265766f6c742074686174204272757373656c732063616e6e6f74206a757374206272757368206173696465) CTxOut(empty) vMerkleTree: 00f5217426 block.GetHash() == 000030b4df1fca238412d3acb536f920fb3fe4fc2b1255c40e78d54ac791e1ac block.hashMerkleRoot == 00f5217426974f0aae85ef32ed69f99543993ebb8e995c4089febecd87f5e1b5 block.nTime = 1401124588 block.nNonce = 29392 CBlock(hash=000030b4df1fca238412d3acb536f920fb3fe4fc2b1255c40e78d54ac791e1ac, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=00f5217426974f0aae85ef32ed69f99543993ebb8e995c4089febecd87f5e1b5, nTime=1401124588, nBits=1f00ffff, nNonce=29392, vtx=1, vchBlockSig=) Coinbase(hash=00f5217426, nTime=1401124588, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 00012a4154686973206973206f6e652070656173616e7473207265766f6c742074686174204272757373656c732063616e6e6f74206a757374206272757368206173696465) CTxOut(empty) vMerkleTree: 00f5217426 The testnet (the output above) and main-net genesis hashes have been added into main.h but it still fails to run?
|
|
|
|
hadi
|
|
May 27, 2014, 10:17:54 AM |
|
i dont know why i have not " block.GetHash() == 000030b4df1fca238412d3acb536f920fb3fe4fc2b1255c40e78d54ac791e1ac" section in my debug.log in x11 algorytm. here is my main.cpp // Only add the genesis block if not reindexing (in which case we reuse the one already on disk) if (!fReindex) { // Genesis Block: // CBlock(hash=12a765e31ffd4059bada, PoW=0000050c34a64b415b6b, ver=1, hashPrevBlock=00000000000000000000, hashMerkleRoot=97ddfbbae6, nTime=1317972665, nBits=1e0ffff0, nNonce=2084524493, vtx=1) // CTransaction(hash=97ddfbbae6, ver=1, vin.size=1, vout.size=1, nLockTime=0) // CTxIn(COutPoint(0000000000, -1), coinbase 04ffff001d0104404e592054696d65732030352f4f63742f32303131205374657665204a6f62732c204170706c65e280997320566973696f6e6172792c2044696573206174203536) // CTxOut(nValue=50.00000000, scriptPubKey=040184710fa689ad5023690c80f3a4) // vMerkleTree: 97ddfbbae6
// Genesis block const char* pszTimestamp = "Coindesk 27/May/2014 Facebook-Integrated Wallet Makes Sending Bitcoin as Easy as Messaging"; CTransaction txNew; txNew.vin.resize(1); txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); txNew.vout[0].nValue = 50 * COIN; txNew.vout[0].scriptPubKey = CScript() << ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG; CBlock block; block.vtx.push_back(txNew); block.hashPrevBlock = 0; block.hashMerkleRoot = block.BuildMerkleTree(); block.nVersion = 1; block.nTime = 1401181723; block.nBits = 0x1e0ffff0; block.nNonce = 0;
if (fTestNet) { block.nTime = 1401181723; block.nNonce = 3861367235; }
//// debug print uint256 hash = block.GetHash(); printf("%s\n", hash.ToString().c_str()); printf("%s\n", hashGenesisBlock.ToString().c_str()); printf("%s\n", block.hashMerkleRoot.ToString().c_str()); assert(block.hashMerkleRoot == uint256("0x25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e")); block.print(); assert(hash == hashGenesisBlock);
// Start new block file try { unsigned int nBlockSize = ::GetSerializeSize(block, SER_DISK, CLIENT_VERSION); CDiskBlockPos blockPos; CValidationState state; if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.nTime)) return error("LoadBlockIndex() : FindBlockPos failed"); if (!block.WriteToDisk(blockPos)) return error("LoadBlockIndex() : writing genesis block to disk failed"); if (!block.AddToBlockIndex(state, blockPos)) return error("LoadBlockIndex() : genesis block not accepted"); } catch(std::runtime_error &e) { return error("LoadBlockIndex() : failed to initialize block database: %s", e.what()); } }
return true; } and my wallet closed with Failed to read block and my debug.log is 2014-05-27 09:31:24
2014-05-27 09:31:24 DarkCoin version v0.9.4.8-gd1aadc8-beta (Sun, 25 May 2014 14:08:31 -0700) 2014-05-27 09:31:24 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014 2014-05-27 09:31:24 Default data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 09:31:24 Using data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 09:31:24 Using at most 125 connections (2048 file descriptors available) 2014-05-27 09:31:24 Using 4 threads for script verification 2014-05-27 09:31:24 init message: Verifying wallet... 2014-05-27 09:31:24 dbenv.open LogDir=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\database ErrorFile=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\db.log 2014-05-27 09:31:24 Bound to [::]:47258 2014-05-27 09:31:24 Bound to 0.0.0.0:47258 2014-05-27 09:31:24 init message: Loading block index... 2014-05-27 09:31:24 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\blocks\index 2014-05-27 09:31:24 Opened LevelDB successfully 2014-05-27 09:31:24 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\chainstate 2014-05-27 09:31:24 Opened LevelDB successfully 2014-05-27 09:31:24 LoadBlockIndexDB(): last block file = 0 2014-05-27 09:31:24 LoadBlockIndexDB(): transaction index disabled 2014-05-27 09:31:24 Initializing databases... 2014-05-27 09:31:24 39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7 2014-05-27 09:31:24 00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 2014-05-27 09:31:24 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 09:46:05
2014-05-27 09:46:05 DarkCoin version v0.9.4.8-gd1aadc8-beta (Sun, 25 May 2014 14:08:31 -0700) 2014-05-27 09:46:05 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014 2014-05-27 09:46:05 Default data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 09:46:05 Using data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 09:46:05 Using at most 125 connections (2048 file descriptors available) 2014-05-27 09:46:05 Using 4 threads for script verification 2014-05-27 09:46:05 init message: Verifying wallet... 2014-05-27 09:46:05 dbenv.open LogDir=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\database ErrorFile=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\db.log 2014-05-27 09:46:05 Bound to [::]:47258 2014-05-27 09:46:05 Bound to 0.0.0.0:47258 2014-05-27 09:46:05 init message: Loading block index... 2014-05-27 09:46:05 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\blocks\index 2014-05-27 09:46:05 Opened LevelDB successfully 2014-05-27 09:46:05 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\chainstate 2014-05-27 09:46:05 Opened LevelDB successfully 2014-05-27 09:46:05 LoadBlockIndexDB(): last block file = 0 2014-05-27 09:46:05 LoadBlockIndexDB(): transaction index disabled 2014-05-27 09:46:05 Initializing databases... 2014-05-27 09:46:05 39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7 2014-05-27 09:46:05 00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 2014-05-27 09:46:05 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 09:46:05 CBlock(hash=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, input=0100000000000000000000000000000000000000000000000000000000000000000000005e772513d42435d9871208955bb543a61e4e44f4e7ea0f99f8a3c237205a612526558453f0ff0f1e00000000, PoW=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, nTime=1401181478, nBits=1e0ffff0, nNonce=0, vtx=1) 2014-05-27 09:46:05 CTransaction(hash=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01044c5a436f696e6465736b2032372f4d61792f323031342046616365626f6f6b2d496e74656772617465642057616c6c6574204d616b65732053656e64696e6720426974636f696e2061732045617379206173204d6573736167696e67) CTxOut(nValue=50.00000000, scriptPubKey=040184710fa689ad5023690c80f3a4) vMerkleTree: 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 10:04:49
2014-05-27 10:04:49 DarkCoin version v0.9.4.8-gd1aadc8-beta (Sun, 25 May 2014 14:08:31 -0700) 2014-05-27 10:04:49 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014 2014-05-27 10:04:49 Default data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 10:04:49 Using data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 10:04:49 Using at most 125 connections (2048 file descriptors available) 2014-05-27 10:04:49 Using 4 threads for script verification 2014-05-27 10:04:49 init message: Verifying wallet... 2014-05-27 10:04:49 dbenv.open LogDir=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\database ErrorFile=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\db.log 2014-05-27 10:04:49 Bound to [::]:47258 2014-05-27 10:04:49 Bound to 0.0.0.0:47258 2014-05-27 10:04:49 init message: Loading block index... 2014-05-27 10:04:49 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\blocks\index 2014-05-27 10:04:49 Opened LevelDB successfully 2014-05-27 10:04:49 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\chainstate 2014-05-27 10:04:49 Opened LevelDB successfully 2014-05-27 10:04:49 LoadBlockIndexDB(): last block file = 0 2014-05-27 10:04:49 LoadBlockIndexDB(): transaction index disabled 2014-05-27 10:04:49 Initializing databases... 2014-05-27 10:04:49 39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7 2014-05-27 10:04:49 00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 2014-05-27 10:04:49 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 10:04:49 CBlock(hash=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, input=0100000000000000000000000000000000000000000000000000000000000000000000005e772513d42435d9871208955bb543a61e4e44f4e7ea0f99f8a3c237205a612526558453f0ff0f1e00000000, PoW=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, nTime=1401181478, nBits=1e0ffff0, nNonce=0, vtx=1) 2014-05-27 10:04:49 CTransaction(hash=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01044c5a436f696e6465736b2032372f4d61792f323031342046616365626f6f6b2d496e74656772617465642057616c6c6574204d616b65732053656e64696e6720426974636f696e2061732045617379206173204d6573736167696e67) CTxOut(nValue=50.00000000, scriptPubKey=040184710fa689ad5023690c80f3a4) vMerkleTree: 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 10:09:53
2014-05-27 10:09:53 DarkCoin version v0.9.4.8-gd1aadc8-beta (Sun, 25 May 2014 14:08:31 -0700) 2014-05-27 10:09:53 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014 2014-05-27 10:09:53 Default data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 10:09:53 Using data directory C:\Users\hadixxx7\AppData\Roaming\DarkCoin 2014-05-27 10:09:53 Using at most 125 connections (2048 file descriptors available) 2014-05-27 10:09:53 Using 4 threads for script verification 2014-05-27 10:09:53 init message: Verifying wallet... 2014-05-27 10:09:53 dbenv.open LogDir=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\database ErrorFile=C:\Users\hadixxx7\AppData\Roaming\DarkCoin\db.log 2014-05-27 10:09:53 Bound to [::]:47258 2014-05-27 10:09:53 Bound to 0.0.0.0:47258 2014-05-27 10:09:53 init message: Loading block index... 2014-05-27 10:09:53 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\blocks\index 2014-05-27 10:09:53 Opened LevelDB successfully 2014-05-27 10:09:53 Opening LevelDB in C:\Users\hadixxx7\AppData\Roaming\DarkCoin\chainstate 2014-05-27 10:09:53 Opened LevelDB successfully 2014-05-27 10:09:53 LoadBlockIndexDB(): last block file = 0 2014-05-27 10:09:53 LoadBlockIndexDB(): transaction index disabled 2014-05-27 10:09:53 Initializing databases... 2014-05-27 10:09:53 39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7 2014-05-27 10:09:53 39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7 2014-05-27 10:09:53 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 10:09:53 CBlock(hash=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, input=0100000000000000000000000000000000000000000000000000000000000000000000005e772513d42435d9871208955bb543a61e4e44f4e7ea0f99f8a3c237205a612526558453f0ff0f1e00000000, PoW=39a05234cb649f06386c80fa1469b84d4e8fc806d2e91f3348cdaa6ef72e26d7, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, nTime=1401181478, nBits=1e0ffff0, nNonce=0, vtx=1) 2014-05-27 10:09:53 CTransaction(hash=25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01044c5a436f696e6465736b2032372f4d61792f323031342046616365626f6f6b2d496e74656772617465642057616c6c6574204d616b65732053656e64696e6720426974636f696e2061732045617379206173204d6573736167696e67) CTxOut(nValue=50.00000000, scriptPubKey=040184710fa689ad5023690c80f3a4) vMerkleTree: 25615a2037c2a3f8990feae7f4444e1ea643b55b95081287d93524d41325775e 2014-05-27 10:09:53 Pre-allocating up to position 0x1000000 in blk00000.dat 2014-05-27 10:09:53 ERROR: CheckProofOfWork() : hash doesn't match nBits 2014-05-27 10:09:53 ERROR: CBlock::ReadFromDisk() : errors in block header 2014-05-27 10:09:53 *** Failed to read block 2014-05-27 10:09:55 ERROR: LoadBlockIndex() : genesis block not accepted 2014-05-27 10:09:55 Shutdown : In progress... 2014-05-27 10:09:55 StopNode() 2014-05-27 10:09:55 Flushed 0 addresses to peers.dat 16ms 2014-05-27 10:09:55 Committing 0 changed transactions to coin database... 2014-05-27 10:09:55 Shutdown : done
any idea about working ? i recompile it over 10 times
|
|
|
|
YarkoL
Legendary
Offline
Activity: 996
Merit: 1013
|
|
May 27, 2014, 11:19:02 AM |
|
@PereguineBerty It's hard to say what the issue exactly is, but hardly a x11 error if you haven't got past the hash identity assertion yet. Maybe you could start by simplifying this a little !fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet) i.e scrap the ternary operator, feed straight values into it so you can begin to track down why the block hash isn't the same as your gen block hash
|
“God does not play dice"
|
|
|
PereguineBerty
Member
Offline
Activity: 109
Merit: 35
|
|
May 27, 2014, 08:10:25 PM |
|
Thanks for the info YarkoL. I managed to get it working fine today. After doing the same thing a long time ago with Scrypt, I recollect it taking a while to grind through a range of hashes and nonces. Thought this was going to happen again and it threw me off the trail because all the correct stuff was there instantly and it seemed too good to be true, so I ignored it (stupidly) Got issues with segmentation faults and missing setgenerate RPC commands now. Oh happy days!!!
|
|
|
|
YarkoL
Legendary
Offline
Activity: 996
Merit: 1013
|
|
May 27, 2014, 08:17:39 PM |
|
Yeah X11 is more cpu-friendly
|
“God does not play dice"
|
|
|
PereguineBerty
Member
Offline
Activity: 109
Merit: 35
|
|
May 27, 2014, 08:23:28 PM |
|
Hehe.. detecting a subtle hint of sarcasm there
|
|
|
|
e1ghtSpace
Legendary
Offline
Activity: 1540
Merit: 1001
Crypto since 2014
|
|
June 14, 2014, 09:26:46 PM |
|
Can someone please help me? This is what I have in main.cpp: const char* pszTimestamp = "14 June 2014 Soceroos lose to Chile 3-1 in FIFA world cup"; CTransaction txNew; txNew.nTime = 1402712622; txNew.vin.resize(1); txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 0 << CBigNum(42) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); txNew.vout[0].SetEmpty(); CBlock block; block.vtx.push_back(txNew); block.hashPrevBlock = 0; block.hashMerkleRoot = 0; block.nVersion = 0; block.nTime = 0; block.nBits = 0; block.nNonce = 0;
//// debug print assert(block.hashMerkleRoot == uint256("0x0")); block.print(); assert(block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); assert(block.CheckBlock()); And in debug.log all I get is: CBlock(hash=694b3a55a61339b43c01421b13f710e22e33a7eabda1cd48103bb9f376081d16, ver=0, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=0000000000000000000000000000000000000000000000000000000000000000, nTime=0, nBits=00000000, nNonce=0, vtx=1, vchBlockSig=) Coinbase(hash=b89a899f43, nTime=1402712622, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(0000000000, 4294967295), coinbase 00012a393134204a756e65203230313420536f6365726f6f73206c6f736520746f204368696c6520332d3120696e204649464120776f726c6420637570) CTxOut(empty) vMerkleTree: What did I do wrong? (i'm trying to replace 0x0 with the Merkle Root)
|
|
|
|
YarkoL
Legendary
Offline
Activity: 996
Merit: 1013
|
|
June 14, 2014, 11:46:48 PM |
|
try moving the block.print() statement before the assertion
|
“God does not play dice"
|
|
|
Restincoin
Newbie
Offline
Activity: 18
Merit: 0
|
|
June 21, 2014, 09:33:38 PM |
|
I hope someone can help me out with my pb I got genesisblock on testnet, I try to test mining my testnet coins. I use 2 computers with each one ubuntu VM and different IP. I launch daemon and I try to get my PCs connected I use the following cmd: ./myCoind -testnet with following config: rpcuser=user rpcpassword=pass server=1 addnode=ip_PC1 addnode=ip_PC2 rpcport=xxxxx listen=1 My pb is i can't get connections with PC1 and PC2. "walletversion" : 60000, "balance" : 0.00000000, "newmint" : 0.00000000, "stake" : 0.00000000, "blocks" : 0, "timeoffset" : 0, "moneysupply" : 0.00000000, "connections" : 0, "proxy" : "", "ip" : "0.0.0.0", "difficulty" : {
In debug.log I have trying connection ip_PC1:xxxxx lastseen=0.9hrs connection timeout trying connection ip_PC1:xxxxx lastseen=0.9hrs connection timeout trying connection ip_PC1:xxxxx lastseen=0.9hrs connection timeout I don't know if i need to configure port forward in VM or my internet box. There is something I can check that will help me spot where the pb is coming from ? thnks
|
|
|
|
haggis
|
|
June 21, 2014, 09:37:06 PM |
|
Can they ping each other? Ports blocked?
|
|
|
|
|