What do `minerd`s feedback messages (LONGPOLL, yay, boo) mean? I have been testing a script that essentially runs (incomplete command shown here!): minerd --algo scrypt -s 45 --retry-pause 5 --threads $threads --url ...

Among the feedback messages, while minerd is running, there are once in a while following messages:


LONGPOLL detected new block
...accepted: 1838/2122 (86.62%), 49.94 khash/s (yay!!!)
...accepted: 1832/2116 (86.58%), 50.00 khash/s (booooo)


What is a LONGPOLL and how is it related to the bigger picture of mining? What is the difference between a (yay!!!) and a (booooo) accepted message?

Finally, what is the percentage in parenthesis in an accepted message (as above) showing exactly? Why does it both increase and decrease during mining? Shouldn't it grow only upwards reaching the 100% level?
If I recall it correctly, the "boo"s mean: your answer's correct but somebody else had solved the problem before, so you wasted your electricity and time - sorry. And the "yay"s are: you did it first, congrats.

As for "LongPoll", it's a protocol that enables a miner to keep in touch with its pool's servers so that it's communicated as soon as possible when someone (within the pool or outside of it) discovers a solution for the current block - the miner can then stop working on that block immediately. All work up to that moment has been wasted, of course, but the waste's minimized this way - otherwise, your machine would just keep going, produce a result and deliver it... only to be informed then that it was way too late. Today, most pools support it - so you should see a lot of "longpoll" messages but relatively few (if any) "boo" :-)

Finally, as to the percentage: it tracks the number of solutions your machine has dispatched to your miner pool's servers, comparing the number of accepted ones versus the ones that got rejected. In an ideal world LongPoll would ensure your machine gets notified immediately upon someone else's discovery of a block's solution, and your machine would stop working on that block right away - so the percentage would always be 100%. In real world, lots of bad stuff can prevent this from happening.

What can you do to improve that percentage? Find out why you're having rejections! You might not be receiving the longpoll notifications, either due to your Internet connection being slow or the pool being under a DDoS attack - so change your Internet provider or go to another, smaller pool. You may have set up your ASIC or graphic cards to a too-aggressive configuration, try changing the settings of your miner. And some other things I can't remember right now - there are questions and answers about that on this site.