Bitcoin Forum
June 23, 2024, 09:00:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating own altcoin, error loading block database  (Read 857 times)
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:08:57 AM
 #1

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!
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 01:18:13 AM
 #2

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...

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 01:20:15 AM
 #3

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"

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:20:45 AM
 #4

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
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 01:22:09 AM
 #5

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

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:24:11 AM
 #6

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?
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 01:28:57 AM
 #7

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.

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:30:49 AM
 #8

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.
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:42:05 AM
 #9

The coin crashed again with the same error.  it's a sha coin based off the latest bitcoin code
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 01:48:18 AM
 #10

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.

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 01:50:44 AM
 #11

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!
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 02:00:15 AM
 #12

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...?

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
TribalBob
Sr. Member
****
Offline Offline

Activity: 1288
Merit: 257


Chainjoes.com


View Profile
December 15, 2013, 02:03:33 AM
 #13

Did you remember to re-comment lines 55-58 in src/chainparams.cpp after you hashed your genesis block?

█▀▀▀










█▄▄▄
CHAIN JOES
▀▀▀█










▄▄▄█
█▀▀▀










█▄▄▄
|
▀▀▀█










▄▄▄█
📝
smeagol (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
December 15, 2013, 03:15:28 AM
 #14

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
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!