Bitcoin Forum
April 28, 2024, 08:05:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 7 8 9 »  All
  Print  
Author Topic: COMPLETED: Request for an RPC capable fork of cgminer (155 BTC pledged and paid)  (Read 19166 times)
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 11, 2011, 03:06:42 PM
 #81

Kano,
I just got back from my vacation.  Hopefully tonight or tomorrow I will be able to test latest version.  Looks good so far.
1714291532
Hero Member
*
Offline Offline

Posts: 1714291532

View Profile Personal Message (Offline)

Ignore
1714291532
Reply with quote  #2

1714291532
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
tnkflx
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
December 11, 2011, 06:33:47 PM
 #82

Kano,

Sorry about the long wait, I'm going to test this as soon as I can find some time... Hopefully this evening or tomorrow ;-)

| Operating electrum.be & us.electrum.be |
runeks
Legendary
*
Offline Offline

Activity: 980
Merit: 1008



View Profile WWW
December 11, 2011, 11:26:47 PM
Last edit: December 11, 2011, 11:59:06 PM by runeks
 #83

It's a socket, not a web server Smiley

http://docs.python.org/howto/sockets.html

[...]
Thank you Sir! I will be looking in to that.

netstat -na displays a listening cgminer. It seems it was the missing -a switch that made it not show sockets on localhost.

By the way, is this the most official description of the various API functions, or is there another place for that documentation?
runeks
Legendary
*
Offline Offline

Activity: 980
Merit: 1008



View Profile WWW
December 12, 2011, 02:42:48 AM
 #84

First of all, thank you for extending cgminer with this functionality! I'm planning on using it to control my Bitcoin Radiator (yes, that's right, stay tuned for updates), so it comes in handy for me. With regards to JSON, I disagree a bit on your position, but don't take that as me not appreciating your work.

Though ... if someone actually has some really unexpected need for a JSON format response ...
(I can think of no reason, since this format is way easier to read and parse but has a detail level equivalent to JSON for this requirement)
One reason for the JSON format would be that most languages has an implementation of it already. Thus no JSON parsing would be written, it would be handled by a separate library that has been written already. The following line in Python would replace a custom implementation of parsing your custom format:

Code:
obj = json.load(msg)

So I guess the reason to choose the JSON format is because it reduces redundancy. Chances are that in whichever language one chooses to write an application that wants to control cgminer, this language already has a JSON parsing implementation. You've written an implementation of your format in php, I'll have to write an implementation in Python, and someone who wants to use Ruby will have to write an implementation in Ruby, and so on and so forth for C, C++, Perl, bash, JavaScript, etc.
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 12, 2011, 05:38:08 AM
 #85

Actually ... I've written and supplied the basics in C, Java and PHP ...
If you can't work out the VERY simple code to parse the output from one of those 3 languages, then ...

As I've said before, if anyone wants JSON they can add to the bounty.
No one replied (fortunately) so it hasn't been added.
I also said that if anyone was already listed in the bounty for me; then if they want it I guess I'll add it for them.
Again, no reply to that either so JSON is out Smiley

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
runeks
Legendary
*
Offline Offline

Activity: 980
Merit: 1008



View Profile WWW
December 12, 2011, 10:01:27 AM
 #86

I tried translating your PHP example directly to Python. Does this look right?

Code:
'STATUS=S,CODE=11,MSG=Summary|SUMMARY=all,EL=42875,ALGO=sse2_64,MHS=722.96,SOL=583,Q=59563,A=517,R=66,HW=0,U=0.72,DW=10075,STATUS=S,CODE=11,MSG=Summary|SUMMARY=all,EL=42875,ALGO=sse2_64,MHS=722.96,SOL=583,Q=59563,A=517,R=66,HW=0,U=0.72,DW=10075,ST=0,GF=65,LW=0,RO=0,BC=2801|'
becomes
{'STATUS': {'STATUS': 'S', 'MSG': 'Summary', 'CODE': '11'}, 1: {'A': '517', 'EL': '42875', 'RO': '0', 'LW': '0', 'BC': '2801', 'SOL': '583', 'SUMMARY': 'all', 'Q': '59563', 'GF': '65', 'R': '66', 'U': '0.72', 'ALGO': 'sse2_64', 'DW': '10075', 'HW': '0', 'ST': '0', 'MHS': '722.96'}, 'SUMMARY': {'A': '517', 'EL': '42875', 'CODE': '11', 'STATUS': 'S', 'SOL': '583', 'SUMMARY': 'all', 'Q': '59563', 'R': '66', 'U': '0.72', 'ALGO': 'sse2_64', 'MSG': 'Summary', 'DW': '10075', 'HW': '0', 'MHS': '722.96'}}

'STATUS=S,CODE=17,MSG=GPU1|GPU=1,GT=69.00,FR=2575,FP=56,EN=Y,STA=ALIVE,MHS=365.10,A=271,R=19,HW=0,U=0.38,I=9|'
becomes
{'STATUS': {'STATUS': 'S', 'MSG': 'GPU1', 'CODE': '17'}, 'GPU1': {'FP': '56', 'A': '271', 'FR': '2575', 'GT': '69.00', 'STA': 'ALIVE', 'I': '9', 'HW': '0', 'EN': 'Y', 'U': '0.38', 'GPU': '1', 'R': '19', 'MHS': '365.10'}}

'STATUS=S,CODE=20,MSG=GPU count|GPUS,COUNT=2|'
becomes
{'STATUS': {'STATUS': 'S', 'MSG': 'GPU count', 'CODE': '20'}, 'GPUS': {0: 'GPUS', 'COUNT': '2'}}

EDIT: The code is this:
Code:
def parseResponse(message):
   data = {}
   objs = message.split('|')

   for obj in objs:
      if (len(obj) > 0):
         items = obj.split(',')
         item = items[0]
         item_id = items[0].split('=', 1)
         if (len(item_id) == 1 or not item_id[1].isdigit()):
            name = item_id[0]
         else:
            name = item_id[0] + item_id[1]

         if (len(name) == 0):
            name = "null"     

         if (name in data):
            num = 1
            while ((name+str(num)) in data):
               num =+ 1
            name =+ str(num)

         counter = 0

         for item in items:
            item_id = item.split('=', 2)
            if not (name in data):
               data[name] = {}
            if (len(item_id) == 2):
               data[name][item_id[0]] = item_id[1]
            else:
               data[name][counter] = item_id[0]

         counter =+ 1

   return data
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 12, 2011, 10:43:42 AM
 #87

Yeah looks OK. I guess Smiley
Edit: no actually the SUMMARY one is messed up there's only supposed to be 2 sections "STATUS" and "SUMMARY"

One thing I noticed up front is that you are running an older version of cgminer - the newest version uses full descriptions for the field names.
Current one is 2.0.8y
It also has no exception to the rule of the reply format
(earlier there was an exception to the rule: 'apiversion' - that's gone and now there is only 'version' which uses the same format as the rest)
... and it shows more GPU details that were missing before.

Note to DeathAndTaxes if you see this:
I keep thinking about the "MHS 5s" fields.
That means you already have the field description correct, however, you can't search for it by full name, since it's name will change to match --log
So if --log is 7 the field will be called "MHS 7s"
Is that OK?
Or would you prefer 2 fields instead something like: MHS Ns=1234.99 and Log Interval=5
Thus you can directly index access the field with "MHS Ns"
(or both these 2 and the old 1)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 12, 2011, 01:30:38 PM
 #88

Note to DeathAndTaxes if you see this:
I keep thinking about the "MHS 5s" fields.
That means you already have the field description correct, however, you can't search for it by full name, since it's name will change to match --log
So if --log is 7 the field will be called "MHS 7s"
Is that OK?
Or would you prefer 2 fields instead something like: MHS Ns=1234.99 and Log Interval=5
Thus you can directly index access the field with "MHS Ns"
(or both these 2 and the old 1)

Um you sure it was me?  I haven't looked at the MHS fields yet.  Sorry coming back from a cruise, and getting caught up at work is brutal.  Hopefully I can get a chance to look at it tonight.
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 12, 2011, 07:47:06 PM
 #89

No - it was me - but you seemed to be the best person to ask Smiley
(it's something I've been thinking about since after I made that last change)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 12, 2011, 10:44:31 PM
 #90

Minor change to miner.php - the simple web page that uses the API
(headers are a darker background and a few of the values are formatted)
https://github.com/kanoi/cgminer/commit/da798519b0a2b8c98aea31923f85e4074888757d

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
December 16, 2011, 11:06:23 PM
 #91

Is this being paid out yet or still testing?

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
-ck
Legendary
*
Offline Offline

Activity: 4088
Merit: 1631


Ruu \o/


View Profile WWW
December 16, 2011, 11:20:57 PM
 #92

Kano has been very responsive and quick to develop this, but very few have tested it, and no one has paid him yet. I quite like what I see so far.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 17, 2011, 12:13:42 AM
 #93

Kano has been very responsive and quick to develop this, but very few have tested it, and no one has paid him yet. I quite like what I see so far.

I apologize for this.  I was gone of vacation and since coming back I have been overwhelmed at work.  I just don't have the time to put the code through its paces.  However based on my limited testing I am going to pay out my portion of the bounty now.  Kano shouldn't be penalized due to a lack of testing.

I anticipate if any issues are discovered after payment Kano has sufficient incentive to resolve them in order to collect rest of bounty.  I sent a PM to Kano to verify the address he wants payment at.  Once I get that I will payout 30 BTC.
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
December 17, 2011, 12:43:51 AM
 #94

I have no problem paying out on the progress made, just need an address - sig address ok Kano?

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 17, 2011, 12:26:43 PM
 #95

Yep sig is fine - just post or PM me so I know who it came from.
No worries about the time as long as I get paid if I've done what's required.
Though waiting longer seems to be making the bounty worth more Cheesy Cheesy (BTC is now worth more)

I mainly just want to get it into ckolivas' git so I can work on it on a proper fork of his git and also sort if there are any problems he finds with what I've done and fix them.
Even from my point of view there's more that I'll do (and I've already got the extra interface programs and PHP web page written as everyone already knows)

Though the next thing I will probably do is look at the cgminer shutdown code (which may get rid of the windows crash)

Then add more API stuff to send more commands to cgminer (e.g. GPU settings etc)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 17, 2011, 06:39:47 PM
Last edit: December 17, 2011, 07:46:24 PM by DeathAndTaxes
 #96

30 BTC sent to 1LPbuDSPT4DdYbwiqAVWDJm2sHHuh6PnqB

It is coming from one of my exchange account so I have no idea what address it will be sent from.  Thanks for all the good work so far.
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 17, 2011, 09:24:51 PM
 #97

Thanks DeathAndTaxes and gnar1ta$ got both of yours.
OK so I better update the docs first today Smiley
(yeah I forgot that needs to be done next before anything else)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
December 17, 2011, 11:22:29 PM
 #98

Just got the miner compiled.  As soon as I get an RPC command sent, I'll send you the bounty.

Then I'll probably start working on a fork that uses JSON so that devs won't have to write their own parsers.

kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
December 18, 2011, 12:41:57 AM
 #99

Just got the miner compiled.  As soon as I get an RPC command sent, I'll send you the bounty.

Then I'll probably start working on a fork that uses JSON so that devs won't have to write their own parsers.
LOL - you didn't read my posts?
Since you're a bounty payer and you seem to want JSON also, I'll just do that next.
(I've already said that as an option before but no one bothered to reply ... ... ...)

Of course it will be done the simplest way:
If the string sent over the socket starts with '{' then I'll assume it's JSON and reply with a JSON string.
If the string sent doesn't start with '{' then it's the same as it is now with the same simpler reply.

As for doing your own fork ... you do realise what you are in for if you do that?
Do you use windows or was your fork just going to ignore that?

Edit: P.S. the basic parser is already written in 3 languages, so "devs" shouldn't have any issues ... ...

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
December 18, 2011, 12:56:33 AM
 #100

Just got the miner compiled.  As soon as I get an RPC command sent, I'll send you the bounty.

Then I'll probably start working on a fork that uses JSON so that devs won't have to write their own parsers.
LOL - you didn't read my posts?
Since you're a bounty payer and you seem to want JSON also, I'll just do that next.
(I've already said that as an option before but no one bothered to reply ... ... ...)

Of course it will be done the simplest way:
If the string sent over the socket starts with '{' then I'll assume it's JSON and reply with a JSON string.
If the string sent doesn't start with '{' then it's the same as it is now with the same simpler reply.

As for doing your own fork ... you do realise what you are in for if you do that?
Do you use windows or was your fork just going to ignore that?

Edit: P.S. the basic parser is already written in 3 languages, so "devs" shouldn't have any issues ... ...

Github makes forking really easy.  I don't think that the JSON code would have anything platform specific, so don't know how being on windows would make a difference.

Although if you want to do it, that would be even better since you already know this part of the code.

The string that gets returned isn't consistent. "STATUS=S" starts the first section, but "SUMMARY" starts the second.

EDIT: I just sent 10BTC to the address in your sig.

Pages: « 1 2 3 4 [5] 6 7 8 9 »  All
  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!