Bitcoin Forum
May 10, 2024, 10:36:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: what is to be hashed in the bolck and where does they come from?  (Read 1578 times)
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 03:15:51 AM
 #1

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.
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
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?
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 ?
4    bits    uint32_t    The calculated difficulty target being used for this block
~~~~~~~~~~~~~~~~~~~~~~~I think it's come from the Bitcoin network
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?
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
1715380608
Hero Member
*
Offline Offline

Posts: 1715380608

View Profile Personal Message (Offline)

Ignore
1715380608
Reply with quote  #2

1715380608
Report to moderator
1715380608
Hero Member
*
Offline Offline

Posts: 1715380608

View Profile Personal Message (Offline)

Ignore
1715380608
Reply with quote  #2

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

Posts: 1715380608

View Profile Personal Message (Offline)

Ignore
1715380608
Reply with quote  #2

1715380608
Report to moderator
1715380608
Hero Member
*
Offline Offline

Posts: 1715380608

View Profile Personal Message (Offline)

Ignore
1715380608
Reply with quote  #2

1715380608
Report to moderator
xenon481
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile
June 01, 2011, 03:20:22 AM
 #2

How do we identify the block creator ?

The following:

Quote
32    merkle_root    char[32]    The reference to a Merkle tree collection which is a hash of all transactions related to this block

That Merkle tree is a hash of the transactions which includes the 50BTC generation to the creator's address.

Tips Appreciated: 171TQ2wJg7bxj2q68VNibU75YZB22b7ZDr
Quantumplation
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
June 01, 2011, 03:23:31 AM
 #3

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."

Quote
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.
Quote
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".
Quote
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.
Quote
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.
Quote
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.
Quote
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.

NOTE: This account was compromised from 2017 to 2021.  I'm in the process of deleting posts not made by me.
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 03:29:58 AM
 #4

Are there any fields not mentioned above to be hashed when mining?
xenon481
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile
June 01, 2011, 03:33:20 AM
 #5

Are there any fields not mentioned above to be hashed when mining?

No.

Tips Appreciated: 171TQ2wJg7bxj2q68VNibU75YZB22b7ZDr
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 03:38:48 AM
 #6

Quote

Quote
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".

When mining, how to fill this field?
Quantumplation
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
June 01, 2011, 03:50:47 AM
 #7

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

NOTE: This account was compromised from 2017 to 2021.  I'm in the process of deleting posts not made by me.
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 04:09:46 AM
 #8

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

Okay, how do we fill the tree leaves?
Quantumplation
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
June 01, 2011, 06:36:54 AM
 #9

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

Okay, how do we fill the tree leaves?


Transactions.

NOTE: This account was compromised from 2017 to 2021.  I'm in the process of deleting posts not made by me.
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 06:42:46 AM
 #10

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

Okay, how do we fill the tree leaves?


Transactions.

I don't understand the concept, we will have transactions after the block is found, right?
block is used for transactions.

What transaction do we have before the block found (while mining)?
Quantumplation
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
June 01, 2011, 07:39:32 AM
 #11

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

Okay, how do we fill the tree leaves?


Transactions.

I don't understand the concept, we will have transactions after the block is found, right?
block is used for transactions.

What transaction do we have before the block found (while mining)?


Blocks contain transactions.  The fact that a block contains them "verifies" them.  A transaction is generated by someone saying "I want to send coins."  Have a look at http://blockexplorer.com/, gives some pretty useful block data.

NOTE: This account was compromised from 2017 to 2021.  I'm in the process of deleting posts not made by me.
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 01, 2011, 07:49:49 AM
 #12

Quote

Quote
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".

When mining, how to fill this field?


http://en.wikipedia.org/wiki/Hash_tree

Okay, how do we fill the tree leaves?


Transactions.

I don't understand the concept, we will have transactions after the block is found, right?
block is used for transactions.

What transaction do we have before the block found (while mining)?


Blocks contain transactions.  The fact that a block contains them "verifies" them.  A transaction is generated by someone saying "I want to send coins."  Have a look at http://blockexplorer.com/, gives some pretty useful block data.

Thank you.

From following page, such as my understanding, when mining, the miner/client fills the Merkle with a algorithm result (like a several hash) of the creator's receiving address.

Is that true?


https://en.bitcoin.it/wiki/Block_hashing_algorithm
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!