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