Bitcoin Forum
December 10, 2016, 09:09:59 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   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 17650 times)
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 22, 2011, 10:24:23 AM
 #21

... or just use the -T option and pipe it into something ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
1481360999
Hero Member
*
Offline Offline

Posts: 1481360999

View Profile Personal Message (Offline)

Ignore
1481360999
Reply with quote  #2

1481360999
Report to moderator
Some PGP public keys you should import: theymos, BadBear, Sirius, Stefan, Wladimir, Gavin, Gregory, Jeff, Pieter
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481360999
Hero Member
*
Offline Offline

Posts: 1481360999

View Profile Personal Message (Offline)

Ignore
1481360999
Reply with quote  #2

1481360999
Report to moderator
1481360999
Hero Member
*
Offline Offline

Posts: 1481360999

View Profile Personal Message (Offline)

Ignore
1481360999
Reply with quote  #2

1481360999
Report to moderator
1481360999
Hero Member
*
Offline Offline

Posts: 1481360999

View Profile Personal Message (Offline)

Ignore
1481360999
Reply with quote  #2

1481360999
Report to moderator
Chefnet
Hero Member
*****
Offline Offline

Activity: 686


View Profile
November 22, 2011, 11:04:41 AM
 #22

Theres so many projects that I want to help out!  Bitcoiners are still coming up with great ideas.

I'll pledge 10 BTC.  I'll pledge 5 more if I ckolivas pulls the code into his main branch (even if he codes it).  I think this would help us by keeping bugs to a minimum.  Multiple versions of cgminer are sure to only complicate things and slow features down.
agree +1.

add 15BTC by me if it will be mainline.

ThiagoCMC
Legendary
*
Offline Offline

Activity: 1190


฿itcoin: Currency of Resistance!


View Profile WWW
November 22, 2011, 02:35:46 PM
 #23

Hi!

 I would love to support this... I can give 5 BTCs now.

 And I have a suggestion:

 1- Identify a GPU by its "device ID" (possible?);
 2- Configuration of each GPU based on its ID;
 3- A different "pool / login / worker" per device (fixed by its ID).

 This way, no matter if a GPU is GPU0 or GPU1, the ID will be the same, so its own configurations...

 This can be usefull if we change a GPU slot or add/remove GPUs from a machine.

 It can works more or less like Linux file system UUID, with it, no matter if the device is sda or sdb, the FS UUID will be always the same and the file system will be mounted without any problem if you change the disk connection.

Best,
Thiago

Mercado Forex acessível para todos os Brasileiros que tenham Bitcoins! Cadastre-se hoje mesmo! Bastar acessar aqui: https://1broker.com/m/r.php?i=8879
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
November 22, 2011, 02:54:25 PM
 #24

Hi!

 I would love to support this... I can give 5 BTCs now.

 And I have a suggestion:

 1- Identify a GPU by its "device ID" (possible?);
 2- Configuration of each GPU based on its ID;
 3- A different "pool / login / worker" per device (fixed by its ID).

 This way, no matter if a GPU is GPU0 or GPU1, the ID will be the same, so its own configurations...

 This can be usefull if we change a GPU slot or add/remove GPUs from a machine.

 It can works more or less like Linux file system UUID, with it, no matter if the device is sda or sdb, the FS UUID will be always the same and the file system will be mounted without any problem if you change the disk connection.

Best,
Thiago

Is the hardware ID exposed by AMD SDK?  I don't believe it is but I only glanced over AMD SDK and example source code.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
November 22, 2011, 03:08:03 PM
 #25

The JSON RPC is also the reason why bitcoin, pools and even ltc have such problems dealing with what amounts to not a lot of data.
I believe the bottleneck on pools is bitcoind internal code not the JSON RPC. I do agree JSON is very heavy but for the amounts of data we are dealing with here it is a non-issue.  Personally I wouldn't use JSON but then again I am a windows developer so for interprocess communication my first thoughts are going to be sockets, memory mapped files, or named pipes.

Really the entire bitcoind needs to be built from ground up for high performance.  Using a real multi-user database, multi-core transaction engine, and some sort of higher throughput I/O interface like sockets.  Honestly does anyone think if Amazon accepted Bitcoin they would use the existing bitcoind to process transactions?  The community could use a high performance bitcoind.

Quote
If someone else wants to write it then I guess JSON RPC is what will be used and it will suck badly like the rest of the JSON RPC interfaces spread throughout Bitcoin.

Why?  How many I/O do you think need to be made against a single miner instance.  I mean even polling for updated stats once per second is not going to be a bottleneck.  Things like error reporting, changing clocks, and restarting instances are going to happen so infrequently to be even less of a non-issue.

Quote
I get and see a lot of responses from people saying how "Satoshi said so thus that's how it should be"
This is another example of it.

Nobody said that (except you).  The bounty isn't limited to JSON.  However just doing something different for the sake of different is dubious at best.

As far as Satoshi decision.  He likely never saw the rise of mining pools.  At the time he wrote it miners were getting maybe 1 MH/s on current hardware.  Even at 1 GH/s you only need 1 getwork every 4 seconds.  Block changes are only every 600 seconds.  How many transactions per second is a merchant going to need 1 tps = 86,400 orders per day.

He likely didn't have any philosophical attachment to JSON.  He likely chose it for the same reason millions of developers choose it every year.  It is ease to implement and it was capable of the performance required of it.

Honestly if you made a socket based bitcoind you likely could collect quite a bounty from pool operators.  As that I/O pressure is not going to go away.

kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 22, 2011, 07:48:40 PM
 #26

Quote
I get and see a lot of responses from people saying how "Satoshi said so thus that's how it should be"
This is another example of it.

Nobody said that (except you).  The bounty isn't limited to JSON.  However just doing something different for the sake of different is dubious at best.

As far as Satoshi decision.  He likely never saw the rise of mining pools.  At the time he wrote it miners were getting maybe 1 MH/s on current hardware.  Even at 1 GH/s you only need 1 getwork every 4 seconds.  Block changes are only every 600 seconds.  How many transactions per second is a merchant going to need 1 tps = 86,400 orders per day.

He likely didn't have any philosophical attachment to JSON.  He likely chose it for the same reason millions of developers choose it every year.  It is ease to implement and it was capable of the performance required of it.

Honestly if you made a socket based bitcoind you likely could collect quite a bounty from pool operators.  As that I/O pressure is not going to go away.
Obviously I am not referring to this thread regarding comments about Satoshi.
Anyone but a fool can see that no one mentioned Satoshi in it before my comment ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 756


View Profile
November 22, 2011, 10:37:35 PM
 #27

Theres so many projects that I want to help out!  Bitcoiners are still coming up with great ideas.

I'll pledge 10 BTC.  I'll pledge 5 more if I ckolivas pulls the code into his main branch (even if he codes it).  I think this would help us by keeping bugs to a minimum.  Multiple versions of cgminer are sure to only complicate things and slow features down.
agree +1.

add 15BTC by me if it will be mainline.

I'll match this...10 for the project and another 5 if it will be mainline.  Has anyone set up an escrow wallet of some sort?

Goddamnit that's the sum total of how much I've earned in donations in total for cgminer  Angry

I increased my donation %.  That's just crazy, cgminer is worth more than that.

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

Activity: 2002


Ruu \o/


View Profile WWW
November 22, 2011, 11:50:17 PM
 #28

Goddamnit that's the sum total of how much I've earned in donations in total for cgminer  Angry
I increased my donation %.  That's just crazy, cgminer is worth more than that.
Thanking you very much. Just for the record, I just checked and the sum total of hashes from all --donation are currently running at 100 Mhash. It usually hovers between 100-200. Note that I intentionally made the percentage err on the conservative side, and it will virtually always be less than what you set it to since I didn't want complaints.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 23, 2011, 03:48:39 AM
 #29

https://github.com/kanoi/cgminer

API v0.1

Includes a sample api-example.php

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?

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

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?
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.

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?

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

Edit3: added 'quit' and 'summary'

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #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
November 23, 2011, 06:05:31 AM
 #30

Good work kano!

I am working on my Python warpper for cgminer, too. Initial version will be upload later.

It is a RESTful application which will accept JSON format as control / query.

I'll make it support all the miners, like poclbm, phoenix... etc.

https://github.com/kanoi/cgminer

API v0.1

Includes a sample api-example.php

6 files added/changed from current ckolivas master:

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

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?

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

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?
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.

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?

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

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

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 23, 2011, 06:15:12 AM
 #31

Looking at the first post, I guess all I need to add is:
* Start/stop/restart individual GPUs (on restart recheck config file for any changes)

But I have no idea what you mean by "(on restart recheck config file for any changes)"


As for this:
* Report any failures (a min of card down & pool not responding)

Well my output reports the CPU/GPU/POOL status but "pool not responding" seems a bit strange?
What could you actually do with that? cgminer deals with that itself.

Since the API isn't a constant connection, rather a request + reply - I'm not sure what the point of that would be.
I guess I could add a buffer in cgminer to keep ERROR messages and return the list since the last time?

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
November 23, 2011, 08:58:49 AM
 #32

https://github.com/kanoi/cgminerEdit: 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?
Just getting the info should be safe, if done after everything is set up and all the threads started.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 23, 2011, 09:19:57 AM
 #33

https://github.com/kanoi/cgminerEdit: 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?
Just getting the info should be safe, if done after everything is set up and all the threads started.
It's the last thread created.
But I'll check see if there's something I can check/sleep until it's ready - I guess that would be better.
(or add a variable for that exact reason)
Arigatou.

Edit: after a closer look - everything seems to be initialised before the threads are created so it should be fine.
Also now added the parameter options required:
--api-port nnn (port number to use - default 4028)
--api-listen (defaults to only listen on 127.0.0.1 for security - this boolean option means listen on 0.0.0.0)

I guess GPU/CPU enable/disable is next ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 23, 2011, 02:48:52 PM
 #34

But I have no idea what you mean by "(on restart recheck config file for any changes)"
When you send cgminer the restart request and it restarts, load the config file and use values from there.  This is a given, since if it reads the config file when it starts, it will when it restarts too.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 23, 2011, 03:14:38 PM
 #35

But I have no idea what you mean by "(on restart recheck config file for any changes)"
When you send cgminer the restart request and it restarts, load the config file and use values from there.  This is a given, since if it reads the config file when it starts, it will when it restarts too.
Hmm - but that doesn't seem to makes sense.

The stop/start/restart request is just for a single GPU.

If your editing the config file you may as well just stop and start cgminer from scratch.
i.e. press q (or send a 'quit' command) and start it again
i.e. run it in a script that just continually loops starting it (like the script I have posted before) and tell it to quit so it starts from scratch.
If you mean a global 'restart' command, not a single GPU stop/start/restart (like quit but that starts again afterwards)
But it really is better to actually completely stop cgminer and restart it since the point of that is to clear the ATI/AMD interface and like windows, that is best done as a complete program stop/start coz ATI/AMD are not good at dealing with that ... and that would also give you all an excuse for not having to pay me too - that should make everyone happy Smiley

I'll just implement a GPU stop/start option.

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
November 23, 2011, 03:33:57 PM
 #36

But I have no idea what you mean by "(on restart recheck config file for any changes)"
When you send cgminer the restart request and it restarts, load the config file and use values from there.  This is a given, since if it reads the config file when it starts, it will when it restarts too.
Hmm - but that doesn't seem to makes sense.

The stop/start/restart request is just for a single GPU.

If your editing the config file you may as well just stop and start cgminer from scratch.
i.e. press q (or send a 'quit' command) and start it again
i.e. run it in a script that just continually loops starting it (like the script I have posted before) and tell it to quit so it starts from scratch.
If you mean a global 'restart' command, not a single GPU stop/start/restart (like quit but that starts again afterwards)
But it really is better to actually completely stop cgminer and restart it since the point of that is to clear the ATI/AMD interface and like windows, that is best done as a complete program stop/start coz ATI/AMD are not good at dealing with that ... and that would also give you all an excuse for not having to pay me too - that should make everyone happy Smiley

I'll just implement a GPU stop/start option.

Thank makes sense.  I was just thinking that by checking config file on each "restart" one could make changes even if RPC to implement changes in clock/intensity/fan were not implemented.  You are right one could simply end the daemon, change config file, and start the deamon again. 

So unless anyone else has a problem I don't think checking config on starting each GPU is needed or warranted.  It really was just a workaround.  The end goal would be for the project (maybe in later version) to allow controlling GPU via RPC (i.e. change fan 70%, change clock 800MHz, etc).
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 24, 2011, 10:18:03 AM
 #37

Yep adding GPU setting commands shouldn't be too hard now that I've made a pretty simple to edit interface with messages/errors and everything else reasonably simple ... at least for myself Smiley

Git (as before): https://github.com/kanoi/cgminer

OK v0.2 in the git - plus the bunch of changes I spent today adding on top of v0.2 where I tracked down a bug I caused in main.c back when I first started working on this ... yesterday ... (hint 7 <-> 8 Tongue)

The commands so far are:
apiversion - just returns a version string: 0.2
devs - returns the list of gpus and cpus - each with the full status, details, plus
pools - returns the list of pools with their status, details
summary - returns the total summary information similar to when you exit cgminer (without pool breakdown)
gpuenable|N - enable GPU N (flags and notifies the GPU to start)
gpudisable|N - disable GPU N (flags the GPU to stop)
gpurestart|N - restart GPU N
gpu|N - show the 'devs' output but just for GPU N
cpu|N - show the 'devs' output but just for CPU N
quit - quit cgminer

Each return includes a status array of:
STATUS: F (fatal) E (error) W (warning) I (info) S (success)
CODE: the internal error code: each has a unique number - see api.c MSG_ZZZZZZ
MSG: a related status message

F (fatal) only occurs when api.c fails to determine the correct error code - these mean report the output line to me to fix api.c
E (error) you made a mistake - e.g. you sent an unknown command or an invalid CPU/GPU number or those sort of mistakes
W (warning) you need to do something else first - currently only when you try to enable a GPU that's not well
I (info) nothing changed - e.g. trying to enable an enabled GPU
S (success) as expected

I've built a 2.0.8a version for xubuntu 11.04 and you can download the binary here to try it (if you can't compile):
http://tradebtc.net/cgminer2.0.8a
1,760,610 bytes, sha256sum: a96ef5ad0914b3becb059f992da93801badcea0dc946120b0199ff31ab4d7b67

Of course you'll need something like api-example.php in the git to try issuing commands to it and see the result.
Otherwise it runs exactly the same as an ADL 2.0.8 so you can use it normally also ... and I didn't even change the donation code Tongue

So ... what's missing?

Edit: I'll update the DOC files once I've done the initial set of requirements and sorted out with ckolivas about if he'll accept the commits to his git

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
tnkflx
Sr. Member
****
Offline Offline

Activity: 346


View Profile
November 24, 2011, 10:19:46 AM
 #38

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

The Windows version? ;-)

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

Activity: 1932


Linux since 1997 RedHat 4


View Profile
November 24, 2011, 09:08:21 PM
 #39

Hmm I don't actually have a windows compiler or even a computer running windows that could compile it
(just my kids computer runs windows)
I do have a VirtualBox OSE that I run the Aus Tax/Bas programs in on this computer (but of course no ATI card)
Anyone got a link to how I'd compile a OCL/ADL program (using gcc?) on 32-bit WindowsXP for everyone? Tongue
(or some other legal free compiler on windows)

Edit: hmmm - mingw or cygwin? Have to read the cgminer thread to work out which one ckolivas was using ...

Edit2: seems to be mingw ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
November 24, 2011, 09:23:54 PM
 #40

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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
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!