Title: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: CryptoMine on December 30, 2013, 04:55:50 PM I am always one to Google/Search forums until I find the answer, but after 10 hours of trying, I have come to the forums to get an answer.
I am modifying the new Litecoin script (for educational reasons) here: https://github.com/litecoin-project/litecoin For the life of me, I am unable to generate a genesis block, I keep getting: Code: main.cpp:2796: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed. I check my debug.log file and get: Code: 2013-12-30 04:03:26 84d3cf22c9d4a4cbda424fc0e5a7169f33780395039b3959fec424649d690d07 Which doesn't give me: block.nTime = X block.nNonce = X block.GetHash = X As mentioned https://bitcointalk.org/index.php?topic=189350.msg2035449#msg2035449 and many other forums I have visited in the past 10hrs I am inserting the hashMerkleRoot, block.nTime and block.nBits in correctly (after generating the hashMerkleRoot from debug.log) but after I try to run the daemon (or testnet) I am getting that same error. Any ideas? Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: elbandi on December 30, 2013, 05:24:39 PM Hi,
This is your genesis block hash: Quote 2013-12-30 04:03:26 84d3cf22c9d4a4cbda424fc0e5a7169f33780395039b3959fec424649d690d07 Put that to this line: Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L34 This is your merkleroot: Quote 2013-12-30 04:03:26 b6580b90a6dd4b1169d76f034d408cdaa07f44e653bca4da0cd4216d8b22cc0d Put that to this line: Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L2786 After if you get somethink like this: Quote CheckProofOfWork() : hash doesn't match nBits This genesis block is not good, because doest fit for start difficulty. need a new one. Put this source code (http://pastebin.com/jDMPUNuP) before this line (block.print()): Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L2787 run the app, this will "mine" a new genesis block (need lot of time!!) for you. if it's founded, modify your source: nNonce, nTime and the new hash (GetHash = XX) for genesis block hash. you can remove the inserted code, and you have a new altcoin ;) (if you want a testnet genesis block, do the same and dont forget to start with -testnet, and modify the testnet nNonce, nTime and hash!) Elbandi Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: CryptoMine on December 30, 2013, 05:34:06 PM Thanks you! I've regained my sanity!
That worked perfectly! and I'm sure this will help other people too!! Please PM me your MegaCoin Wallet ID and I will send you the bounty :) Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: Sharrow on December 31, 2013, 07:46:54 PM 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. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: Sharrow on December 31, 2013, 09:37:56 PM 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 :o Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 05:20:16 AM 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 And if I start again: Code: Error: Failed to read block The debug log reveals this: Code: 2014-01-01 15:13:35 Opened LevelDB successfully Anyone who had the same problem and managed to solve it? Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: elbandi on January 02, 2014, 09:38:26 AM empty ~/.litecoin dir!
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 12:36:38 PM 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: ... Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 12:42:31 PM 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?
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: nocoin on January 02, 2014, 12:45:19 PM 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.nBitshttps://en.bitcoin.it/wiki/Difficulty Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: elbandi on January 02, 2014, 12:58:50 PM 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()); Code: printf("%s\n", hash.ToString().c_str()); and gen a new GenesisBlock hash. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 01:52:59 PM Thank you for the help. Now waiting for a block to be found with the new settings...
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 02:56:05 PM 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! Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: roundrobin on January 02, 2014, 09:20:32 PM 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?
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: Stygian0708 on March 11, 2014, 05:40:01 AM 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 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) any help would be greatly appreciated Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: Cryptokk on March 11, 2014, 10:24:00 AM 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. 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 ;) I don't know if someone got the bounty, but i'm not looking after, just helping =) Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: madhatr on April 03, 2014, 10:19:40 PM 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 And if I start again: Code: Error: Failed to read block The debug log reveals this: Code: 2014-01-01 15:13:35 Opened LevelDB successfully 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. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: softron on April 04, 2014, 04:20:49 PM Nice guide
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: satoru on April 10, 2014, 07:10:49 PM 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? Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on April 11, 2014, 02:10:35 PM 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. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: sr.machado on April 11, 2014, 05:48:50 PM Testing... seems wonderful! :D
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. 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 ;) 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 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 Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: Proteu5 on April 12, 2014, 04:05:22 AM Testing... seems wonderful! :D 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. 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 ;) 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 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 ;) Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on April 12, 2014, 07:47:38 AM 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. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: sr.machado on April 12, 2014, 01:34:56 PM Quote 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 ;) Thank you, but the error do not show the Merkle on the error (so, the error quoted is debug.log file?). I will re-read the tutorial, I'm autodidact (correct write?) and on my official language don't have tutorials. Thanks for your patience. Quote 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. So, my intention is just for study case, I not show the name of coin because people can copy before I finish! :) Thanks a lot for help, I will begin again! Recompiled, same error... So, what is the Merkle and What is the Genesis here? Code: 2014-04-12 20:56:32 Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: satoru on April 14, 2014, 05:08:13 PM 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. Quote 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 ;) Thank you, but the error do not show the Merkle on the error (so, the error quoted is debug.log file?). I will re-read the tutorial, I'm autodidact (correct write?) and on my official language don't have tutorials. Thanks for your patience. Quote 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. So, my intention is just for study case, I not show the name of coin because people can copy before I finish! :) Thanks a lot for help, I will begin again! Recompiled, same error... So, what is the Merkle and What is the Genesis here? Code: 2014-04-12 20:56:32 2014-04-12 20:56:32 0000000000000000000000000000000000000000000000000000000000000000 Genesis block, all the nNonces are set to 0 in main.cpp (this is normal) 2014-04-12 20:56:32 ed7ce3a32498164f1182dcfefa4aaf39a642e8eb9c258bc9555cc7b9e6e7e76f Valid Merkel Hash, generated using epoch time Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: sr.machado on April 14, 2014, 05:55:19 PM Are ok, I get my test-coin running and ok, but I'm receiving too much coins that block permit.
My Genesis: Code: // Genesis block nSubsidy and time to create a new coin: Code: int64 static GetBlockValue(int nHeight, int64 nFees) main.h file with coins: Code: /** The maximum allowed size for a serialized block, in bytes (network rule) */ Code: static bool AllowFree(double dPriority) Why my coins are generating new blocks every 1 or 2 minutes? Thanks Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on April 14, 2014, 06:08:50 PM The rate of block generation depends on your hashing rate. How many blocks have you mined since the genesis? Your diff adjustment interval is 48 blocks, so after that it should take a little longer.
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: sr.machado on April 14, 2014, 06:34:48 PM 81 blocks.
I stop the coin, recompile now and try again. Thanks Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wingding on May 08, 2014, 07:30:53 PM Is there any advange using bitcoin-scrypt vs litecoin for this?
(I tried to build new block chain using litecoin, but get into same problems, the tips above did not fix) Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: chrisvl on May 01, 2015, 09:28:59 PM Hi, I have the same problem on sha256 all its ok on debug.log but nNONCE=0 any solution ?This is your genesis block hash: Quote 2013-12-30 04:03:26 84d3cf22c9d4a4cbda424fc0e5a7169f33780395039b3959fec424649d690d07 Put that to this line: Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L34 This is your merkleroot: Quote 2013-12-30 04:03:26 b6580b90a6dd4b1169d76f034d408cdaa07f44e653bca4da0cd4216d8b22cc0d Put that to this line: Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L2786 After if you get somethink like this: Quote CheckProofOfWork() : hash doesn't match nBits This genesis block is not good, because doest fit for start difficulty. need a new one. Put this source code (http://pastebin.com/jDMPUNuP) before this line (block.print()): Quote https://github.com/litecoin-project/litecoin/blob/master-0.8/src/main.cpp#L2787 run the app, this will "mine" a new genesis block (need lot of time!!) for you. if it's founded, modify your source: nNonce, nTime and the new hash (GetHash = XX) for genesis block hash. you can remove the inserted code, and you have a new altcoin ;) (if you want a testnet genesis block, do the same and dont forget to start with -testnet, and modify the testnet nNonce, nTime and hash!) Elbandi Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: NattyLiteCoin on May 01, 2015, 11:52:22 PM Wow. This is what a thread on altcoin forum was like 12 months ago. Amazing.
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: tearodactyl on May 04, 2017, 06:11:17 PM Updated 2017 status of the Genesis Block http://practicecoin.com/index.php/2017/04/19/genesis-block/
Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wsxdrfv on February 13, 2018, 05:34:52 AM So I want to clone newest source and make alt-coin.
But where is the part that make debug.log file for check and apply new genesis block's hash value? So now, how to know what value should be replaced to assert(consensus.hashGenesisBlock == uint256s("?")); assert(genesis.hashMerkleRoot == unit256s("?)); at chainparams.cpp 's line 123~130 around. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: ir.hn on February 13, 2018, 05:50:54 AM So I want to clone newest source and make alt-coin. But where is the part that make debug.log file for check and apply new genesis block's hash value? So now, how to know what value should be replaced to assert(consensus.hashGenesisBlock == uint256s("?")); assert(genesis.hashMerkleRoot == unit256s("?)); at chainparams.cpp 's line 123~130 around. you need some printf statements to get started, I still don't have working genesis blocks but if you put the printf statements in like I have in my coin it should get you farther: github.com/yenten2/yenten Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wsxdrfv on February 13, 2018, 06:28:29 AM So I want to clone newest source and make alt-coin. But where is the part that make debug.log file for check and apply new genesis block's hash value? So now, how to know what value should be replaced to assert(consensus.hashGenesisBlock == uint256s("?")); assert(genesis.hashMerkleRoot == unit256s("?)); at chainparams.cpp 's line 123~130 around. you need some printf statements to get started, I still don't have working genesis blocks but if you put the printf statements in like I have in my coin it should get you farther: github.com/yenten2/yenten Thx, so this part you wrote? Code: hashGenesisBlock = genesis.GetHash(); So then, where this printf result text be recorded we can know the hash value? I can't find any file generated at .bitcoin folder Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: ir.hn on February 14, 2018, 01:14:21 AM mostly this one:
printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str()); I haven't gotten the others working yet either. but when you run bitcoind or whatever it is called, it should display a hash that will "work". then it will say testnet hash failed, put that code under the testnet genesis.gethash and it will give you a working hash for that and same with regnet. Problem is those hashes don't meet the difficulty requirements so it will need to be mined but I don't know how to do that. If you use a simple algorithm like sha256 or x11 you can check this out to generate them: https://github.com/lhartikk/GenesisH0 Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on February 16, 2018, 08:34:50 PM Code: if (false && (block.GetHash() != hashGenesisBlock)) Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wsxdrfv on February 17, 2018, 05:12:02 AM Code: if (false && (block.GetHash() != hashGenesisBlock)) This code does not work on new source. What variables should be changed to what? I found only, 'block' should be 'genesis', but about others, I don't know. And CBigNum() does not exist in new source. And when try to 'make', errors. --------------- chainparams.cpp: In constructor ‘CMainParams::CMainParams()’: chainparams.cpp:130:41: error: ‘CBigNum’ was not declared in this scope uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256( ^ chainparams.cpp:131:37: error: no match for ‘operator>’ (operand types are ‘uint256’ and ‘uint256’) while (genesis.GetHash() > hashTarget) ^ -------------- Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on February 18, 2018, 03:58:27 PM It's one implementation of the general genesis mining algo, taken from older source.. You need to tweak it a little, but I prefer to leave that as an easy exercise. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wsxdrfv on February 20, 2018, 09:40:00 AM It's one implementation of the general genesis mining algo, taken from older source.. You need to tweak it a little, but I prefer to leave that as an easy exercise. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: YarkoL on February 20, 2018, 04:46:43 PM Well, if you want to learn this stuff, you need to know some C++ and then it won't be that hard to figure out. Especially since there are lots of threads like this on bitcointalk, just search. If you just want to launch your own cryptocurrency, these days you can do that very easily on Ethereum or some other smart contract platform. Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: chrisvl on February 20, 2018, 08:45:39 PM Code: if (false && (block.GetHash() != hashGenesisBlock)) This code does not work on new source. What variables should be changed to what? I found only, 'block' should be 'genesis', but about others, I don't know. And CBigNum() does not exist in new source. And when try to 'make', errors. --------------- chainparams.cpp: In constructor ‘CMainParams::CMainParams()’: chainparams.cpp:130:41: error: ‘CBigNum’ was not declared in this scope uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256( ^ chainparams.cpp:131:37: error: no match for ‘operator>’ (operand types are ‘uint256’ and ‘uint256’) while (genesis.GetHash() > hashTarget) ^ -------------- Wich source do you use ? Title: Re: The genesis block is hurting my soul.. Please help [25 MegaCoin bounty] Post by: wsxdrfv on February 20, 2018, 09:30:14 PM Code: if (false && (block.GetHash() != hashGenesisBlock)) This code does not work on new source. What variables should be changed to what? I found only, 'block' should be 'genesis', but about others, I don't know. And CBigNum() does not exist in new source. And when try to 'make', errors. --------------- chainparams.cpp: In constructor ‘CMainParams::CMainParams()’: chainparams.cpp:130:41: error: ‘CBigNum’ was not declared in this scope uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256( ^ chainparams.cpp:131:37: error: no match for ‘operator>’ (operand types are ‘uint256’ and ‘uint256’) while (genesis.GetHash() > hashTarget) ^ -------------- Wich source do you use ? Litecoin's newest source. |