Pages:
Author

Topic: Block generation technical specifics - page 2. (Read 1733 times)

sr. member
Activity: 277
Merit: 250
September 09, 2014, 05:29:23 PM
#11
Thanks for the help everyone.

I think I understand it a bit more, but still have some questions:

Did you look at this page?
It explains the process quite nicely
https://en.bitcoin.it/wiki/Block_hashing_algorithm

What do you mean "the same hash as the one in the block?"

I believe he is asking if his miner is looking for the "answer" that is calculated when the block is established.

So imagine you go up to a really hard math problem you've never seen; It has an answer, you just don't know what it is. He is asking if that's how Bitcoin works.

The page you've posted is the best answer to this question.
I see.
Actually we're not looking for a specific hash, we're looking for any hash that starts with enough zeroes.
So yeah, the best answer is the page I posted. See also my previous post and the question it was replying to.
I noticed the line in the article about zeroes: "Note that the actual hash, which is a 256-bit number, has lots of leading zero bits. When stored or printed as a big-endian hexadecimal constant, but it has leading zero bytes and if stored or printed as little-endian, these are the trailing zero bytes. E.g. if interpretation as a string -- lowest (or start of) string address keeps lowest significant byte, thus little-endian. The output of blockexplorer displays the hash values as big-endians numbers as notation for numbers is usual -- leading digits are the most significant digits read from left to right."

Not gonna lie, I hardly understand anything in that paragraph.

So, if I'm understanding you right, when the hash has you generate has enough zeroes, you discover that block? Is the amount of zeroes needed defined by the difficulty? And if all hashes start with zeroes, what makes it so hard for the hash to have the right number of zeroes?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 09, 2014, 05:27:39 PM
#10
If I understand correctly, yes it's a yes. You can always find variable1 and variable2 values that will make the hash starting with enough zeroes.

And no it doesn't have any adverse effect. It's just like changing the nonce.
Except that if the time is too much off, then nodes will refuse to propagate the new block.
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
September 09, 2014, 05:19:05 PM
#9
A bitcoin block hash is a sha256 (32 bytes)
The hashed data contains several things, including the current time, the previous block hash and a random "nonce"
Also there's a "target" (depending on the total bitcoin hashrate) value being calculated and which gives the number of zeroes your block must start with to be valid
If your block hash doesn't starts with enough zeroes, then you should try again with another nonce

Tell me if it's too basic

Just trying to clarify something here. Does this mean that the next block hash may be different if found by 2 different miners (obviously I know the earlier one wins the race) ? As I can see here, there r 2 variables and one constant to find the next hash with given no. of zeroes at the beginning...

Variable 1 => current time

Variable 2 => random "nonce"

Constant => previous block hash

So, required no. of zeroes can be found with different Variable 1 & Variable 2 ...is not it ?
Yes.
No.

Actually, the number of zeroes if defined in advance (every 2016 blocks).
So when you're looking for a block the target is already set. And that's how you know your block is valid: it is below the target.

By 'required no. of zeroes', I mean a fixed no. that can be achieved by different values of Variable 1 & Variable 2. I guess, now both the answers are 'Yes' !!!

Moreover, what if the miner tampers his current timestamp ? Does it have any adverse effect ?

By the way, I just quoted your explanation here => https://bitcointalksearch.org/topic/m.8751939 ...Hope u dont mind !!!
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 09, 2014, 05:11:00 PM
#8
Did you look at this page?
It explains the process quite nicely
https://en.bitcoin.it/wiki/Block_hashing_algorithm

What do you mean "the same hash as the one in the block?"

I believe he is asking if his miner is looking for the "answer" that is calculated when the block is established.

So imagine you go up to a really hard math problem you've never seen; It has an answer, you just don't know what it is. He is asking if that's how Bitcoin works.

The page you've posted is the best answer to this question.
I see.
Actually we're not looking for a specific hash, we're looking for any hash that starts with enough zeroes.
So yeah, the best answer is the page I posted. See also my previous post and the question it was replying to.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 09, 2014, 05:07:50 PM
#7
A bitcoin block hash is a sha256 (32 bytes)
The hashed data contains several things, including the current time, the previous block hash and a random "nonce"
Also there's a "target" (depending on the total bitcoin hashrate) value being calculated and which gives the number of zeroes your block must start with to be valid
If your block hash doesn't starts with enough zeroes, then you should try again with another nonce

Tell me if it's too basic

Just trying to clarify something here. Does this mean that the next block hash may be different if found by 2 different miners (obviously I know the earlier one wins the race) ? As I can see here, there r 2 variables and one constant to find the next hash with given no. of zeroes at the beginning...

Variable 1 => current time

Variable 2 => random "nonce"

Constant => previous block hash

So, required no. of zeroes can be found with different Variable 1 & Variable 2 ...is not it ?
Yes.
No.

Actually, the number of zeroes if defined in advance (every 2016 blocks).
So when you're looking for a block the target is already set. And that's how you know your block is valid: it is below the target.
legendary
Activity: 1628
Merit: 1012
September 09, 2014, 05:03:17 PM
#6
Did you look at this page?
It explains the process quite nicely
https://en.bitcoin.it/wiki/Block_hashing_algorithm

What do you mean "the same hash as the one in the block?"

I believe he is asking if his miner is looking for the "answer" that is calculated when the block is established.

So imagine you go up to a really hard math problem you've never seen; It has an answer, you just don't know what it is. He is asking if that's how Bitcoin works.

The page you've posted is the best answer to this question.
legendary
Activity: 2394
Merit: 1216
The revolution will be digital
September 09, 2014, 05:02:38 PM
#5
A bitcoin block hash is a sha256 (32 bytes)
The hashed data contains several things, including the current time, the previous block hash and a random "nonce"
Also there's a "target" (depending on the total bitcoin hashrate) value being calculated and which gives the number of zeroes your block must start with to be valid
If your block hash doesn't starts with enough zeroes, then you should try again with another nonce

Tell me if it's too basic

Just trying to clarify something here. Does this mean that the next block hash may be different if found by 2 different miners (obviously I know the earlier one wins the race) ? As I can see here, there r 2 variables and one constant to find the next hash with given no. of zeroes at the beginning...

Variable 1 => current time

Variable 2 => random "nonce"

Constant => previous block hash

So, required no. of zeroes can be found with different Variable 1 & Variable 2 ...is not it ?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 09, 2014, 04:47:52 PM
#4
Did you look at this page?
It explains the process quite nicely
https://en.bitcoin.it/wiki/Block_hashing_algorithm

What do you mean "the same hash as the one in the block?"
sr. member
Activity: 277
Merit: 250
September 09, 2014, 04:45:25 PM
#3
A bitcoin block hash is a sha256 (32 bytes)
The hashed data contains several things, including the current time, the previous block hash and a random "nonce"
Also there's a "target" (depending on the total bitcoin hashrate) value being calculated and which gives the number of zero's your block must start with to be valid

Tell me if it's too basic
I mean, what is my miner doing when it's running? Is it running through thousands of hashes a second trying to get the same hash as the one in the block?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
September 09, 2014, 04:41:52 PM
#2
A bitcoin block hash is a sha256 (32 bytes)
The hashed data contains several things, including the current time, the previous block hash and a random "nonce"
Also there's a "target" (depending on the total bitcoin hashrate) value being calculated and which gives the number of zeroes your block must start with to be valid
If your block hash doesn't starts with enough zeroes, then you should try again with another nonce

Tell me if it's too basic
sr. member
Activity: 277
Merit: 250
September 09, 2014, 01:49:31 PM
#1
For the technical aspect of bitcoin mining I'm not sure how one actually 'finds a block' and how a hash comes into play. I think it works that there's a long string of numbers and letters like 002727281HFFJjGjb857. This is a hash. A miner runs through millions of hashes a second in search of THE block's hash. When the miner has the same hash as the block's hash the miner gets the btc reward. When the difficulty goes up the hash gets more complex. Is this correct? Thanks Smiley

P.S. Please don't tell me to google it. I have tried and can't seem to find a good middle ground. The explanations I've found are either too complex or too basic. The too complex ones bring the math of creating the hash into it and the too basic don't go into hashes too much.
Pages:
Jump to: