By what formula is the genesis-hash calculated?

The following content was written by Many Coins on February 16, 2018, 06:36:09 PM in the thread By what formula is the genesis-hash calculated?. All content is owned by the author of the bitcointalk.org post. (original)

Hello!

Tell me please: by what formula is the genesis-hash calculated?

Code:

That is:

Code:

what?

I understand that this is a hash from something But from what?

Thank you.

The following content was written by achow101 on February 16, 2018, 09:07:51 PM in the thread By what formula is the genesis-hash calculated?. All content is owned by the author of the bitcointalk.org post. (original)

It’s the hash of the genesis block. The genesis blocks parameters can be found in chainparams.cpp. It is then serialized and hashed.

The following content was written by ir.hn on February 17, 2018, 04:44:58 AM in the thread By what formula is the genesis-hash calculated?. All content is owned by the author of the bitcointalk.org post. (original)

This:

printf(“calc new genesis block\n”);
printf(“hashMerkleRoot %s\n”, genesis.hashMerkleRoot.ToString().c_str());
printf(“bnProofOfWorkLimit 0x%x\n”, bnProofOfWorkLimit.GetCompact());
printf(“genesis.nBits 0x%x\n”, genesis.nBits);

for (genesis.nNonce = 0; ; genesis.nNonce++) {
hashGenesisBlock = genesis.GetHash();
if (hashGenesisBlock <= bnProofOfWorkLimit.getuint256()) break;
}

printf(“hashGenesisBlock %s\n”, hashGenesisBlock.ToString().c_str());
printf(“genesis.nNonce %d\n”, genesis.nNonce);

The following content was written by Many Coins on February 17, 2018, 08:41:07 AM in the thread By what formula is the genesis-hash calculated?. All content is owned by the author of the bitcointalk.org post. (original)

Thank you. I’ll try to figure it out