Bitcoin Forum
October 23, 2018, 09:34:41 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Where is the hash of the genesis block in the Bitcoin code ?  (Read 90 times)
RisitasLeGrand
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 11, 2018, 12:50:42 PM
 #1

Everything is in the title  Grin

Thanks in advance !  Wink
1540330481
Hero Member
*
Offline Offline

Posts: 1540330481

View Profile Personal Message (Offline)

Ignore
1540330481
Reply with quote  #2

1540330481
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540330481
Hero Member
*
Offline Offline

Posts: 1540330481

View Profile Personal Message (Offline)

Ignore
1540330481
Reply with quote  #2

1540330481
Report to moderator
eternalgloom
Legendary
*
Offline Offline

Activity: 1372
Merit: 1088


Crypto-Games.net: Multiple coins, multiple games


View Profile WWW
January 11, 2018, 01:06:15 PM
 #2

Everything is in the title  Grin

Thanks in advance !  Wink
There's an entry in the Bitcoin Wiki about that, here's the link to the page: https://en.bitcoin.it/wiki/Genesis_block

So, the hash of the genesis block is: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
The Bitcoin wiki article also mentions where it's found in the code Wink


▄▄▄████████▄▄▄
▄██████████████████▄
▄██████████████████████▄
██████████████████████████
████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
████████████████████████████
██████████████████████████
▀██████████████████████▀
▀██████████████████▀
▀▀▀████████▀▀▀
   ███████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
███████
BTC  ◉PLAY  ◉XMR  ◉DOGE  ◉BCH  ◉STRAT  ◉ETH  ◉GAS  ◉LTC  ◉DASH  ◉PPC
     ▄▄██████████████▄▄
  ▄██████████████████████▄        █████
▄██████████████████████████▄      █████
████ ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ████     ▄██▀
████ █████ ██████ █████ ████    ▄██▀
████ █████ ██████ █████ ████    ██▀
████ █████ ██████ █████ ████    ██
████ ▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀ ████ ▄██████▄
████████████████████████████ ████████
███████▀            ▀███████ ▀██████▀
█████▀                ▀█████
▀██████████████████████████▀
  ▀▀████████████████████▀▀ 
✔️DICE           
✔️BLACKJACK
✔️PLINKO
✔️VIDEO POKER
✔️ROULETTE     
✔️LOTTO
RisitasLeGrand
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 12, 2018, 09:46:54 AM
 #3

I don't find it, the "main.cpp" file doesn't exists anymore, I've looked for the Genesis Block hash in validation.cpp and net_processing.cpp but i don't find anything  Huh
LoyceV
Legendary
*
Online Online

Activity: 1274
Merit: 2148


Self-made Legendary!


View Profile WWW
January 12, 2018, 11:47:19 AM
 #4

I assume you've downloaded https://github.com/bitcoin/bitcoin, just search for the hash eternalgloom mentioned. Quick and dirty, but it works:
Code:
bitcoin-master $ for i in `find`; do grep 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f $i 2> /dev/null; done
                settings['genesis'] = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
        assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
    src/bitcoin-cli -named getblock blockhash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Or, if you want to see which files contain these lines:
Code:
bitcoin-master $ for i in `find`; do if [ -n "`grep 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f $i 2> /dev/null`" ]; then echo $i; fi; done
./contrib/linearize/linearize-data.py
./contrib/linearize/example-linearize.cfg
./src/chainparams.cpp
./doc/release-notes/release-notes-0.14.0.md

achow101
Moderator
Legendary
*
Offline Offline

Activity: 1554
Merit: 1706


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
January 13, 2018, 12:07:26 AM
 #5

I don't find it, the "main.cpp" file doesn't exists anymore, I've looked for the Genesis Block hash in validation.cpp and net_processing.cpp but i don't find anything  Huh
It's in chainparams.cpp

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!