Post
Topic
Board Pools
Re: [55+PH] KanoPool kano.is 10 BTC giveaway 🐈
by
kano
on 07/03/2018, 22:40:34 UTC
The API in bmminer and cgminer and a few other ones, was designed by me long ago.

It's a simple API that imposes very little overhead on the miner due to the design, since the miner's job is to ensure it does as much work as possible and gets the work results to the pool as quickly as possible.

It's nothing to do with the pool.
It's in every miner from Bitmain and Canaan.
Argh...  And I wrote a complex php script using curl to "log in" to my S9 / D3 miners to monitor and reboot them.  An api would have been much easier!  Are there reference docs that are easy to find on the web?  Bitmain's site does not have a lot of help documents that I could find.
https://github.com/kanoi/cgminer/blob/master/API-README

The basic API is the same in all miners, however, Bitmain broke it by removing certain value names and replacing them with different names, and changing the format of one of the fields to a completely different format - and they even did that twice to that field, to break their own format Tongue
My S1, S2 and S3 releases corrected those problems.
Yeah their coders are morons.
If you code to both the Canaan and Bitmain miners you'll need to notice the differences in field names and the Last Share field formats.
Canaan of course matches my document.
You'll see the different values they return when you access the API in bmminer.

I've always made it backwards compatible, since that's a rather obvious thing to do with any software, but even -ck didn't understand that and broke the backward compatibility once.
... experience vs hackers.