Author

Topic: what is to be hashed in the bolck and where does they come from? (Read 1604 times)

newbie
Activity: 42
Merit: 0
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
sr. member
Activity: 308
Merit: 250
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.
newbie
Activity: 42
Merit: 0
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)?
sr. member
Activity: 308
Merit: 250
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.
newbie
Activity: 42
Merit: 0
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?
sr. member
Activity: 308
Merit: 250
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
newbie
Activity: 42
Merit: 0
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?
sr. member
Activity: 406
Merit: 250
Are there any fields not mentioned above to be hashed when mining?

No.
newbie
Activity: 42
Merit: 0
Are there any fields not mentioned above to be hashed when mining?
sr. member
Activity: 308
Merit: 250
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.
sr. member
Activity: 406
Merit: 250
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.
newbie
Activity: 42
Merit: 0
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
Jump to: