Title: higher difficulty acceptance from the node Post by: Mota on June 02, 2013, 11:36:06 AM I searched around and found nothing in the forum, so here it is:
If one artificially raises the difficulty of the block and finds a valid hash for the higher difficulty, would it get accepted by the node? Also, I can't wrap my head around the lesser difficulty in some mining pools. How are they accepted if they have lesser leading zeroes? Title: Re: higher difficulty acceptance from the node Post by: grau on June 02, 2013, 06:25:57 PM difficulty is not number of leading zeros, but a threshold number the block hash has to be less.
A block might satisfy a difficulty higher than currently required, and that would be accepted by others. The difficulty for next block does however not raise with that, its just waste of effort (or luck). Title: Re: higher difficulty acceptance from the node Post by: piotr_n on June 02, 2013, 07:04:39 PM If one artificially raises the difficulty of the block and finds a valid hash for the higher difficulty, would it get accepted by the node? No.It's in AcceptBlock function, in main.cpp Title: Re: higher difficulty acceptance from the node Post by: Mota on June 03, 2013, 02:10:17 PM Were in AcceptBlock? It seems I can't find a check against it.
Title: Re: higher difficulty acceptance from the node Post by: piotr_n on June 03, 2013, 02:16:44 PM Were in AcceptBlock? It seems I can't find a check against it. It's kind of hard to miss it, but well.. Code: // Check proof of work Title: Re: higher difficulty acceptance from the node Post by: Mota on June 03, 2013, 02:25:33 PM I saw that, but then it seems that I understood it wrong. Proof of work means for me that it checks if the target is smaller than the last hash given. If I have a higher difficulty (and more leading zeroes) then it should be smaller than the last hash, or did I miss something?
Title: Re: higher difficulty acceptance from the node Post by: piotr_n on June 03, 2013, 02:30:10 PM I saw that, but then it seems that I understood it wrong. Proof of work means for me that it checks if the target is smaller than the last hash given. If I have a higher difficulty (and more leading zeroes) then it should be smaller than the last hash, or did I miss something? Well in such case I think you probably only missed the lesson of C programming, where they were explaining the magic behind != symbol ;)Title: Re: higher difficulty acceptance from the node Post by: Mota on June 03, 2013, 02:55:35 PM ah. *cough* I am reading the code from my tv. bad excuse. -.-
|