Author

Topic: What in header can be changed (Read 518 times)

jr. member
Activity: 45
Merit: 4
June 24, 2016, 11:25:13 AM
#9
Quote
ave you read these?

yes, the last one is even in my favourites bar. But like I said I wanted to double-check and sometimes it is hard for someone like me to read and comprehend such technical info compared to asking a direct question on a forum like this which has a section for beginners with helpful members who are willing to help.
jr. member
Activity: 45
Merit: 4
June 24, 2016, 04:38:41 AM
#7
Thanks knightdk  Smiley
staff
Activity: 3458
Merit: 6793
Just writing some code
June 23, 2016, 10:12:08 AM
#6
Thanks a lot, really helpful.

One last question. Is a extranonce calculated as such:

Hash(Coinbase)+Hash(Extranonce) Then added to Merkle root as such Hash(Transaction total), concatenate to Coinbases hash and then re-hashed?

Is there any way to manipulate the first part of a merkle root (using extranonce within coinbase) eg

ca6f05ee8d7db3038bef35ae795a2fd2431f8c278dae61820974a872bc1878f7

No and no. The extranonce is just changing the data inside of a coinbase transaction. This changes the coinbase hash and thus the merkle root. The merkle root can only be manipulated by changing the transaction data.
jr. member
Activity: 45
Merit: 4
June 23, 2016, 08:48:44 AM
#5
Thanks a lot, really helpful.

One last question. Is a extranonce calculated as such:

Hash(Coinbase)+Hash(Extranonce) Then added to Merkle root as such Hash(Transaction total), concatenate to Coinbases hash and then re-hashed?

Is there any way to manipulate the first part of a merkle root (using extranonce within coinbase) eg

ca6f05ee8d7db3038bef35ae795a2fd2431f8c278dae61820974a872bc1878f7
staff
Activity: 3458
Merit: 6793
Just writing some code
June 23, 2016, 07:43:18 AM
#4
Thanks for the quick reply.

Quote
The coinbase transaction can also have an extranonce which miners use to change the coinbase and thus the merkle root.

This extranonce, is it a random number or is it defined by something else. All this time I thought extranonce meant nonce and once this has been exhausted we move onto updating the timestamp to current time and re-trying. Another thing was once 2 hours have maxed out on the time-stamp what happens then (or is it that once, 2 hours have gone then time-stamp is updated to current time)
The extranonce is part of the coinbase scriptsig, where the miner can insert any data that they want. Usually the first for bytes of the scriptsig is used for the extranonce. It works in the exact same way as the nonce. Typically miners go through the set of nonces for each extranonce.

Quote
This doesn't entirely make sense.

What I'm trying to ask is basically if we have 2 previous blocks A & B, what determines a certain transaction is allocated to previous block A and not previous block B.
Nothing determines that. Transactions are not allocated to blocks. They are chosen from the mempool by the miner. Any transaction in the mempool is eligible to be included into any block. Once it is included, the transaction is removed from the mempool.


Quote
What are these hashes of?

These are random Transaction I got from online to illustrate of how I think a merkle root is calculated. I have done - hash Transaction1 then hash Transaction2 then concatenate then hash again. Is this correct?
That is correct. When constructing the merkle root, it is important that the initial hashes are in the same order that the transactions appear in the block.
jr. member
Activity: 45
Merit: 4
June 23, 2016, 07:35:26 AM
#3
Thanks for the quick reply.

Quote
The coinbase transaction can also have an extranonce which miners use to change the coinbase and thus the merkle root.

This extranonce, is it a random number or is it defined by something else. All this time I thought extranonce meant nonce and once this has been exhausted we move onto updating the timestamp to current time and re-trying. Another thing was once 2 hours have maxed out on the time-stamp what happens then (or is it that once, 2 hours have gone then time-stamp is updated to current time)

Quote
This doesn't entirely make sense.

What I'm trying to ask is basically if we have 2 previous blocks A & B, what determines a certain transaction is allocated to previous block A and not previous block B.

Quote
What are these hashes of?

These are random Transaction I got from online to illustrate of how I think a merkle root is calculated. I have done - hash Transaction1 then hash Transaction2 then concatenate then hash again. Is this correct?
staff
Activity: 3458
Merit: 6793
Just writing some code
June 23, 2016, 07:18:45 AM
#2
I've tried doing research on this and found bits and bobs but would like someone to give me a definitive answer please. Is this correct:

Version          - Can't be changed

Prev. Block     - Can't be changed * please see below

Merkle Root    - Can be changed according to amount of transactions and their hashes (I've seen trees of people trying to illustrate on how to
                      calculate this but fail to understand. Is it as simple as = hash(hash(Tx 1) + hash(Tx 2)) please see below **

Time             - Can be changed. 2 hours max + greater than median of past 11 blocks

Bits               - Not sure. Is this only adjusted every 2016 blocks and I have to keep to this value eg 3/21/13 8:09:35, 436434426

Nonce            - Can be changed. This is incremented + 1 to find correct nonce for block
Yes that is correct. The bits can only change every 2016 blocks at the difficulty retarget.

The coinbase transaction can also have an extranonce which miners use to change the coinbase and thus the merkle root.

* what determines that a certain set of transactions are allocated to a certain previous block (ie does this have to do with the coinbase transaction? What if there are 2 coinbase transaction in this)
This doesn't entirely make sense.

A transaction can only be included in a block once. The miner must have analysed the full blockhain and determined what transactions are already included. Then the next block will be filled with transactions that have not been included. It has nothing to do with the coinbase.

There can only be one coinbase transaction and it just be the first transaction in a block.


T 1 = 7f3f451eb12a38d09f0d1c9064187bff0a6066f3b6cd01ee1f658110a2830b89 =   
        afc04b2992fe6cdd6024a0c5acb895f46c5fb9056e43ad8505e3e98e94b67dc7

T 2 = e82c735b579d93a07b64692e497487e25c59c944270ee473b0a7e36a0e0ec1e2 =
        0f01f48aff2d2c65787bb12f2d380555f5fa1c4106caa65b0b35aa5f651f805f

concatenate + hash = cd3ed269c34d6408fe96c4a70ba002962c9cf442e0cc194dc11c5795b3375446   Is this correct?

Thanks all
What are these hashes of?
jr. member
Activity: 45
Merit: 4
June 23, 2016, 07:08:22 AM
#1
I've tried doing research on this and found bits and bobs but would like someone to give me a definitive answer please. Is this correct:

Version          - Can't be changed

Prev. Block     - Can't be changed * please see below

Merkle Root    - Can be changed according to amount of transactions and their hashes (I've seen trees of people trying to illustrate on how to
                      calculate this but fail to understand. Is it as simple as = hash(hash(Tx 1) + hash(Tx 2)) please see below **

Time             - Can be changed. 2 hours max + greater than median of past 11 blocks

Bits               - Not sure. Is this only adjusted every 2016 blocks and I have to keep to this value eg 3/21/13 8:09:35, 436434426

Nonce            - Can be changed. This is incremented + 1 to find correct nonce for block

* what determines that a certain set of transactions are allocated to a certain previous block (ie does this have to do with the coinbase transaction? What if there are 2 coinbase transaction in this)

T 1 = 7f3f451eb12a38d09f0d1c9064187bff0a6066f3b6cd01ee1f658110a2830b89 =   
        afc04b2992fe6cdd6024a0c5acb895f46c5fb9056e43ad8505e3e98e94b67dc7

T 2 = e82c735b579d93a07b64692e497487e25c59c944270ee473b0a7e36a0e0ec1e2 =
        0f01f48aff2d2c65787bb12f2d380555f5fa1c4106caa65b0b35aa5f651f805f

concatenate + hash = cd3ed269c34d6408fe96c4a70ba002962c9cf442e0cc194dc11c5795b3375446   Is this correct?

Thanks all
Jump to: