With in a block, there are following:
what is to be hashed in the bolck and where does they come from?
4 version uint32_t Block version information, based upon the software version creating this block
~~~~~~~~~~~~~~~~~~~~~~~I think it's self generated of come from a hardcode value.
It's so that, if the code changes down the line, we don't automatically reject this one because it's slightly different and thus don't recognize it. The code can look back and say "Oh yes, for version 1, this is how blocks were done, so it's valid."
32 prev_block char[32] The hash value of the previous block this particular block references
~~~~~~~~~~~~~~~~~~~~~~~I think it's come from the Bitcoin network
This comes from your local copy of the block chain, which you in turn got from someone else on the network solving the block.
32 merkle_root char[32] The reference to a Merkle tree collection which is a hash of all transactions related to this block
~~~~~~~~~~~~~~~~~~~~~~~What's this? where does it come from?
That ones a bit confusing and has to do with verifying all the transactions in the block more efficiently. google "merkle tree".
4 timestamp uint32_t A timestamp recording when this block was created (Limited to 2106!)
~~~~~~~~~~~~~~~~~~~~~~~Is there a NTP server or come from local CMOS clock ?
It's a weird hybrid "agreed upon" time that is calculated based on what other nodes on the network are saying the time is, so everyone
arrives at kind of an "average" time.
4 bits uint32_t The calculated difficulty target being used for this block
~~~~~~~~~~~~~~~~~~~~~~~I think it's come from the Bitcoin network
This comes from everyone agreeing (essentially) on what the difficulty should be because of the rate that blocks are being solved at.
4 nonce uint32_t The nonce used to generate this block… to allow variations of the header and compute different hashes
~~~~~~~~~~~~~~~~~~~~~~~What is this? where does it come from?
This is the magic number that you change in order to try and make the hash of the whole thing less than the difficulty. Essentially, you start at 0, change it to 1, 2, 3, 4, etc. until you find a valid block.
1 txn_count uint8_t Number of transaction entries, this value is always 0
~~~~~~~~~~~~~~~~~~~~~~~0
What else to be hashed when mining? and where are they come from?
How do we identify the block creator ?
Thanks
You identify the block "creator" by whoever was awarded the 50 bitcoins in the first "generation" transaction.