Bitcoin Forum
May 26, 2024, 08:33:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: getwork protocol work failure/success  (Read 926 times)
bnomis (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 11, 2013, 09:55:57 PM
 #1

Hi,

I am trying to understand the getwork protocol.

I have looked at the sources code of a few existing clients, but I still have some unresolved issues I would appreciate anyone hear would shed light on Smiley

As I understand it, clients will request "work" from the server, perform the work, and if the result is "correct", send back this result (the nonce) to the server. What happens to "incorrect" work loads. As far as I seen clients never send back results for works loads which did not match the correct target.

If that is the case, how does the server know not to ask another client to perform this work ? since that would be a waste.

If the server considers that any work load which has been un-answered was incorrect, are there not many lost work loads ? Does the server set the unanswered work load "back in the queue" to come up again if no better results were found since ?

Maybe I am missing something obvious ?

I apologise if this question seems dumb, I am just starting out in the bitcoin world (and I'm loving it!)

Thanks in advance
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
March 12, 2013, 12:05:52 AM
 #2

If that is the case, how does the server know not to ask another client to perform this work ? since that would be a waste.

There are multiple valid solutions for any piece of work.  Any hash at or above the specified difficulty.  So for a given unit of work, eventually someone else will also find a hash that meets the minimum difficulty requirement. 

But even that doesn't matter as the work to be performed changes with every new transaction or when work on a new block is started.   So a miner that solves a block but withholds publishing the solution harms the pool.   Over a period of time the pool can determine that a specific miner is doing this and give that miner the boot.

Even when that is discovered, it isn't worth going back and re-doing that work because since that time the work has changed (as now there are new transactions or new blocks or both).

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


bnomis (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 12, 2013, 08:33:59 PM
 #3

Thank you for your reply.

Essentially what you are saying is that work loads will eventually "expire". The fact there are so many loads and the expiry time is so low makes retrying "lost" work loads irrelevant ? ie: the data you're hashing is stale (new transactions, time, etc) ?

I guess that makes sense and pretty much answers my question.

Thanks again!
Fallon
Newbie
*
Offline Offline

Activity: 13
Merit: 0



View Profile WWW
March 12, 2013, 10:01:42 PM
 #4

The Stratum protocol is mostly replacing the getwork protocol. It's a more efficient protocol, in terms of server load & bandwith.
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!