Bitcoin Forum
May 02, 2024, 10:25:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating a Genesis Block (Linux)  (Read 2063 times)
CrimsonGT (OP)
Full Member
***
Offline Offline

Activity: 462
Merit: 100



View Profile
December 29, 2013, 09:53:28 AM
 #1

I have been messing around with the source code for Litecoin and trying to build it as an alternative coin. I am looking to possibly create a fake alt-coin for a project in my programming class, but need to actually have a pretty solid understanding of how it works. I have been following the guide at http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide which has been pretty smooth thus far, however I am running into a problem now when generating the genesis block.

I get to the point where I run it with "-testnet" and it fails as expected, but it is supposed to generate a file that contains the Merkel Hash. I am not too familiar with Linux for programming, but everything states that this should generate a ".testcoin" file in the Home directory, but nothing is being created there.

crimsongt@wheezy:~/testcoin/src$ ./testcoind -testnet
testcoind: main.cpp:2113: bool LoadBlockIndex(bool): Assertion `block.hashMerkleRoot == uint256("0x97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9")' failed.
Aborted

Is there any way to figure out whats going wrong and why this file is not being generated?
1714688743
Hero Member
*
Offline Offline

Posts: 1714688743

View Profile Personal Message (Offline)

Ignore
1714688743
Reply with quote  #2

1714688743
Report to moderator
1714688743
Hero Member
*
Offline Offline

Posts: 1714688743

View Profile Personal Message (Offline)

Ignore
1714688743
Reply with quote  #2

1714688743
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714688743
Hero Member
*
Offline Offline

Posts: 1714688743

View Profile Personal Message (Offline)

Ignore
1714688743
Reply with quote  #2

1714688743
Report to moderator
1714688743
Hero Member
*
Offline Offline

Posts: 1714688743

View Profile Personal Message (Offline)

Ignore
1714688743
Reply with quote  #2

1714688743
Report to moderator
simbo
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
December 29, 2013, 10:25:59 AM
 #2

The debug logfile is <homedirectory>/.testcoin/debug.log

Hope it helps. Use a OS you are good at.

BattleTitans.io  ▼  Mobile PvP Arena of the Future  ▼  BattleTitans.io
The Most Promising ICO in October    [Join Now!]

▼  [FB]  ▬  [TW]  ▬  [TG]  ▬▬▬  [YU]  ▼
CrimsonGT (OP)
Full Member
***
Offline Offline

Activity: 462
Merit: 100



View Profile
December 29, 2013, 10:59:00 AM
 #3

Thank you for the information, however my issue is that ".testcoin" is not being created during make, why I am rather confused.

I am proficient with Windows, but the build process seems so incredibly difficult in comparison to Nix/OSX that I opted to just try building from a Debian VM instead.
simbo
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
December 29, 2013, 11:07:42 AM
 #4

.testcoin is a directory, not log file. The text log file you are looking for is debug.log.

Btw, windows is not that bad. I develop my coin on a win 7 system & yes, I tried the devtome guide before.

BattleTitans.io  ▼  Mobile PvP Arena of the Future  ▼  BattleTitans.io
The Most Promising ICO in October    [Join Now!]

▼  [FB]  ▬  [TW]  ▬  [TG]  ▬▬▬  [YU]  ▼
KriszDev
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
December 29, 2013, 11:22:40 AM
 #5

What you doing is creating a merkel hash for testnet ,but your can run whitout testnet (generate merkel for the real net). And if you not find the .CONNAME folder create a folder named "data" where is your COINNNAMERUNNABLE then launch COINNAMERUNNABLE with "-datadir=data" then open the data folder and you will se the debug.log but you have to wait 'till it complete the generation.
Sharrow
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
December 30, 2013, 01:01:30 PM
Last edit: December 30, 2013, 01:39:59 PM by Sharrow
 #6

I'm having the same problem on a Linux box and it's extremely frustrating! The debug.log file can be found but there's no mention of a merkel hash or nonce in it.

Apologies if this seems too basic but if you're a Linux noob (like me), it may be useful.

To make a folder for the log files to go to, you need to go to your $HOME folder and you need to run
Code:
mkdir ~/.testcoin

Then to run the -testnet, run this code:
Code:
testcoind -noirc -testnet -datadir=/$HOME/.testcoin/

Go into you home folder and type in ls -a to see folders that aren't visible with the ls command. Inside the $HOME/.testcoin/ folder there should be a testnet folder with a list of files that can be viewed with the ls command. The debug.log should be one of them and it can be opened with  pico debug.log   . Hopefully yours will have more info than mine.

All that mine contains is:

TestCoin version v1.0.0.0-ga9113b5-tst (2013-12-30 11:33:50 +0000)
Startup time: 12/30/13 13:02:48
Default data directory /root/.testcoin
Used data directory //root/.testcoin/proto/testnet3
Bound to [::]:45883
Bound to 0.0.0.0:45883
Loading block index...
dbenv.open LogDir=//root/.testcoin/proto/testnet3/database ErrorFile=//root/.testcoin/proto/testnet3/db.log
223ac289612d6cdd0aae9a96c012e82ee0360d9afb7b4bae18a09552208219a1
0000000000000000000000000000000000000000000000000000000000000000
c4dc961b5224ce2a49a927a56f5723b9cd00f23b366a2aad90dae7720a4df44d

Sharrow
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
December 30, 2013, 07:15:51 PM
 #7

In answer to my previous post, the merkel hash was the last line of the log file. The testnet genesis block is working a treat now.
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!