colonelwatch / nonceMiner

Casual project implementing hash midstate caching to make a very fast miner for revoxhere's duino-coin
GNU General Public License v3.0
39 stars 13 forks source link

Miner detection #17

Closed viktor02 closed 3 years ago

viktor02 commented 3 years ago

05400 What about the miner detection in the panel?

colonelwatch commented 3 years ago

It takes time for the miner panel to show anything in general, give it a minute or so. If it takes more than that, I don't run the panel, so please let the duino-coin maintainers know.

viktor02 commented 3 years ago

изображение изображение

Yes, but yesterday I launched the miner within an hour, and there were no changes in "YOUR MINERS" or in the balance. Now I have launched in parallel the official miner on the CPU and yours on the GPU. The miner on the cpu, which I launched much later (about 15 minutes), appeared in the panel. Local transactions are visible only for the period when I launched the official cpu miner P.s. Apart from cosmetic changes and fixing a bug with encoding, I did not make changes in your miner P.s.s Sorry for russian on screenshots, i dont know how to change language in it

colonelwatch commented 3 years ago

No worries about the Russian. I used this feature in the Windows API that interpreted socket error codes, and I left it set to the system-default language.

And yes, that does seem to be odd. I wonder if the connection timeout is related? Also, I just ran nonceMiner today to check that out, and the profit appears to be zero, even though some shares have been accepted. This is despite the official PC miner generating profit (though WAY less than I expected, corroborating with revoxhere/duino-coin#723) and showing up in the miners panel.

I hadn't seen any of these issues as I was developing the program. Something on the server must have changed recently.

viktor02 commented 3 years ago

Thanks for the answer

used this feature in the Windows API that interpreted socket error codes, and I left it set to the system-default language.

Yes, but the problem is that it is not output in the system encoding by default. I needed to do setlocale (LC_ALL, "") for it to work correctly.

I wonder if the connection timeout is related?

Recently, it has shown to me that not only an error receiving job, but also warns that the ping does not reach the master server

though WAY less than I expected,

In the official discord, they wrote that there was a problem with the server and there was a message that the servers could crash. However, today this message is gone, but I still have 0 duino coins :)

viktor02 commented 3 years ago

изображение Update: the miner started showing up. However, there is still no income. I also found another bug, the message about the hash is duplicated if there were no acceptances

colonelwatch commented 3 years ago

Thanks for all the logs and screenshots, it's useful information. I can reproduce the same problem on my computer. Maybe it's some kind of bug on the server that's interacting with third-party programs? I should open an issue on the duino-coin repository, I suppose.

Yes, but the problem is that it is not output in the system encoding by default. I needed to do setlocale (LC_ALL, "") for it to work correctly.

Oh, I didn't know about this! If setlocale is all it needs, then I could accept that change. Otherwise, language programming and translation is not something I plan to get into any time soon, so I might just default the error code interpretations to English. What do you think?

I also found another bug, the message about the hash is duplicated if there were no acceptances

Regarding the bug, that was something I had to accept back when I was writing that part of the program. At the time, a dead connection and a live connection were indistinguishable, and all you could do was assume it was dead when the timeout expires. The natural result of that is that the hashrate counter cannot be cleared until the connection has been declared dead. Nowadays, there's this ping feature in the mining protocol that can prove a connection is dead or not much quicker, maybe I'll try implementing it one day? I'll open an issue regarding that.

viktor02 commented 3 years ago

Otherwise, language programming and translation is not something I plan to get into any time soon, so I might just default the error code interpretations to English. What do you think?

Yes, I think it would be better that way. But if it is difficult to implement, then you can simply add three lines with setlocale and this will work too.

viktor02 commented 3 years ago

image

Yep! it works after i changed this line to

len = sprintf(buf, "%ld,%d,myminer,%s\n", nonce, local_hashrate, identifier);

Looks like your name something broke.

colonelwatch commented 3 years ago

That's good. I was hoping for some help from the duino-coin project maintainers about the original name, but if this solution works then it works. For the sake of getting nonceMiner back up and running as fast as possible, I'm going to add a program name override option.

colonelwatch commented 3 years ago

@mahesh1987-16, I deleted your comment because it was off-topic. Also, I do not handle issues over personal email because the exchange will not help anyone else. If you still want help with your problem, please open a new issue and describe your problem.