Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: smeagol on December 15, 2013, 01:08:57 AM



Title: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:08:57 AM
I am creating my own altcoin on windows.  I've compiled everything, done the first build, found the hash and nonce of the genesis block as well as the merkel root, inserted them into the code, and recompiled.  When I try to run mycoind.exe, the command prompt says "Error loading block database.  Do you want to rebuild the block database now?"

I think it may be because I may have not mined the genesis block, but I'm not sure.

Does anyone out on the forums know what is causing this problem?  I will provide the code to anyone who can help me.

Thanks!


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 01:18:13 AM
I am creating my own altcoin on windows.  I've compiled everything, done the first build, found the hash and nonce of the genesis block as well as the merkel root, inserted them into the code, and recompiled.  When I try to run mycoind.exe, the command prompt says "Error loading block database.  Do you want to rebuild the block database now?"

I think it may be because I may have not mined the genesis block, but I'm not sure.

Does anyone out on the forums know what is causing this problem?  I will provide the code to anyone who can help me.

Thanks!

Now that you have the nonce and hash and merkle root edited, erase everything from the data dir except for .conf and re-launch the client...


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 01:20:15 AM
Also, if you edited:

Code:
if (false && block.GetHash() != hashGenesisBlock)

and generated your genesis block by changing "false" to "true" then you need to edit "true" back to "false"


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:20:45 AM
Also, if you edited:

Code:
if (false && block.GetHash() != hashGenesisBlock)

and generated your genesis block by changing "false" to "true" then you need to edit "true" back to "false"

What line is that on, and on which file?

Thanks


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 01:22:09 AM
Also, if you edited:

Code:
if (false && block.GetHash() != hashGenesisBlock)

and generated your genesis block by changing "false" to "true" then you need to edit "true" back to "false"

What line is that on, and on which file?

Thanks

It will be in main.cpp, not sure which line, just use search function in qt creator or whichever editor you are using


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:24:11 AM
Now that you have the nonce and hash and merkle root edited, erase everything from the data dir except for .conf and re-launch the client...

I only have the daemon compiled, should I do the qt too?


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 01:28:57 AM
Now that you have the nonce and hash and merkle root edited, erase everything from the data dir except for .conf and re-launch the client...

I only have the daemon compiled, should I do the qt too?

No no, what I mean is your data directory. Your qt and daemon should be in their src folder but you want to go to:

appdata\roaming\MyCoin

and delete everything in that folder except for your mycoin.conf file, so it's like starting with a brand new copy of your client.


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:30:49 AM
Now that you have the nonce and hash and merkle root edited, erase everything from the data dir except for .conf and re-launch the client...

I only have the daemon compiled, should I do the qt too?

No no, what I mean is your data directory. Your qt and daemon should be in their src folder but you want to go to:

appdata\roaming\MyCoin

and delete everything in that folder except for your mycoin.conf file, so it's like starting with a brand new copy of your client.

ok, i'll do it and tell you what happens.


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:42:05 AM
The coin crashed again with the same error.  it's a sha coin based off the latest bitcoin code


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 01:48:18 AM
The coin crashed again with the same error.  it's a sha coin based off the latest bitcoin code

What method did you use to generate your genesis block to get your nNonce, merkle root and Hash...?

Is your code hosted on a git somewhere that I can look at it? You can PM me the link if you don't want to share it publicly just yet.


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 01:50:44 AM
The coin crashed again with the same error.  it's a sha coin based off the latest bitcoin code

What method did you use to generate your genesis block to get your nNonce, merkle root and Hash...?

Is your code hosted on a git somewhere that I can look at it? You can PM me the link if you don't want to share it publicly just yet.

https://github.com/RazorLove/abccoin

It's based on ABCCoin

Lines 55-58
http://devtome.com/doku.php?id=sha256_altcoin_cloning_guide&s[]=cloning#filesrc_chainparamscpp

Thanks!


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 02:00:15 AM
The coin crashed again with the same error.  it's a sha coin based off the latest bitcoin code

What method did you use to generate your genesis block to get your nNonce, merkle root and Hash...?

Is your code hosted on a git somewhere that I can look at it? You can PM me the link if you don't want to share it publicly just yet.

https://github.com/RazorLove/abccoin

It's based on ABCCoin

Lines 55-58
http://devtome.com/doku.php?id=sha256_altcoin_cloning_guide&s[]=cloning#filesrc_chainparamscpp

Thanks!

Do you have a copy of the code with your edits that I can see...?


Title: Re: Creating own altcoin, error loading block database
Post by: TribalBob on December 15, 2013, 02:03:33 AM
Did you remember to re-comment lines 55-58 in src/chainparams.cpp after you hashed your genesis block?


Title: Re: Creating own altcoin, error loading block database
Post by: smeagol on December 15, 2013, 03:15:28 AM
Did you remember to re-comment lines 55-58 in src/chainparams.cpp after you hashed your genesis block?

Yes.

I will try to PM you with the code, a bit busy now though