Я слышал такие термины как fastloop, long polling. Все это надо для справедливой выплаты награды или для оптимизации вычислений при нахождении новых блоков?
long polling - для второго.
What is long polling, and how is it different from the way miners usually work?
The short answer:
Instead of inefficiently requesting new work every 5 - 10 seconds the server sends new work only when the miner needs it. This means approx. a 2% increase in mining efficiency, because of rarely having stale shares, and far less server load for the pool operator.
Stale shares occur in two cases: if you have submitted a "good" hash of the "work" but someone had found a new block before you submitted your hash, or you submit a hash that is identical to one that has already been submitted.
Usually stale shares indicate that you were still processing old work and submitting hashes that were no longer valid. This happens less with long polling because the server informs the miner when a new block should be worked on, instead of waiting for the miner to ask.
The longer answer:
The way a standard piece of mining software works:
1) When the miner is run, the operator passes in a number of seconds after which the program should ask for more "work" (called a "getwork request" or just "getwork") or the program uses whatever its default number is (usually 5 or 10 seconds).
2) The miner requests this "work" from the server it is connected to.
3) The miner hashes this "work" in search of a hash for the next block.
4) Whether the miner has searched this header thoroughly or not, after the number of seconds set in step one, the miner asks for a new piece of "work" in order to make sure the hash it is searching for is still the correct one.
How long polling is different:
1) No special getwork options need to be included to enable long polling if your miner supports it, though you may still choose to include an option for the maximum time before a new getwork request is sent.
2) The miner sends a "getwork request".
3) If the server supports long polling, it sends a response with a long polling URL.
4) The miner then initiates a second connection with the server using the long polling URL, which is not answered unless the server finds a new block.
5) If the server either finds a new block, or is informed that one has been found by the bitcoin network, it sends a new piece of work to the miner on this second connection.
6) Upon receiving a piece of work on the long polling specific connection, the miner stops all current processing (which would now only be potential stale shares) and starts processing this new piece of work. The miner also opens up a another long polling connection.