Pages:
Author

Topic: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] - page 2. (Read 11788 times)

legendary
Activity: 996
Merit: 1013
And most importantly: learn to code so you know what you are doing.

It doesn't matter right now when you're playing with the technology, but if you're serious about crypto,
decent programming skills are a must.
newbie
Activity: 52
Merit: 0
Testing... seems wonderful! Cheesy

UPDATE:

Hi,

didn't read all the thread. But this will help you with Litecoin clients:

(this work only if you already did the basis (=change your timestamp, ntime, ect...) and ready to mine your merkle/genesis.)

- Open main.cpp
- Go to "bool InitBlockIndex()"
- Search "block.print();"
- ABOVE, you copy this:

Code:
	// This part was used to generate the genesis block.
// Uncomment to use it again.

// If genesis block hash does not match, then generate new genesis hash.
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;
char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
loop
{
#if defined(USE_SSE2)
// Detection would work, but in cases where we KNOW it always has SSE2,
// it is faster to use directly than to use a function pointer or conditional.
#if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__))
// Always SSE2: x86_64 or Intel MacOS X
scrypt_1024_1_1_256_sp_sse2(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#else
// Detect SSE2: 32bit x86 Linux or Windows
scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
#else
// Generic scrypt
scrypt_1024_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
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.GetHash = %s\n", block.GetHash().ToString().c_str());
}

This is a script that doing all the annoying job for you.
How to use it ?

- First you need to empty your merkleroot, genesis and nnonce (merkle = "0x", genesis="0x", nonce=0.
- Then you compil and start the client.
- The client will show an error but show the merkleroot.
- Now change you merkle root variable for your new one.
- Compil again and start again.
- Your client will try to mine your genesis block, this operation can be very fast as she can be very slow.
- After this, the client will show again an error but give you the genesis (gethash) and nonce.
- reopen your client script, change the genesis and nonce (and verify your ntime).
- REMOVE the script I gave you (or comment).
- Compil and enjoy Wink

I don't know if someone got the bounty, but i'm not looking after, just helping =)

I make this steps but when I open the client do not show the MerkleRoot that you say - The client will show an error but show the merkleroot. but I copy the Merkle that have on debug.log and now I will compile.. I will send news.

Thanks

NEW UPDATE - REASON: TESTS

https://i.imgur.com/wP8La8b.jpg

Why I receive this error?

My debug.log file:
Code:
2014-04-11 18:44:00 



















2014-04-11 18:44:00 XXX version v0.8.6.2-g10d589b-beta (Thu, 3 Apr 2014 21:58:44 -1000)
2014-04-11 18:44:00 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014
2014-04-11 18:44:00 Default data directory C:\Users\Leandro\AppData\Roaming\XXX
2014-04-11 18:44:00 Using data directory C:\Users\Leandro\AppData\Roaming\XXX
2014-04-11 18:44:00 Using at most 125 connections (2048 file descriptors available)
2014-04-11 18:44:00 Using 2 threads for script verification
2014-04-11 18:44:00 init message: Verificando carteira...
2014-04-11 18:44:00 dbenv.open LogDir=C:\Users\Leandro\AppData\Roaming\XXX\database ErrorFile=C:\Users\Leandro\AppData\Roaming\XXX\db.log
2014-04-11 18:44:00 Bound to [::]:25991
2014-04-11 18:44:00 Bound to 0.0.0.0:25991
2014-04-11 18:44:00 init message: Carregando índice de blocos...
2014-04-11 18:44:00 Opening LevelDB in C:\Users\Leandro\AppData\Roaming\XXX\blocks\index
2014-04-11 18:44:00 Opened LevelDB successfully
2014-04-11 18:44:00 Opening LevelDB in C:\Users\Leandro\AppData\Roaming\XXX\chainstate
2014-04-11 18:44:00 Opened LevelDB successfully
2014-04-11 18:44:00 LoadBlockIndexDB(): last block file = 0
2014-04-11 18:44:00 LoadBlockIndexDB(): transaction index disabled
2014-04-11 18:44:00 Initializing databases...
2014-04-11 18:44:00 b103277b47c133eeb6b58486d9bec984dee754bfda81010844221637e58113b9
2014-04-11 18:44:00 0000000000000000000000000000000000000000000000000000000000000000
2014-04-11 18:44:00 53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29
2014-04-11 18:44:00 CBlock(hash=b103277b47c133eeb6b58486d9bec984dee754bfda81010844221637e58113b9, input=010000000000000000000000000000000000000000000000000000000000000000000000298a6f76913c06f26c3a0b57a7f59f72fd553bb9901529e0324bc43ffd4ce55399004853f0ff0f1e00000000, PoW=daf38cbceaac5a570916ae3b11bcb32ce288631677bad01fe41b54978af520ba, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29, nTime=1397227673, nBits=1e0ffff0, nNonce=0, vtx=1)
2014-04-11 18:44:00   CTransaction(hash=53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d010444323031342f30342f313120427564676574204368696566204973204f62616d61e28099732043686f696365206173204e6577204865616c7468205365637265746172792e)
    CTxOut(nValue=3.00000000, scriptPubKey=04678afdb0fe5548271967f1a67130)
  vMerkleTree: 53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29

Thanks

New Update - REASON: Other error

So, I've cleaned the Merkle and the Genesis to 0x and now I receive this message:
https://i.imgur.com/2oxYYI3.jpg

Your missing a step from the guide, re-read it closely. Just mind you, if you intent to release a coin; know that it will change your life - don't take short cuts, and always be professional (my 2 cents) That being said...You need to populate your 0x lines after error one.

1) Restart
2) New TimeStamp
3) 0x
4) Error
5) Populate
6) Follow guide Wink
sr. member
Activity: 364
Merit: 250
Twitter: @leandrogmachado
Testing... seems wonderful! Cheesy

UPDATE:

Hi,

didn't read all the thread. But this will help you with Litecoin clients:

(this work only if you already did the basis (=change your timestamp, ntime, ect...) and ready to mine your merkle/genesis.)

- Open main.cpp
- Go to "bool InitBlockIndex()"
- Search "block.print();"
- ABOVE, you copy this:

Code:
	// This part was used to generate the genesis block.
// Uncomment to use it again.

// If genesis block hash does not match, then generate new genesis hash.
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;
char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
loop
{
#if defined(USE_SSE2)
// Detection would work, but in cases where we KNOW it always has SSE2,
// it is faster to use directly than to use a function pointer or conditional.
#if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__))
// Always SSE2: x86_64 or Intel MacOS X
scrypt_1024_1_1_256_sp_sse2(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#else
// Detect SSE2: 32bit x86 Linux or Windows
scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
#else
// Generic scrypt
scrypt_1024_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
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.GetHash = %s\n", block.GetHash().ToString().c_str());
}

This is a script that doing all the annoying job for you.
How to use it ?

- First you need to empty your merkleroot, genesis and nnonce (merkle = "0x", genesis="0x", nonce=0.
- Then you compil and start the client.
- The client will show an error but show the merkleroot.
- Now change you merkle root variable for your new one.
- Compil again and start again.
- Your client will try to mine your genesis block, this operation can be very fast as she can be very slow.
- After this, the client will show again an error but give you the genesis (gethash) and nonce.
- reopen your client script, change the genesis and nonce (and verify your ntime).
- REMOVE the script I gave you (or comment).
- Compil and enjoy Wink

I don't know if someone got the bounty, but i'm not looking after, just helping =)

I make this steps but when I open the client do not show the MerkleRoot that you say - The client will show an error but show the merkleroot. but I copy the Merkle that have on debug.log and now I will compile.. I will send news.

Thanks

NEW UPDATE - REASON: TESTS



Why I receive this error?

My debug.log file:
Code:
2014-04-11 18:44:00 



















2014-04-11 18:44:00 XXX version v0.8.6.2-g10d589b-beta (Thu, 3 Apr 2014 21:58:44 -1000)
2014-04-11 18:44:00 Using OpenSSL version OpenSSL 1.0.1g 7 Apr 2014
2014-04-11 18:44:00 Default data directory C:\Users\Leandro\AppData\Roaming\XXX
2014-04-11 18:44:00 Using data directory C:\Users\Leandro\AppData\Roaming\XXX
2014-04-11 18:44:00 Using at most 125 connections (2048 file descriptors available)
2014-04-11 18:44:00 Using 2 threads for script verification
2014-04-11 18:44:00 init message: Verificando carteira...
2014-04-11 18:44:00 dbenv.open LogDir=C:\Users\Leandro\AppData\Roaming\XXX\database ErrorFile=C:\Users\Leandro\AppData\Roaming\XXX\db.log
2014-04-11 18:44:00 Bound to [::]:25991
2014-04-11 18:44:00 Bound to 0.0.0.0:25991
2014-04-11 18:44:00 init message: Carregando índice de blocos...
2014-04-11 18:44:00 Opening LevelDB in C:\Users\Leandro\AppData\Roaming\XXX\blocks\index
2014-04-11 18:44:00 Opened LevelDB successfully
2014-04-11 18:44:00 Opening LevelDB in C:\Users\Leandro\AppData\Roaming\XXX\chainstate
2014-04-11 18:44:00 Opened LevelDB successfully
2014-04-11 18:44:00 LoadBlockIndexDB(): last block file = 0
2014-04-11 18:44:00 LoadBlockIndexDB(): transaction index disabled
2014-04-11 18:44:00 Initializing databases...
2014-04-11 18:44:00 b103277b47c133eeb6b58486d9bec984dee754bfda81010844221637e58113b9
2014-04-11 18:44:00 0000000000000000000000000000000000000000000000000000000000000000
2014-04-11 18:44:00 53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29
2014-04-11 18:44:00 CBlock(hash=b103277b47c133eeb6b58486d9bec984dee754bfda81010844221637e58113b9, input=010000000000000000000000000000000000000000000000000000000000000000000000298a6f76913c06f26c3a0b57a7f59f72fd553bb9901529e0324bc43ffd4ce55399004853f0ff0f1e00000000, PoW=daf38cbceaac5a570916ae3b11bcb32ce288631677bad01fe41b54978af520ba, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29, nTime=1397227673, nBits=1e0ffff0, nNonce=0, vtx=1)
2014-04-11 18:44:00   CTransaction(hash=53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d010444323031342f30342f313120427564676574204368696566204973204f62616d61e28099732043686f696365206173204e6577204865616c7468205365637265746172792e)
    CTxOut(nValue=3.00000000, scriptPubKey=04678afdb0fe5548271967f1a67130)
  vMerkleTree: 53e54cfd3fc44b32e0291590b93b55fd729ff5a7570b3a6cf2063c91766f8a29

Thanks

New Update - REASON: Other error

So, I've cleaned the Merkle and the Genesis to 0x and now I receive this message:
legendary
Activity: 996
Merit: 1013

Using bitcoin-sCrypt as source. I changed the usual. testnet works fine. find a  gen block no errors. switch to mainnet, everything looks fine, but when i try to mine mainnet it shows 0 hashrate and doesnt start mining?

Check your debug.log and see if it's connected to a peer.

newbie
Activity: 9
Merit: 0

Using bitcoin-sCrypt as source. I changed the usual. testnet works fine. find a  gen block no errors. switch to mainnet, everything looks fine, but when i try to mine mainnet it shows 0 hashrate and doesnt start mining?
full member
Activity: 210
Merit: 100
newbie
Activity: 35
Merit: 0
I too have been messing around with the Litecoin 0.8.6.1 sources for fun and insight, but I can't get litecoind to work after it has created a genesis block...

I start with an empty ~/.litecoin dir - no blocks, no chainstate, no database. I have set the start difficulty to ">> 24", nNonce to 0, nBits is the default 0x1e0ffff0, I have set nTime and written a timestamp message. I run litecoind to get the correct MerkleRoot for my timestamp message and then I enable the genesis block generation and start litecoind again, and it begins mining a genesis block which when done ends with this message:

Code:
litecoind: main.cpp:2833: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.

In debug.log I see that I successfully mined a block, so I set the new nNonce and genesis block hash - both nTime and nBits stay the same for some reason - and then I start litecoind again but only this happens:

Code:
Error: Failed to read block
: Error initializing block database.

Do you want to build the block database now?

And if I start again:

Code:
Error: Failed to read block
Error: Failed to connect best block

The debug log reveals this:

Code:
2014-01-01 15:13:35 Opened LevelDB successfully
2014-01-01 15:13:35 LoadBlockIndexDB(): last block file = 0
2014-01-01 15:13:35 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=281, heights=
0...0, time=2014-01-01...2014-01-01)
2014-01-01 15:13:35 LoadBlockIndexDB(): transaction index disabled
2014-01-01 15:13:35 init message: Verifying blocks...
2014-01-01 15:13:35  block index              41ms
2014-01-01 15:13:35 init message: Loading wallet...
2014-01-01 15:13:35 nFileVersion = 80601
2014-01-01 15:13:35  wallet                  534ms
2014-01-01 15:13:35 ERROR: CheckProofOfWork() : nBits below minimum work
2014-01-01 15:13:35 ERROR: CBlock::ReadFromDisk() : errors in block header
2014-01-01 15:13:35 *** Failed to read block
2014-01-01 15:13:35 Error: Failed to read block

Anyone who had the same problem and managed to solve it?


I have this identical problem right now but i have not changed the starting diff.     I will empty my ./coin folder and start the daemon and it searches for genesis block(thanks to the added code) but always ends with
Code:
bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.
Aborted
newbie
Activity: 56
Merit: 0
Hi,

didn't read all the thread. But this will help you with Litecoin clients:

(this work only if you already did the basis (=change your timestamp, ntime, ect...) and ready to mine your merkle/genesis.)

- Open main.cpp
- Go to "bool InitBlockIndex()"
- Search "block.print();"
- ABOVE, you copy this:

Code:
// This part was used to generate the genesis block.
// Uncomment to use it again.

// If genesis block hash does not match, then generate new genesis hash.
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;
char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
loop
{
#if defined(USE_SSE2)
// Detection would work, but in cases where we KNOW it always has SSE2,
// it is faster to use directly than to use a function pointer or conditional.
#if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__))
// Always SSE2: x86_64 or Intel MacOS X
scrypt_1024_1_1_256_sp_sse2(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#else
// Detect SSE2: 32bit x86 Linux or Windows
scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
#else
// Generic scrypt
scrypt_1024_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
#endif
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.GetHash = %s\n", block.GetHash().ToString().c_str());
}

This is a script that doing all the annoying job for you.
How to use it ?

- First you need to empty your merkleroot, genesis and nnonce (merkle = "0x", genesis="0x", nonce=0.
- Then you compil and start the client.
- The client will show an error but show the merkleroot.
- Now change you merkle root variable for your new one.
- Compil again and start again.
- Your client will try to mine your genesis block, this operation can be very fast as she can be very slow.
- After this, the client will show again an error but give you the genesis (gethash) and nonce.
- reopen your client script, change the genesis and nonce (and verify your ntime).
- REMOVE the script I gave you (or comment).
- Compil and enjoy Wink

I don't know if someone got the bounty, but i'm not looking after, just helping =)
member
Activity: 84
Merit: 10
I am having one hell of a time, I have tried everything in this guide and it still does not work here are the issues I am having after making the changes

Code:
cnz@cryptopirates:~/testing/Denarius/DenariusCoin/src$ ./DenariusCoind -reindex
DenariusCoin server starting
cnz@cryptopirates:~/testing/Denarius/DenariusCoin/src$ Error: Failed to read block
cnz@cryptopirates:~/testing/Denarius/DenariusCoin/src$

I look in the debug log and there's this info

Code:
2014-03-11 05:37:22 DenariusCoin version v0.8.6.2-g85f303d (2014-03-10 23:46:35 -0500)
2014-03-11 05:37:22 Using OpenSSL version OpenSSL 1.0.1 14 Mar 2012
2014-03-11 05:37:22 Default data directory /home/cnz/.denariuscoin
2014-03-11 05:37:22 Using data directory /home/cnz/.denariuscoin
2014-03-11 05:37:22 Using at most 125 connections (1024 file descriptors available)
2014-03-11 05:37:22 Using 4 threads for script verification
2014-03-11 05:37:22 init message: Verifying wallet...
2014-03-11 05:37:22 dbenv.open LogDir=/home/cnz/.denariuscoin/database ErrorFile=/home/cnz/.denariuscoin/db.log
2014-03-11 05:37:22 Bound to [::]:60666
2014-03-11 05:37:22 Bound to 0.0.0.0:60666
2014-03-11 05:37:22 init message: Loading block index...
2014-03-11 05:37:22 Wiping LevelDB in /home/cnz/.denariuscoin/blocks/index
2014-03-11 05:37:22 Opening LevelDB in /home/cnz/.denariuscoin/blocks/index
2014-03-11 05:37:22 Opened LevelDB successfully
2014-03-11 05:37:22 Wiping LevelDB in /home/cnz/.denariuscoin/chainstate
2014-03-11 05:37:22 Opening LevelDB in /home/cnz/.denariuscoin/chainstate
2014-03-11 05:37:22 Opened LevelDB successfully
2014-03-11 05:37:22 Initializing databases...
2014-03-11 05:37:22 init message: Verifying blocks...
2014-03-11 05:37:22  block index              53ms
2014-03-11 05:37:22 init message: Loading wallet...
2014-03-11 05:37:23 nFileVersion = 80602
2014-03-11 05:37:23  wallet                 1144ms
2014-03-11 05:37:23 init message: Loading addresses...
2014-03-11 05:37:23 Loaded 0 addresses from peers.dat  1ms
2014-03-11 05:37:23 mapBlockIndex.size() = 0
2014-03-11 05:37:23 nBestHeight = 0
2014-03-11 05:37:23 setKeyPool.size() = 100
2014-03-11 05:37:23 mapWallet.size() = 0
2014-03-11 05:37:23 mapAddressBook.size() = 1
2014-03-11 05:37:23 Reindexing block file blk00000.dat...
2014-03-11 05:37:23 net thread start
2014-03-11 05:37:23 dnsseed thread start
2014-03-11 05:37:23 Loading addresses from DNS seeds (could take a while)
2014-03-11 05:37:23 opencon thread start
2014-03-11 05:37:23 addcon thread start
2014-03-11 05:37:23 trying connection 64.39.227.156:43706 lastseen=359587.8hrs
2014-03-11 05:37:23 connect() failed after select(): Connection refused
2014-03-11 05:37:23 msghand thread start
2014-03-11 05:37:23 dumpaddr thread start
2014-03-11 05:37:23 init message: Done loading
2014-03-11 05:37:23 ERROR: CheckProofOfWork() : hash doesn't match nBits
2014-03-11 05:37:23 ERROR: CheckBlock() : proof of work failed
2014-03-11 05:37:23 ERROR: ProcessBlock() : CheckBlock FAILED
2014-03-11 05:37:23 Unable to open file /home/cnz/.denariuscoin/blocks/blk00001.dat
2014-03-11 05:37:23 Reindexing finished
2014-03-11 05:37:23 Initializing databases...
2014-03-11 05:37:23 14d111fc6f3909764a2891ef4d48f0e4f1a2a01c3532df36115899f9e68ad521
2014-03-11 05:37:23 14d111fc6f3909764a2891ef4d48f0e4f1a2a01c3532df36115899f9e68ad521
2014-03-11 05:37:23 12a320fe62f0a510c17cbfa587ca5e4a3812a8d6e7d2a9f748cfa91ae5d3b386
2014-03-11 05:37:23 min nBit:  1e0fffff
2014-03-11 05:37:23 CBlock(hash=14d111fc6f3909764a2891ef4d48f0e4f1a2a01c3532df36115899f9e68ad521, input=01000000000000000000000000000000000000000000000000000000000000000000000086b3d3e51aa9cf48f7a9d2e7d6a812384a5eca87a5bf7cc110a5f062fe20a312b9aa8e4effff0f1ecd513f7c, PoW=46a5474200e21b7f4d0fa281c8dd10be396bcbc3c75fa5b6d7537bea945ab0e3, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=12a320fe62f0a510c17cbfa587ca5e4a3812a8d6e7d2a9f748cfa91ae5d3b386, nTime=1317972665, nBits=1e0fffff, nNonce=2084524493, vtx=1)
2014-03-11 05:37:23   CTransaction(hash=12a320fe62f0a510c17cbfa587ca5e4a3812a8d6e7d2a9f748cfa91ae5d3b386, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d0104244d617263682031302c2032303134202d2050726f6f66206f66206e6f207072656d696e65)
    CTxOut(error)
  vMerkleTree: 12a320fe62f0a510c17cbfa587ca5e4a3812a8d6e7d2a9f748cfa91ae5d3b386
2014-03-11 05:37:23 Pre-allocating up to position 0x1000000 in blk00000.dat
2014-03-11 05:37:23 ERROR: CheckProofOfWork() : hash doesn't match nBits
2014-03-11 05:37:23 ERROR: CBlock::ReadFromDisk() : errors in block header
2014-03-11 05:37:23 *** Failed to read block
2014-03-11 05:37:23 Error: Failed to read block
2014-03-11 05:37:23 ERROR: LoadBlockIndex() : genesis block not accepted
2014-03-11 05:37:23 Shutdown : In progress...
2014-03-11 05:37:23 opencon thread interrupt
2014-03-11 05:37:23 addcon thread interrupt
2014-03-11 05:37:23 msghand thread interrupt
2014-03-11 05:37:23 dumpaddr thread stop
2014-03-11 05:37:23 net thread interrupt
2014-03-11 05:37:23 Flush(false)
2014-03-11 05:37:23 wallet.dat refcount=0
2014-03-11 05:37:23 wallet.dat checkpoint
2014-03-11 05:37:23 wallet.dat detach
2014-03-11 05:37:23 wallet.dat closed
2014-03-11 05:37:23 DBFlush(false) ended              33ms
2014-03-11 05:37:23 StopNode()
2014-03-11 05:37:23 Flushed 0 addresses to peers.dat  3ms
2014-03-11 05:37:23 Committing 0 changed transactions to coin database...
2014-03-11 05:37:23 Flush(true)
2014-03-11 05:37:23 wallet.dat refcount=0
2014-03-11 05:37:23 wallet.dat checkpoint
2014-03-11 05:37:23 wallet.dat detach
2014-03-11 05:37:23 wallet.dat closed
2014-03-11 05:37:23 DBFlush(true) ended               2ms
2014-03-11 05:37:23 Shutdown : done

any help would be greatly appreciated
full member
Activity: 203
Merit: 100
Things are working now. Multiple nodes up, communicating with eachother. Is it normal that every block I mine solo comes from a unique random address?
full member
Activity: 203
Merit: 100
Block found - and everything is working with the new difficulty! The only thing that confuses me is that "getinfo" reports 0 blocks and 0 balance, but perhaps the genesis block in the wallet is not accounted for?

Again, thanks for the help elbandi and nocoin!
full member
Activity: 203
Merit: 100
Thank you for the help. Now waiting for a block to be found with the new settings...
hero member
Activity: 525
Merit: 531
I have found the problem. It does not like that I change the minimum network difficulty (bnProofOfWorkLimit). As soon as I restore it to the defauld ">> 20" (which is 1/4096), it works perfectly! I've tried to find where else the default value may be set and tested for verification, but I can't locate it. Any ideas?
ah, if you increase the minimum network difficulty, you have to calculate the right nBits for genesis block.
maybe you can try this:
Code:
printf("min nBit:  %08x\n", bnProofOfWorkLimit.GetCompact());
after this:
Code:
        printf("%s\n", hash.ToString().c_str());
        printf("%s\n", hashGenesisBlock.ToString().c_str());
        printf("%s\n", block.hashMerkleRoot.ToString().c_str());
this will print a hex value, set this to block.nBits.

and gen a new GenesisBlock hash.
full member
Activity: 168
Merit: 100
I have found the problem. It does not like that I change the minimum network difficulty (bnProofOfWorkLimit). I've tried to find where else the default value of ">> 20" (1/4096) may be set and tested for verification, but I can't locate it. Any ideas?
(geneses)block.nBits
https://en.bitcoin.it/wiki/Difficulty
full member
Activity: 203
Merit: 100
I have found the problem. It does not like that I change the minimum network difficulty (bnProofOfWorkLimit). As soon as I restore it to the defauld ">> 20" (which is 1/4096), it works perfectly! I've tried to find where else the default value may be set and tested for verification, but I can't locate it. Any ideas?
full member
Activity: 203
Merit: 100
empty ~/.litecoin dir!

That gives the exact same results :/

First it rebuilds the database, I see in the debug.log that it makes an accepted transaction to the blockchain, but then it fails reading/verifying the block.

debug.log:

Code:
...
2014-01-02 12:31:37 keypool added key 98, size=98
2014-01-02 12:31:37 keypool added key 99, size=99
2014-01-02 12:31:37 keypool added key 100, size=100
2014-01-02 12:31:37 keypool added key 101, size=101
2014-01-02 12:31:37 keypool reserve 1
2014-01-02 12:31:37 keypool keep 1
2014-01-02 12:31:37  wallet                 1266ms
2014-01-02 12:31:37 ERROR: CheckProofOfWork() : nBits below minimum work
2014-01-02 12:31:37 ERROR: CBlock::ReadFromDisk() : errors in block header
2014-01-02 12:31:37 *** Failed to read block
2014-01-02 12:31:37 Error: Failed to read block
2014-01-02 12:31:37 init message: Loading addresses...
2014-01-02 12:31:37 Loaded 0 addresses from peers.dat  0ms
2014-01-02 12:31:37 Error: Failed to connect best block
hero member
Activity: 525
Merit: 531
empty ~/.litecoin dir!
full member
Activity: 203
Merit: 100
I too have been messing around with the Litecoin 0.8.6.1 sources for fun and insight, but I can't get litecoind to work after it has created a genesis block...

I start with an empty ~/.litecoin dir - no blocks, no chainstate, no database. I have set the start difficulty to ">> 24", nNonce to 0, nBits is the default 0x1e0ffff0, I have set nTime and written a timestamp message. I run litecoind to get the correct MerkleRoot for my timestamp message and then I enable the genesis block generation and start litecoind again, and it begins mining a genesis block which when done ends with this message:

Code:
litecoind: main.cpp:2833: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.

In debug.log I see that I successfully mined a block, so I set the new nNonce and genesis block hash - both nTime and nBits stay the same for some reason - and then I start litecoind again but only this happens:

Code:
Error: Failed to read block
: Error initializing block database.

Do you want to build the block database now?

And if I start again:

Code:
Error: Failed to read block
Error: Failed to connect best block

The debug log reveals this:

Code:
2014-01-01 15:13:35 Opened LevelDB successfully
2014-01-01 15:13:35 LoadBlockIndexDB(): last block file = 0
2014-01-01 15:13:35 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=1, size=281, heights=
0...0, time=2014-01-01...2014-01-01)
2014-01-01 15:13:35 LoadBlockIndexDB(): transaction index disabled
2014-01-01 15:13:35 init message: Verifying blocks...
2014-01-01 15:13:35  block index              41ms
2014-01-01 15:13:35 init message: Loading wallet...
2014-01-01 15:13:35 nFileVersion = 80601
2014-01-01 15:13:35  wallet                  534ms
2014-01-01 15:13:35 ERROR: CheckProofOfWork() : nBits below minimum work
2014-01-01 15:13:35 ERROR: CBlock::ReadFromDisk() : errors in block header
2014-01-01 15:13:35 *** Failed to read block
2014-01-01 15:13:35 Error: Failed to read block

Anyone who had the same problem and managed to solve it?
member
Activity: 66
Merit: 10
In response to my previous post, there seems to be something unusual in the genesis block that was shown in debug.log on my main Linux server. The hash shown in the log files doesn't seem to be the final genesis hash.

To cut a long story short, the debug.log showed what looked to be THE genesis hash but testcoind must've still been running in the background, creating the actual genesis hash, which no doubt I killed the process when recompiling the files.

Basically... if you come across this, make sure you leave your /whatevercoind to process its genesis hash uninterrupted. The only way if found out (the second time around) on the Linux VPS server was when trying to transfer the coin's directory using sudo cp testcoind /usr/bin/testcoind. The message saying "Text file busy" suggests that something is going on in the background. It's been running for 4 hours now; apparently it took 6 days on the Bitcoin creators original run  Shocked
member
Activity: 66
Merit: 10
Thanks for this info too, dude.

I'm testing a coin (strictly for humanitarian issues) using different source code and the error was almost the same. From your info, it seems the genesis hash in debug.log was on a different line to the expected value. The main VPS server is working fine but the log file is busy so I'm expecting trouble soon.
Pages:
Jump to: