Bitcoin Forum
May 03, 2024, 05:30:35 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help creating Genesis Block (linux, Debian)  (Read 1504 times)
e1ghtSpace (OP)
Legendary
*
Offline Offline

Activity: 1526
Merit: 1001


Crypto since 2014


View Profile WWW
June 14, 2014, 07:44:00 AM
 #1

I need help creating a Genesis block for a BlackCoin fork called VirtueCoin. I'm following this tutorial: http://dogecoin.ga/how_to_create_scrypt_based_altcoins.html
I am trying to get the Merkel hash that is supposed to come up in the testnet debug.log file after you launch the application for the first time but it isn't appearing. Here is what is in the debug.log:

Code:
VirtueCoin version v1.0.7.0-g32a928e (2014-06-14 12:28:10 +1000)
Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
Startup time: 06/14/14 07:27:13
Default data directory /home/kyle/.virtuecoin
Used data directory /home/kyle/.virtuecoin/testnet
dbenv.open LogDir=/home/kyle/.virtuecoin/testnet/database ErrorFile=/home/kyle/.virtuecoin/testnet/db.log
Bound to [::]:45883
Bound to 0.0.0.0:45883
Loading block index...
Opening LevelDB in /home/kyle/.virtuecoin/testnet/txleveldb
Opened LevelDB successfully
can someone help me figure this out please?

Its supposed to look something like this:
Code:
b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db178df5dd3b302fc
0000000000000000000000000000000000000000000000000000000000000000
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e158079451d9c6c90e4700

Maybe I need to change the false to true (what this guy says):
https://bitcointalk.org/index.php?topic=189350.msg2035449#msg2035449
Is this what I do?

I'm a Linux noob (installed it this morning)
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714714235
Hero Member
*
Offline Offline

Posts: 1714714235

View Profile Personal Message (Offline)

Ignore
1714714235
Reply with quote  #2

1714714235
Report to moderator
1714714235
Hero Member
*
Offline Offline

Posts: 1714714235

View Profile Personal Message (Offline)

Ignore
1714714235
Reply with quote  #2

1714714235
Report to moderator
From Above
Hero Member
*****
Offline Offline

Activity: 700
Merit: 520



View Profile
June 14, 2014, 08:16:24 AM
 #2

kyle, this is really embarassing. if u cant figure this out u should really really not be making another mindless blackcoin clone. plz man think about it.

ouch.

bitcoinreactor
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
June 14, 2014, 08:18:26 AM
 #3

kyle, this is really embarassing. if u cant figure this out u should really really not be making another mindless blackcoin clone. plz man think about it.

ouch.

i second this ... every day you get that kind of request ...

if you just can't figure out how to generate the fcking genesis block ... for god's sake .. wipe out your repository right now !

BTC: 17CHqn3XE3Waf7Qfkm9p2MQE1VgB8gVbG4
e1ghtSpace (OP)
Legendary
*
Offline Offline

Activity: 1526
Merit: 1001


Crypto since 2014


View Profile WWW
June 14, 2014, 09:39:15 AM
 #4

Jesus fck, I'm only 14. I never even said I was going to release this coin, take it easy. Seriously though, you have to start somewhere, right?
strawie
Full Member
***
Offline Offline

Activity: 141
Merit: 100


View Profile
June 14, 2014, 09:52:04 AM
 #5

I guess people are afraid you could steal their business. Releasing a 1-5% pos coin every 4 hours Cheesy. I'm sorry I cant help you there kyle but good luck figuring out cryptos.
bitcoinreactor
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
June 14, 2014, 10:24:33 AM
Last edit: June 14, 2014, 10:40:37 AM by bitcoinreactor
 #6

Jesus fck, I'm only 14. I never even said I was going to release this coin, take it easy. Seriously though, you have to start somewhere, right?

starting with something as "big" as bitcoin in terms of understandings it requires may be a bit overwhelming, anyway, here are a few things:

i just had a look at your 'create an altcoin howto' page, i don't really like the way they 'explain' how to create the genesis block.

Personally, i generate mine using the following procedure :

this is, supposing you already understood and set the network parameters.

1. choose the proofofworklimit i want for my network (>> 24 for tests for example) chainparams.cpp : bnProofOfWorkLimit per network

2. set those accordiningly:
genesis.nTime = something close to current time, just for information purpose
genesis.nBits = accordiningly to your bnProofOfWorkLimit
genesis.nNonce = 0; // start with zero onfirst run (or whatever)

eventually properly set the coinbase output (you'll have to know how to generate public keys)

3. right before assertion on hash & merkle, add something like this:
Code:
uint256 hashTarget = uint256().SetCompact(genesis.nBits);
while (genesis.GetHash() > hashTarget) {
    ++genesis.nNonce;
    if (genesis.nNonce == 0) { ++genesis.nTime; }
}

// log your full genesis block (ntime, nonce, hash & tx merkle root)

hashGenesisBlock = genesis.GetHash();
assert(hashGenesisBlock == uint256(.....
assert(genes.....

4. build and run for the first time. this will take some time, according to your proofofwork limit & nbits (you're actually 'mining' the genesis block right now), then have a look at the logs _you_ generated ; copy genesis block data (ntime, nNonce, merkle & hash) to your sourcecode.

5. disable code added in step 3, rebuild, voila ....

This way, you really have valid data starting with your genesis block. Many altcoins have genesis blocks that already violates their own rules ...

Note that you'll have to log your genesis block data by yourself, as no logging is initialized at that point.




Last thing (yeah, i know this gets boring, but it's the only way you'll end up _really_ learning anything) : try things, LOG things, do not ask for copy/paste answers as soon as a problem comes in, logging is the key, when facing serious problems that you couldn't solve by intense logging/debugging i bet you'll get quite some serious answers to .. your serious questions Smiley

BTC: 17CHqn3XE3Waf7Qfkm9p2MQE1VgB8gVbG4
kurdcoin
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 29, 2017, 10:52:35 AM
 #7

Jesus fck, I'm only 14. I never even said I was going to release this coin, take it easy. Seriously though, you have to start somewhere, right?

starting with something as "big" as bitcoin in terms of understandings it requires may be a bit overwhelming, anyway, here are a few things:

i just had a look at your 'create an altcoin howto' page, i don't really like the way they 'explain' how to create the genesis block.

Personally, i generate mine using the following procedure :

this is, supposing you already understood and set the network parameters.

1. choose the proofofworklimit i want for my network (>> 24 for tests for example) chainparams.cpp : bnProofOfWorkLimit per network

2. set those accordiningly:
genesis.nTime = something close to current time, just for information purpose
genesis.nBits = accordiningly to your bnProofOfWorkLimit
genesis.nNonce = 0; // start with zero onfirst run (or whatever)

eventually properly set the coinbase output (you'll have to know how to generate public keys)

3. right before assertion on hash & merkle, add something like this:
Code:
uint256 hashTarget = uint256().SetCompact(genesis.nBits);
while (genesis.GetHash() > hashTarget) {
    ++genesis.nNonce;
    if (genesis.nNonce == 0) { ++genesis.nTime; }
}

// log your full genesis block (ntime, nonce, hash & tx merkle root)

hashGenesisBlock = genesis.GetHash();
assert(hashGenesisBlock == uint256(.....
assert(genes.....

4. build and run for the first time. this will take some time, according to your proofofwork limit & nbits (you're actually 'mining' the genesis block right now), then have a look at the logs _you_ generated ; copy genesis block data (ntime, nNonce, merkle & hash) to your sourcecode.

5. disable code added in step 3, rebuild, voila ....

This way, you really have valid data starting with your genesis block. Many altcoins have genesis blocks that already violates their own rules ...

Note that you'll have to log your genesis block data by yourself, as no logging is initialized at that point.




Last thing (yeah, i know this gets boring, but it's the only way you'll end up _really_ learning anything) : try things, LOG things, do not ask for copy/paste answers as soon as a problem comes in, logging is the key, when facing serious problems that you couldn't solve by intense logging/debugging i bet you'll get quite some serious answers to .. your serious questions Smiley


you just saved my life, thanks man
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!