Bitcoin Forum
May 11, 2024, 05:26:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Clarification on Bitcoin Developer Guide: Proof of Work  (Read 672 times)
actmyname (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2562
Merit: 2504


Spear the bees


View Profile WWW
March 21, 2017, 09:49:40 PM
 #1

Note: I realize that there is a disclaimer that states the possibility of errors, and thus have come here to ask for an explanation.



On the segment of Proof Of Work, it is stated

Quote
To prove you did some extra work to create a block, you must create a hash of the block header which does not exceed a certain value. For example, if the maximum possible hash value is 2256 − 1, you can prove that you tried up to two combinations by producing a hash value less than 2255.

In the example given above, you will produce a successful hash on average every other try.

I don't quite understand this. Is there not a huge gap between 2255 and 2256-1? If you tried up to only two combinations (I'm assuming this is a hash value of 2256 and 2256-1) then how would you be able to produce a successful hash every other try?



I'm not too huge on hashing so a layman explanation for that including this would also help. My thought so far on how it would work is that you're given a random value <=2256.

The only other logical explanation I might have is that they mean that you would produce a successful hash on average every other try if the target was 2255.

1715405198
Hero Member
*
Offline Offline

Posts: 1715405198

View Profile Personal Message (Offline)

Ignore
1715405198
Reply with quote  #2

1715405198
Report to moderator
1715405198
Hero Member
*
Offline Offline

Posts: 1715405198

View Profile Personal Message (Offline)

Ignore
1715405198
Reply with quote  #2

1715405198
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
March 21, 2017, 09:56:26 PM
 #2

I don't quite understand this. Is there not a huge gap between 2255 and 2256-1? If you tried up to only two combinations (I'm assuming this is a hash value of 2256 and 2256-1) then how would you be able to produce a successful hash every other try?
It says on average, so given a big number of tries, half of them would be greater than 2255 and half would be less. I don't think saying "every other try" is the right wording for this.

actmyname (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2562
Merit: 2504


Spear the bees


View Profile WWW
March 21, 2017, 10:07:36 PM
 #3

It says on average, so given a big number of tries, half of them would be greater than 2255 and half would be less. I don't think saying "every other try" is the right wording for this.

I see what you're saying, but the problem is that AFAICT they were making the target value 2256-1 in the example and attempting to use 2255 in the second without stating it, which is incorrect when you're speaking about having a successful hash every other attempt.

I understand the maths of statistically succeeding every other attempt, which occur when the target value is 2255.



So is this just simply an error in their paragraph?

achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
March 21, 2017, 10:13:02 PM
Merited by ABCbits (1)
 #4

I see what you're saying, but the problem is that AFAICT they were making the target value 2256-1 in the example and attempting to use 2255 in the second without stating it, which is incorrect when you're speaking about having a successful hash every other attempt.
No, they were saying that 2256-1 is the biggest possible number which a hash could be, indicating that the hash is a 256-bit hash. The target is 2255.

So is this just simply an error in their paragraph?
It's just a weird way of saying that the hash is a 256-bit hash.

actmyname (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2562
Merit: 2504


Spear the bees


View Profile WWW
March 21, 2017, 10:25:36 PM
Last edit: March 22, 2017, 11:27:25 AM by actmyname
 #5

No, they were saying that 2256-1 is the biggest possible number which a hash could be, indicating that the hash is a 256-bit hash. The target is 2255.

In that case, would this be the error?

"For example, if the maximum possible hash value is 2256 − 1, you can prove that you tried up to two combinations by producing a hash value less than 2255."

Up to two combinations doesn't make sense considering how you can produce up to 2255-1 different hashes that would be higher than the target value (correct me on my math if I'm wrong)
.

I've got it now! Thanks for the clarification: it didn't make too much sense to me.

(You produce up to two combinations since one is successful and the other is unsuccessful)



Truly, the folly of man lies in his ability to communicate.



[Locked. In case there are extra comments to be made about PoW process; please PM me - I'd love to learn more]

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!