Bitcoin Forum
April 24, 2014, 11:53:00 PM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
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 10267 times)
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 24, 2011, 10:47:15 PM
 #41

If and when it's finalised, I will be merging it into my tree, and then eventually I will make a windows version from it when I release a new official version of cgminer. However I would appreciate kano fixing any windows builds before then since things inevitably break when trying to port it.
Well I'll certainly sort out any api.c problems in Windows and make sure that works Smiley
As for ADL/ATI - since I'm not changing any of that I hopefully won't cause any new problems there (crosses fingers)
(but of course once? I can make an ADL working windows binary ... I guess I can ask people to try it and report any differences)
First step to just make a CPU version that runs on windows ... I'll be back in a week or two? Cheesy (just kidding)

Edit: I guess I should go back to frequenting the #cgminer IRC channel soon ... (kanoi)

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
1398383580
Hero Member
*
Offline Offline

Posts: 1398383580

View Profile Personal Message (Offline)

Ignore
1398383580
Reply with quote  #2

1398383580
Report to moderator
1398383580
Hero Member
*
Offline Offline

Posts: 1398383580

View Profile Personal Message (Offline)

Ignore
1398383580
Reply with quote  #2

1398383580
Report to moderator

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1398383580
Hero Member
*
Offline Offline

Posts: 1398383580

View Profile Personal Message (Offline)

Ignore
1398383580
Reply with quote  #2

1398383580
Report to moderator
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 28, 2011, 11:12:57 PM
 #42

Well after going through all the pain and agony of building a windows executable ...

It's here: https://github.com/kanoi/cgminer/downloads

I have of course already created the 2.0.8w version without GPU mining and that works fine.
I have not actually successfully run the GPU version on anything. So I do not know if that binary works. Could someone please try it.
That one is just the windows CPU version that works fine for me but with GPU support enabled.
I can't run it coz it crashes on OpenCL.dll
Though I did find OpenCL.dll online, I have no idea if that is expected if you don't have a system with an ATI card and drivers installed
(I don't have a windows system with an ATI card - my only ATI card is of course my xubuntu miner)

It also crashes on exit just like 2.0.8 windows version does ... I do have an actual idea about what is causing that (the thread shut down code) but since I didn't write that, I'm not going to look into fixing that before I finish this bounty.

The additional commands (since last time) are:
gpucount and cpucount
and this one reports the apiversion as 0.3

Now if this GPU win32 exe actually works for anyone ...

What changes are required?
What's missing?

If it runs for you and you spot any problems - of course let me know.

Edit: added a Xubuntu 2.0.8w binary also to the downloads. So that's both of them Smiley

Edit2: added the 2 free windows dll's required (again to the download tab) and updated the git source

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
Remember remember the 5th of November
Hero Member
*****
Offline Offline

Activity: 896

Remember me


View Profile

Ignore
November 29, 2011, 07:55:46 AM
 #43

Well to be honest, I did not see uhm...anything that looks like it could output JSON. Is this just sockets?

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 29, 2011, 08:33:33 AM
 #44

Yep just a simple socket.
Look at the api-example.php
(that also shows how simple it is to interact with it)
It really is VERY easy to interact with it and doesn't require many megabytes of code and libraries to do that.
You simply send a request to the port and it sends a reply.
The format of the reply (except apiversion) is very simple also: (as stated before https://bitcointalk.org/index.php?topic=52466.msg629425#msg629425 )

STATUS=x,CODE=nnn,MSG=string|type[=value],name=value,name=value,name=value|

i.e. sections are separated by '|'
name/value pairs are separated by ','
and name/value has an '=' between

Where x is one of
W - warning
I - informational
S - success
E - error
F - fatal (code bug)

Each code has a unique number

If a reply returns multiple sets of data (e.g. multiple pools) then it will just be multiple "type=value,...|" sections.
e.g. POOL=0,URL=http://url.com:8223,MHS=30000.00,...|POOL=1,URL=http://url2.com:8888,MHS=10000.00,...|

You will see that if you use the php.
Run it and use the php script (just type "php api-example.php" on the same computer will do it)
If you can't put php on the miner, copy api-example.php to another PC and:
1) edit the address in it "127.0.0.1" to be the address of the miner
2) run the miner with the "--api-listen" option
If you need it in some other code - just say - I can very quickly write that in C, Java or maybe even anything else you can think of.
(the only language I know of that I haven't ever used is C# and that's coz I never will use it by choice)

Thus to convert it to a structure usable in your code (which is what you must do with json also)
is only a small amount of code (as given in the php)

the 3 separators "| , =" are currently guaranteed to be OK unless a pool puts a ',' or '|' in their URL somewhere
(no idea why a pool would use that)

If anyone is concerned about that I can change it (or all 3) to control characters (0x01, 0x02, 0x03)
But using normal characters makes the return string more easily humanly readable.

The documentation will be updated once I've covered all the requirements.

So again Smiley What's missing?
Any bugs?

(ok I've realised one thing needs to be changed that I forgot - the socket error string code is wrong on windows - it should use a different function (not errno) - I'll change that once I know something else that needs to be done)

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 29, 2011, 11:50:48 AM
 #45

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)
I guess they could request it with BTC Smiley
(i.e. I'd prefer to not do it - so I'd prefer if no one made a BTC request)

Of course please be specific about what you want, if you do:
i.e. JSON in and out or leave the simple input format: "command[|option]" and just use JSON out
and give a sample JSON of what you think it should be (I'll decide the format myself if you can't specify it correctly)

Of course I'll allow both if someone 'requests' with BTC coz I WAY prefer the format I'm using since it is so much easier to parse and the data being transferred is fully handled by the format I'm using and does not require a more complex JSON format.

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
lueo
Member
**
Offline Offline

Activity: 61


Bitcoin believer


View Profile WWW

Ignore
November 29, 2011, 12:08:49 PM
 #46

I am currently working on my project for output restful JSON. The following URLs are used to retrieve the status of a mining rig.

url: /adl/devices  -> list all adl devices
url: /adl/device/<index>  -> list the status of a device
url: /opencl/devices -> list all opencl devices (to mine!)
url: /opencl/device/<index> -> list the status of an opencl device
url: /miners -> list all miners on the computer
url: /miner/<index> -> output the status of a miner (cgminer for now. will be extended to other miners, too!)

Currently it can only display the status. I am implementing the control part (to control GPU clock, mem, start / stop miners). So the progress of this project is about 40%.

I'll release the project when the progress is about 80% so that more feedback and tests could be done.

The following is a sample output on a 6970*3 machine:
Code:
URL: GET /adl/devices
{
  "count": 3,
  "devices": [
    {
      "busNumber": 1,
      "index": 0,
      "adapterIndex": 0,
      "displayName": "\\\\.\\DISPLAY46",
      "vendorID": 1002,
      "UDID": "PCI_VEN_1002&DEV_6718&SUBSYS_03B81043&REV_00_4&31B538E3&0&0010A",
      "adapterName": "AMD Radeon HD 6900 Series"
    },
    {
      "busNumber": 4,
      "index": 1,
      "adapterIndex": 4,
      "displayName": "\\\\.\\DISPLAY42",
      "vendorID": 1002,
      "UDID": "PCI_VEN_1002&DEV_6718&SUBSYS_03B81043&REV_00_4&4C9C647&0&0058A",
      "adapterName": "AMD Radeon HD 6900 Series"
    },
    {
      "busNumber": 5,
      "index": 2,
      "adapterIndex": 8,
      "displayName": "\\\\.\\DISPLAY50",
      "vendorID": 1002,
      "UDID": "PCI_VEN_1002&DEV_6718&SUBSYS_03B81043&REV_00_4&62C0392&0&0060A",
      "adapterName": "AMD Radeon HD 6900 Series"
    }
  ]
}

Also, the status of each card could be displayed remotely:
Code:
URL: GET /adl/device/0
{
  "index": 0,
  "displayName": "\\\\.\\DISPLAY46",
  "vddc": 1.175,
  "adapterName": "AMD Radeon HD 6900 Series",
  "activity": 99,
  "powertuneLevel": 20,
  "fanSpeedPercent": 100,
  "memClock": 795.0,
  "fanSpeedRPM": 7345,
  "fanSpeedUserDefine": "user-defined",
  "engineClock": 920.0,
  "performanceLevel": 2,
  "temperature": 91.5
}


Well to be honest, I did not see uhm...anything that looks like it could output JSON. Is this just sockets?

Donation: 1M1mB5BQX5QthTojfHxXxJQJr8ro5xLcKR
Real-time LR <-> MTGOX exchange! http://goo.gl/gJqZS
Internet Marketing Q&A in Chinese: http://qa.webcash168.com/
lueo
Member
**
Offline Offline

Activity: 61


Bitcoin believer


View Profile WWW

Ignore
November 29, 2011, 12:21:48 PM
 #47

I am also designing a new GUI to control my mining machine remotely. I hate to open lots of applications to mine and monitor my mining rig.

If you have more ideas, welcome to send to me!


Donation: 1M1mB5BQX5QthTojfHxXxJQJr8ro5xLcKR
Real-time LR <-> MTGOX exchange! http://goo.gl/gJqZS
Internet Marketing Q&A in Chinese: http://qa.webcash168.com/
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 29, 2011, 09:37:46 PM
 #48

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)
I guess they could request it with BTC Smiley
(i.e. I'd prefer to not do it - so I'd prefer if no one made a BTC request)

Of course please be specific about what you want, if you do:
i.e. JSON in and out or leave the simple input format: "command[|option]" and just use JSON out
and give a sample JSON of what you think it should be (I'll decide the format myself if you can't specify it correctly)

Of course I'll allow both if someone 'requests' with BTC coz I WAY prefer the format I'm using since it is so much easier to parse and the data being transferred is fully handled by the format I'm using and does not require a more complex JSON format.
Good Smiley No reply to that Smiley

However, with such a high bounty, I'm sorta wondering about the lack of response I see to what's already done,
since it is pretty much finished except for the socket error messages I mentioned and of course anything that anyone else wants to point out is missing or not working.

So I'll ask directly ...
* DeathAndTaxes
* Gigasvps
* Tnkflx
* abracadabra
* Red Emerald
* ThiagoCMC
* gnar1ta$
* Chefnet

Any of you got any comment or issues or requests?
(and if any of you guys specifically require the JSON format then it's no extra - but again I'm not sure why anyone would need it)

Current command set with an example (unformatted) reply is:
apiversion
 '0.3'

devs
 'STATUS=S,CODE=9,MSG=2 GPU(s) - 0 CPU(s)|GPU=0,GT=75.00,FR=3355,FP=85,EN=Y,STA=ALIVE,MHS=357.87,A=247,R=47,HW=0,U=0.35,I=9|GPU=1,GT=69.50,FR=2573,FP=56,EN=Y,STA=ALIVE,MHS=365.10,A=269,R=19,HW=0,U=0.38,I=9|'

pools
 'STATUS=S,CODE=7,MSG=1 Pool(s)|POOL=0,URL=http://0.0.0.0:0,STA=ALIVE,PRI=0,LP=N,Q=59499,A=517,R=66,DW=10071,ST=0,GF=65,RF=0|'

summary
 '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|'ST=0,GF=65,LW=0,RO=0,BC=2801|'

gpudisable|0
 'STATUS=I,CODE=12,MSG=GPU 0 set disable flag|'
  In cgminer you'll see something like:
   [2011-11-30 08:28:48] Thread 2 being disabled
   [2011-11-30 08:28:48] Thread 0 being disabled

gpuenable|0
 'STATUS=I,CODE=5,MSG=GPU 0 sent enable message|'
  In cgminer you'll see something like:
   [2011-11-30 08:29:16] Thread 0 being re-enabled
   [2011-11-30 08:29:16] Thread 2 being re-enabled

gpurestart|0
 'STATUS=I,CODE=13,MSG=GPU 0 restart attempted|'
  In cgminer you'll see something like:
   [2011-11-30 08:30:31] Thread 0 still exists, killing it off
   [2011-11-30 08:30:31] Thread 2 still exists, killing it off
   [2011-11-30 08:30:31] Thread 0 restarted
   [2011-11-30 08:30:31] Thread 2 restarted

gpu|1
 '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|'

cpu|0 (I'm only running GPU mining so I get this error message
 'STATUS=E,CODE=16,MSG=No CPUs|'

gpucount
 'STATUS=S,CODE=20,MSG=GPU count|GPUS,COUNT=2|'

cpucount
 'STATUS=S,CODE=21,MSG=CPU count|CPUS,COUNT=0|'

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
Red Emerald
Hero Member
*****
Offline Offline

Activity: 728



View Profile WWW

Ignore
November 29, 2011, 09:46:12 PM
 #49

Glad to see this is coming along.  I guess plain sockets are okay instead of JSON since it isn't too difficult to parse.

lueo
Member
**
Offline Offline

Activity: 61


Bitcoin believer


View Profile WWW

Ignore
November 30, 2011, 03:05:04 AM
 #50

Hey... Glad to see your effort. But have you notice that I am also running for the bounty?

In my opinion, JSON format are more useful for future usage. If we had defined a proper protocol for control miners, then every miners could be controlled by ANY kinds of user interface (e.g. GUI, Web, text, command line... even by your iPhone!)

However, if anyone found kano's solution useful and fullfill the needs, feel free to pay out the bounty!

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)
I guess they could request it with BTC Smiley
(i.e. I'd prefer to not do it - so I'd prefer if no one made a BTC request)

Of course please be specific about what you want, if you do:
i.e. JSON in and out or leave the simple input format: "command[|option]" and just use JSON out
and give a sample JSON of what you think it should be (I'll decide the format myself if you can't specify it correctly)

Of course I'll allow both if someone 'requests' with BTC coz I WAY prefer the format I'm using since it is so much easier to parse and the data being transferred is fully handled by the format I'm using and does not require a more complex JSON format.
Good Smiley No reply to that Smiley

However, with such a high bounty, I'm sorta wondering about the lack of response I see to what's already done,
since it is pretty much finished except for the socket error messages I mentioned and of course anything that anyone else wants to point out is missing or not working.

So I'll ask directly ...
* DeathAndTaxes
* Gigasvps
* Tnkflx
* abracadabra
* Red Emerald
* ThiagoCMC
* gnar1ta$
* Chefnet

Any of you got any comment or issues or requests?
(and if any of you guys specifically require the JSON format then it's no extra - but again I'm not sure why anyone would need it)

Current command set with an example (unformatted) reply is:
apiversion
 '0.3'

devs
 'STATUS=S,CODE=9,MSG=2 GPU(s) - 0 CPU(s)|GPU=0,GT=75.00,FR=3355,FP=85,EN=Y,STA=ALIVE,MHS=357.87,A=247,R=47,HW=0,U=0.35,I=9|GPU=1,GT=69.50,FR=2573,FP=56,EN=Y,STA=ALIVE,MHS=365.10,A=269,R=19,HW=0,U=0.38,I=9|'

pools
 'STATUS=S,CODE=7,MSG=1 Pool(s)|POOL=0,URL=http://0.0.0.0:0,STA=ALIVE,PRI=0,LP=N,Q=59499,A=517,R=66,DW=10071,ST=0,GF=65,RF=0|'

summary
 '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|'ST=0,GF=65,LW=0,RO=0,BC=2801|'

gpudisable|0
 'STATUS=I,CODE=12,MSG=GPU 0 set disable flag|'
  In cgminer you'll see something like:
   [2011-11-30 08:28:48] Thread 2 being disabled
   [2011-11-30 08:28:48] Thread 0 being disabled

gpuenable|0
 'STATUS=I,CODE=5,MSG=GPU 0 sent enable message|'
  In cgminer you'll see something like:
   [2011-11-30 08:29:16] Thread 0 being re-enabled
   [2011-11-30 08:29:16] Thread 2 being re-enabled

gpurestart|0
 'STATUS=I,CODE=13,MSG=GPU 0 restart attempted|'
  In cgminer you'll see something like:
   [2011-11-30 08:30:31] Thread 0 still exists, killing it off
   [2011-11-30 08:30:31] Thread 2 still exists, killing it off
   [2011-11-30 08:30:31] Thread 0 restarted
   [2011-11-30 08:30:31] Thread 2 restarted

gpu|1
 '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|'

cpu|0 (I'm only running GPU mining so I get this error message
 'STATUS=E,CODE=16,MSG=No CPUs|'

gpucount
 'STATUS=S,CODE=20,MSG=GPU count|GPUS,COUNT=2|'

cpucount
 'STATUS=S,CODE=21,MSG=CPU count|CPUS,COUNT=0|'

Donation: 1M1mB5BQX5QthTojfHxXxJQJr8ro5xLcKR
Real-time LR <-> MTGOX exchange! http://goo.gl/gJqZS
Internet Marketing Q&A in Chinese: http://qa.webcash168.com/
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
November 30, 2011, 04:54:58 AM
 #51

Well lueo all good and nice except for 2 things:
1) DeathAndTaxes, tnkflx and abracadabra already mentioned (and the thread title) that they wanted a cgminer fork, not a Python version of it - and adjusting the cgminer code is required to do all the things requested - so although you may put a wrapper around cgminer, programming the 'C' changes are necessary ... and since I've already posted all that on my git ... and you've already stated you don't know 'C' very well ... um I think your missing the point that you've not done what the bounty requires
2) I've already got a response from ckolivas that he will add it into his git when it's finished

and I have above stated if any of the original people who put up the bounty say they must have JSON, then I'll add it.
(it's not difficult to add, just it seems pointless to me as I have said in a few posts as to why)
But if anyone else wants it they can add to the bounty Tongue

I will also add so you know - building a windows version of cgminer is a nightmare Smiley

Lastly - does anyone who put up the bounty disagree with what I've said?

Edit: oops Smiley I forgot to mention.
If you check my git I've just added API.java (and API.class) a java version of api-example.php since almost everyone on the planet has java on their PC (or can get it easily) that gives another way for anyone to try it out.
Usage for API.java is (as written in the top of the code)
  java API command IP port
(if any are missing or blank they are replaced with the defaults: command='summary' IP='127.0.0.1' port='4028')
Oh and IP can be a hostname or an IP address

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
lueo
Member
**
Offline Offline

Activity: 61


Bitcoin believer


View Profile WWW

Ignore
November 30, 2011, 06:28:44 AM
 #52

Dear Kano,

First of all, thanks for your effort so that all of the cgminer users could benefit from it. If anyone believe it deserve the bounty then go ahead.

However, in my opinion, according to the requirement, I don't think it's necessary to use 'C' language or modify cgminer to achieve those requirements. Forking it or modify it is just a bonus.

All we want is a daemon that could accept JSON RPC to control GPU and cgminer, monitoring GPU status and miner status.

Quote
The daemon should respond to the following RPC (at a minimum) to satisfy the bounty:
* Start/stop/restart individual GPUs (on restart recheck config file for any changes)
* Shutdown instance (stop all GPU, and end cgminer)
* Report current monitors (a min of current temp/load/clock/hashing speed)
* Report global output (a min of total shares, accepted shares, rejected shares, stale shares, etc)
* Report individual card output (same but on per card basis)
* Report any failures (a min of card down & pool not responding)

Obviously more advanced features could be added in the future (changing clock speeds, voltage, intensity, etc) however those could be handled by future bounties/donations once project is up and running.  This is just a rough draft but the hope is it will spark attention of potential developers and further discussion among those interested in RPC capable cgminer.
All the requirement could be achieved via a modified version of guiminer. I've already done a daemon via guiminer. But guiminer could neither monitor GPU status nor could it receive JSON RPC, so I am working on my own daemon and GUI. What I want is cgminer could be extensible in the future.

The prototype could be check on http://github.com/lueo/poclbm. A running instance is attached below:




Well lueo all good and nice except for 2 things:
1) DeathAndTaxes, tnkflx and abracadabra already mentioned (and the thread title) that they wanted a cgminer fork, not a Python version of it - and adjusting the cgminer code is required to do all the things requested - so although you may put a wrapper around cgminer, programming the 'C' changes are necessary ... and since I've already posted all that on my git ... and you've already stated you don't know 'C' very well ... um I think your missing the point that you've not done what the bounty requires
2) I've already got a response from ckolivas that he will add it into his git when it's finished

and I have above stated if any of the original people who put up the bounty say they must have JSON, then I'll add it.
(it's not difficult to add, just it seems pointless to me as I have said in a few posts as to why)
But if anyone else wants it they can add to the bounty Tongue

I will also add so you know - building a windows version of cgminer is a nightmare Smiley

Lastly - does anyone who put up the bounty disagree with what I've said?

Edit: oops Smiley I forgot to mention.
If you check my git I've just added API.java (and API.class) a java version of api-example.php since almost everyone on the planet has java on their PC (or can get it easily) that gives another way for anyone to try it out.
Usage for API.java is (as written in the top of the code)
  java API command IP port
(if any are missing or blank they are replaced with the defaults: command='summary' IP='127.0.0.1' port='4028')
Oh and IP can be a hostname or an IP address

Donation: 1M1mB5BQX5QthTojfHxXxJQJr8ro5xLcKR
Real-time LR <-> MTGOX exchange! http://goo.gl/gJqZS
Internet Marketing Q&A in Chinese: http://qa.webcash168.com/
abracadabra
Hero Member
*****
Online Online

Activity: 877



View Profile

Ignore
November 30, 2011, 02:02:48 PM
 #53

Kano, sorry haven't checked this thread recently, with Thanksgiving last week. Didn't realize someone was going to take this on so quickly (and cheaply  Grin j/k)

Anyways.. see my comments inline below.. please forgive the newbishness of some of my questions..

https://github.com/kanoi/cgminer

API v0.1

Includes a sample api-example.php


The .php would be run locally?

Quote
6 files added/changed from current ckolivas master:

main.c, miner.h, AUTHORS, api.c, api-example.php, Makefile.am

(also has the updated linux-usb-cgminer)

OK so this obviously isn't final (though it does work fine for me)

Anyone who can build their own cgminer and is interested could you have a look?

Not sure if this should have been mentioned earlier, but I need a windows version and unfortuantely I can't build from scratch.  Embarrassed

Quote
It currently has 3 API commands:
apiversion - returns a version string "0.1"
dev - returns a status string of all the devices (CPU and or GPU)
pool - returns a status string of all the pools

Do the status strings differentiate the data returned as to which "rig" and which GPU on said "rig"? ie.  Is the name of the "rig" returned with the status string? Or we have to remember which one were were just talking to when we got the status return?

Quote
The included PHP file (api-example.php) simply converts the returned string into a data structure
Very simple and very easy in PHP the way I've done it.

No I'm not expecting people to give me bitcoins yet ... Smiley

The 3 main questions I have are:
1) what other API commands do people want
2) what parameters should I add to cgminer: --api-port = 4028, --api-address = 127.0.0.1, --api-access = 192.168.5.* and anything else?

I'm assuming --api-port & --api-address is the port and address of the actual "rig" we are talking to? --api-access is the ip of the computer allowed to communicate with the rig?

Quote
the numbers shown are of course examples Smiley
(I haven't added any parameters yet)
3) what socket I/O do people want: by this I mean: default port and access restriction.
It currently runs on port 4028 and only listens on 127.0.0.1 - for security reasons of course.

I guess I don't get this.  I understand listening port, but what other ip would the "rig" running cgminer listen to other than it's own?

Quote
Edit: it does no mutex locking access to the cpu/gpu/pool info since it would appear that is OK
(the current code doesn't appear to do that either)
ckolivas - does that sound correct to you?

No idea what this means.

Quote
Edit2: minor change - it wasn't closing the connection if an invalid command was sent

Edit3: added 'quit' and 'summary'

Do you have any screenshots of what frontend you have running for you right now?

Thanks!

abracadabra
Hero Member
*****
Online Online

Activity: 877



View Profile

Ignore
November 30, 2011, 02:07:11 PM
 #54

...
So ... what's missing?

The Windows version? ;-)

+1

abracadabra
Hero Member
*****
Online Online

Activity: 877



View Profile

Ignore
November 30, 2011, 02:14:55 PM
 #55

If a reply returns multiple sets of data (e.g. multiple pools) then it will just be multiple "type=value,...|" sections.
e.g. POOL=0,URL=http://url.com:8223,MHS=30000.00,...|POOL=1,URL=http://url2.com:8888,MHS=10000.00,...|

By "multiple pools" I assume you mean when you have cgminer setup to have a backup pool? Not sure, since that's not a feature of cgminer I use.

abracadabra
Hero Member
*****
Online Online

Activity: 877



View Profile

Ignore
November 30, 2011, 02:19:45 PM
 #56


I will also add so you know - building a windows version of cgminer is a nightmare Smiley


I thought that's what the majority of the bounty was for!  Grin

Quote
Lastly - does anyone who put up the bounty disagree with what I've said?

I agree, but seeing the screenshots from lueu's project, makes me interested in what is going on there too  Wink


DeathAndTaxes
Donator
Hero Member
*
Offline Offline

Activity: 966



View Profile WWW

Ignore
November 30, 2011, 02:36:05 PM
 #57

A long post but I wanted to wrap up a couple of different issues all at once.

Very rapid development:
I also wasn't expecting such a rapid development, it kinda caught me off guard.  Not that this is a bad thing just unexpected.

Clarification of the bounty:
As I indicated in the thread my bounty is for a fork of cgminer or integration into cgminer mainline.  While maybe I was unclear (if so I apologize) I have no need/desire for a wrapper in an alternate language.  My experience in project development tells me that will make forward compatibility tough and likely require never ending "mainteance bounties" to keep current.  Sorry lueo you front end looks nice and people will need front ends so hopefully the front end work isn't wasted and can be adapted.  This bounty is for the cgminer modification but I am sure other projects/bounties will be required for the remote control application.

Speaking for others:
I can't speak for all of those pledging funds on if a wrapper is compatible w/ the goals of the project.  I am assuming (possibly incorrectly) they feel the same as me. To anyone pledging a clarification on if a wrapper is acceptable to the terms of the project would be appreciated.

I will be out of the loop:
I am going on a cruise this Friday, need to pack, and am swamped at work wrapping up things before I am gone for a week.  I won't have time to test anything before I get back.  Sorry Kano just bad timing.  Everything you have shown looks good and on paper is exactly what I was looking for when I started the thread.  If what you have developed is as presented I don't see an issue w/ awarding the bounty but for me it won't be until Dec 11th at the earliest.

Windows support:
Since cgminer supports both Linux & Windows I think it is assumed that any code which qualifies for the bounty must work on both operating systems.  Personally I don't really care as my rigs are linux but others likely do and it would be "clunky" to have a portion which only compiles in Linux.  I feel the pain of anyone trying to get the code working in Windows but that is likely non-negotiable.
Note to self reading the entire thread helps.  kano already published a windows version.

In my absence:
To any of the others w/ pledges if anyone feels the work completed meets the requirements for the bounty then no need to wait for me to get back to award some/all funds.  I will award once I get back but my absence shouldn't be taken as putting things on hold.

Sockets vs. JSON:
 In the OP I indicated JSON was acceptable but not required.  As far as I know nobody indicated dissatisfaction w/ that requirement.   My personal position is still the same.  I have done extensive windows development work w/ sockets so that is a non-issue for me.  If anyone who has pledged funds feels otherwise please speak up now.  It is unfair for developers to labor under false constraints and waste time.  

Fork vs Mainline:
Since there is a "Bonus" of 25 BTC for integration into the mainline, if kano code is acceptable and ckolivas integrates it I think a fair split would be the main bounty to Kano and the "bonus" to ckolivas.  I will add another 5 BTC to the "bonus" portion.  Obviously it is up to each individual awarding but I think that is the best way to encourage mainline integration.  Hopefully this clears up some of the vagueness about "who" gets the bonus if integrated into the mainline.

To YOU reading right now who haven't pledged (my soap box):
It makes me embarrassed by how little ckolivas has been compensated for all his hard work.  
Goddamnit that's the sum total of how much I've earned in donations in total for cgminer  Angry
If this project is interesting to you then here is a chance to make it right.  Pledge 1, 2 or 5 BTC towards the mainline integration "bonus" portion.  I have written shareware poker apps which generated 5 figures in revenue.  It is beyond sad that such an amazing project (which likely has required hundreds of hours) is so under-compensated.  If you don't support developers then don't complain when projects stall and die.  Saying "great work" is one thing putting your money where your mouth is means a lot more.  


Conclusion:
Wow that was lot.  If you are paying for internet by the bit/byte well I am sorry.  Grin
If anyone who has pledged has a disagreement with what I wrote please state so in the thread.  This isn't a dictatorship it is more like herding cats.  I can only speak for "my funds" and anything I say should be taken like that.

The future ....(will he ever shut up)
web developers & android developers ... obviously RPC miner will need some remote front ends to be useful.  I am already thinking of web front end & android app front ends which connect to cgminerRPC.  Obviously that would be a separate projects/bounties but I am willing to put some funds towards that too.  Nothing formal yet and it likely won't happen (unless started by someone else) until I get back but if you want a head start take a look at this thread and get thinking on how you would write your front end.

Gerald Davis  CEO, Tangible Cryptography Inc.
BitSimple. A simpler way to buy and sell bitcoins
DeathAndTaxes
Donator
Hero Member
*
Offline Offline

Activity: 966



View Profile WWW

Ignore
November 30, 2011, 02:52:09 PM
 #58

+1

Plus maybe some testing by users.  Testing doesn't need only be done by those who have pledged.  If you are interested in remote control cgminer, download it, use kano scripts to control it remotely and report back.

Gerald Davis  CEO, Tangible Cryptography Inc.
BitSimple. A simpler way to buy and sell bitcoins
ckolivas
Moderator
Hero Member
*
Offline Offline

Activity: 1036



View Profile WWW

Ignore
November 30, 2011, 02:54:59 PM
 #59

For those talking about the windows version, perhaps you missed this:

Well after going through all the pain and agony of building a windows executable ...

It's here: https://github.com/kanoi/cgminer/downloads

Primary developer/maintainer for cgminer: https://bitcointalk.org/index.php?topic=28402.0  148KkS2vgVi4VzUi4JcKzM2PMaMVPi3nnq
ONLY ignoring luke-jr
-ck
DeathAndTaxes
Donator
Hero Member
*
Offline Offline

Activity: 966



View Profile WWW

Ignore
November 30, 2011, 02:56:44 PM
 #60

For those talking about the windows version, perhaps you missed this:

Well after going through all the pain and agony of building a windows executable ...

It's here: https://github.com/kanoi/cgminer/downloads

Wow reading comprehension fail on my part.  Thanks.

Gerald Davis  CEO, Tangible Cryptography Inc.
BitSimple. A simpler way to buy and sell bitcoins
Pages: 1 2 [3] 4 5 6 7 8 9  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!