Bitcoin Forum
May 29, 2024, 01:16:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to generate new genesisBlock and hash it?  (Read 100 times)
gorus5 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 09, 2018, 09:26:50 AM
 #1

Hi everyone.
I'm trying to clone cryptocurrency, taking Cybcsec as a basis (making a fork).
The best guide that I found is this one.
It is a guide for litecoin, but it is the most detailed. And all currencies has similar code.
But I faced some obstacles in step 5a.

As far as I understood, method
Code:
bool InitBlockIndex()
is responsible for that. There you assign parameters for your genesisBlock and create it.
But this method exists only in older versions. In new versions this code is missing.
So I wondered, they just throw away this ability from code and I need to create genesis in some other ways, or this can be done but in some mystical way, which can't be found in any guide?

I tried to find some info about same thing with closest "siblings" of Cybcsec, e.g. ShadowCoin, BlackCoin, NovaCoin but no satisfactory result.
Thanks in advance for any answers.
manoj6233
Jr. Member
*
Offline Offline

Activity: 196
Merit: 1


View Profile
March 09, 2018, 09:39:19 AM
 #2

You must mine the genesis block. There is no code in the most recent heads of the altcoin sources that can do the mining for you, although earlier releases of the source code would automatically create a new genesis block at that point, instead of failing the assertion. That was taken out, since it's not needed and may in fact cause more headaches for the average miner if their local db becomes unavailable.
gorus5 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 09, 2018, 09:46:58 AM
 #3

You must mine the genesis block. There is no code in the most recent heads of the altcoin sources that can do the mining for you, although earlier releases of the source code would automatically create a new genesis block at that point, instead of failing the assertion. That was taken out, since it's not needed and may in fact cause more headaches for the average miner if their local db becomes unavailable.
Okay. How can I do that? I need to generate it with older version automatically or there is a way to do that on latest releases?
I have read that this can be done even with assertion fail. When this happens new hash should be written into debug.log file.
But app crashes, and log file is clean.
5thFear
Full Member
***
Offline Offline

Activity: 1260
Merit: 102


View Profile WWW
March 09, 2018, 10:38:25 AM
 #4

Is there a complete guide of making a new cryptocurrency instead of copying one ?
gorus5 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 09, 2018, 02:21:37 PM
 #5

Question is still open.
Anybody knows how to generate it?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!