Bitcoin Forum
June 03, 2024, 04:04:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / What are these variables in the Genesis Block and how were they determined? on: September 26, 2017, 07:41:30 PM
Hi all!

I'm currently writing a program to generate a genesis block for a new altcoin fork that I'm coding for fun. So far I've identified a couple of sources that I've been working from, notably Gnaf's GenesisBlockZero and of course the original v8 Bitcoin source.

However I'm stuck at figuring out what the scripSig and scriptPubKey represent in the genesis block and how they are determined. These can be found on lines 2779 and 2781 on the main.cpp code here:

https://github.com/bitcoin/bitcoin/blob/0.8/src/main.cpp

I'll paste them here for convenience:

 txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));

 txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;

Could anyone help me out in figuring out what the numbers in the first one mean. And for the second one, where is that hash from??

Thanks for your time.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!