Bitcoin Forum
December 11, 2016, 08:28:03 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 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 »
  Print  
Author Topic: DiabloMiner GPU Miner  (Read 804651 times)
twmz
Hero Member
*****
Offline Offline

Activity: 737



View Profile
July 13, 2011, 01:03:55 PM
 #881

There is no reason to believe LP should be a GET

Except the fact that the person who invented it says it should be a GET in his documentation of how it should work.  But the intentions of the guy who defined the standard doesn't matter... 

And the argument that a JSON-RPC request has to be a POST is irrelevant because the LP request as defined by the Deepbit spec is not a JSON-RPC request just because its response looks like a JSON-RPC response.   Two different standards can have responses that look the same without being the same in all other ways.   

You've defined a new standard.  A "DiabloD3 Long Poll".  Cool.  But they people who are following the published guidelines for the "Deepbit Long Poll" are not idiots (as you appear to be implying).  They are just doing exactly what it says they should be doing.

It's a pointless argument.  Fortunately, it's easy enough for pools and proxies to support both by not caring if there is a POST body or not.

Was I helpful?  1TwmzX1wBxNF2qtAJRhdKmi2WyLZ5VHRs
WoT, GPG

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

Posts: 1481444883

View Profile Personal Message (Offline)

Ignore
1481444883
Reply with quote  #2

1481444883
Report to moderator
1481444883
Hero Member
*
Offline Offline

Posts: 1481444883

View Profile Personal Message (Offline)

Ignore
1481444883
Reply with quote  #2

1481444883
Report to moderator
nmat
Hero Member
*****
Offline Offline

Activity: 602


View Profile
July 13, 2011, 03:15:12 PM
 #882

You initialise the networkStates array with a length of 0 if the url command line option is not used, resulting in an ArrayIndexOutOfBoundsException on line 427:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.diablominer.DiabloMiner.DiabloMiner.execute(DiabloMiner.java:427)
        at com.diablominer.DiabloMiner.DiabloMiner.main(DiabloMiner.java:133)
Initialising it to 1 with the command line arguments:
Code:
-dd -o "swepool.net" -r 8337 -p "mypwd" -u "myuser" -w 128
I get the following exception:
Code:
Exception in thread "DiabloMiner GetWorkAsync for swepool.net" java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:427)
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1285)
        at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1007)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState.doJSONRPC(DiabloMiner.java:688)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState$GetWorkAsync.run(DiabloMiner.java:815)
        at java.lang.Thread.run(Thread.java:680)

A little more testing without the url option might be in order...

I still have this error on Ubuntu 10.04. Did you fix it only in the code or are the binaries also updated?
kaosbit
Newbie
*
Offline Offline

Activity: 25


View Profile
July 13, 2011, 09:17:21 PM
 #883

And the argument that a JSON-RPC request has to be a POST is irrelevant because the LP request as defined by the Deepbit spec is not a JSON-RPC request just because its response looks like a JSON-RPC response.
A a protocol is mutual agreement on proper procedure, so yeah, you can pretty well do anything you want if people play along. But you should not call it HTTP or JSON-RPC then, if it merely happens to look similar.
Diablo chooses to follow the very well established HTTP standard and the somewhat established JSON-RPC standard, rather than the quite ad-hoc LP spec. This is a good thing, even if current pool practice also accommodates the JSON-RPC-ish GET LP, as you indicate:

Fortunately, it's easy enough for pools and proxies to support both by not caring if there is a POST body or not.

Like my work? Donate to: 168SpEzJXnb9onTgdyxZ97yzRSTrp9BKHh
twmz
Hero Member
*****
Offline Offline

Activity: 737



View Profile
July 13, 2011, 09:26:20 PM
 #884

But you should not call it HTTP or JSON-RPC then, if it merely happens to look similar.

Fortunately, the deepbit.net LP spec doesn't call it JSON-RPC.  And it does happen to be perfectly compliant use of HTTP (make a GET request; get back a response).

Was I helpful?  1TwmzX1wBxNF2qtAJRhdKmi2WyLZ5VHRs
WoT, GPG

Bitrated user: ewal.
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 14, 2011, 03:28:37 AM
 #885

You initialise the networkStates array with a length of 0 if the url command line option is not used, resulting in an ArrayIndexOutOfBoundsException on line 427:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.diablominer.DiabloMiner.DiabloMiner.execute(DiabloMiner.java:427)
        at com.diablominer.DiabloMiner.DiabloMiner.main(DiabloMiner.java:133)
Initialising it to 1 with the command line arguments:
Code:
-dd -o "swepool.net" -r 8337 -p "mypwd" -u "myuser" -w 128
I get the following exception:
Code:
Exception in thread "DiabloMiner GetWorkAsync for swepool.net" java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:427)
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1285)
        at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1007)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState.doJSONRPC(DiabloMiner.java:688)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState$GetWorkAsync.run(DiabloMiner.java:815)
        at java.lang.Thread.run(Thread.java:680)

A little more testing without the url option might be in order...

I still have this error on Ubuntu 10.04. Did you fix it only in the code or are the binaries also updated?

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.

nmat
Hero Member
*****
Offline Offline

Activity: 602


View Profile
July 14, 2011, 05:50:51 AM
 #886

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.

Thanks, I got it working and it's a little faster than poclbm. Are there stable releases or is everything just "up to date"? Not complaining, just asking Smiley

But now I have other problems. I am testing things out with a slow card (I am still thinking about investing in newer hardware) so I am running at ~15 Mhash/s with an ATI 5450 on Ubuntu 10.04. The miner runs, but after a while java pushes one of my CPU cores to 100% and stays there. My connection is a little unstable and sometimes the miner prints connection errors, but nothing else... Any idea?
ancow
Sr. Member
****
Offline Offline

Activity: 373


View Profile WWW
July 14, 2011, 06:36:51 AM
 #887

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.
I'd watch myself before calling anything I don't understand nonsensical. Especially -p and -u arguments may contain special characters that should be escaped from the shell, so it's generally good practice to put them in double-quotes when using them in a shell script.

BTC: 1GAHTMdBN4Yw3PU66sAmUBKSXy2qaq2SF4
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 14, 2011, 08:30:18 AM
 #888

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.
I'd watch myself before calling anything I don't understand nonsensical. Especially -p and -u arguments may contain special characters that should be escaped from the shell, so it's generally good practice to put them in double-quotes when using them in a shell script.

Sure, if you're on a shell that actually handles that. Windows afaik doesn't.

ellipsis
Newbie
*
Offline Offline

Activity: 28


View Profile
July 15, 2011, 03:20:49 AM
 #889

Diablo, I ran into a few NPEs from commit 63d5dbb9732c6253cde2ae962aa2ae456f4ce02f. Would you like a patch sent somewhere?

https://tmmb2ro3icewhmqz.onion/
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 15, 2011, 10:45:59 PM
 #890

Diablo, I ran into a few NPEs from commit 63d5dbb9732c6253cde2ae962aa2ae456f4ce02f. Would you like a patch sent somewhere?

Get an account on github and send me a merge request. Its the easiest way to send me code.

ellipsis
Newbie
*
Offline Offline

Activity: 28


View Profile
July 16, 2011, 10:03:42 PM
 #891

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.

https://tmmb2ro3icewhmqz.onion/
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 17, 2011, 02:04:39 AM
 #892

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.

Java coders prefer checking against "" instead of checking length for some reason. Almost all the places I check also check for null as well.

And why around 831? At no point can that be null.

ellipsis
Newbie
*
Offline Offline

Activity: 28


View Profile
July 17, 2011, 02:28:42 AM
 #893

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.

Java coders prefer checking against "" instead of checking length for some reason. Almost all the places I check also check for null as well.

Maybe retarded Java coders. !"".equals(null) evaluates as true (!false). You intend for it to return false, as in this case:

Code:
        if(!"".equals(url.getUserInfo())) {
          String[] userPassSplit = url.getUserInfo().split(":");

If url.getUserInfo() returns null, you will proceed into the conditional block and dereference a null.

Code:
        if(hasLength(url.getUserInfo())) {
          String[] userPassSplit = url.getUserInfo().split(":");

hasLength will return false, and skip the block. Hurrah.

And why around 831? At no point can that be null.

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Lesson complete.

https://tmmb2ro3icewhmqz.onion/
nmat
Hero Member
*****
Offline Offline

Activity: 602


View Profile
July 17, 2011, 03:53:35 AM
 #894

I want to reduce GPU usage because I use the computer where I mine. I suppose this is done with the -f option, but I can't find any documentation for it (except "target execution timing"). What sort of values should be used here?
ihokamik
Newbie
*
Offline Offline

Activity: 29


View Profile
July 17, 2011, 06:49:26 AM
 #895

I want to reduce GPU usage because I use the computer where I mine. I suppose this is done with the -f option, but I can't find any documentation for it (except "target execution timing"). What sort of values should be used here?

It's a matter of preference but here is the values I use.

-f 30 for browsing
-f 60 for HD video
-f 240 for games

It's also a good idea to disable flash acceleration and aero.

BTC: 1J1qoYkA7ZUjBFcCHDJt3PSBvzvGhA3mmh
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 17, 2011, 08:30:06 AM
 #896

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Lesson complete.

Then I should be checking for the exception, not if it is != null.

ellipsis
Newbie
*
Offline Offline

Activity: 28


View Profile
July 17, 2011, 07:16:03 PM
 #897

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Then I should be checking for the exception, not if it is != null.
Yes, a better alternative would be to move your getWorkParser variable declaration at 819 and everything below and outside of the catch (830-853) into the try block. Since I'm a stickler about these things, I would also make getWorkParser final and toss the unnecessary null assignments to get rid of another possible null dereference compiler warning. Smiley If you were aggressively nulling the variable because it was in a loop because you were worried about holding a reference in the loop, that GC weirdness workaround hasn't been necessary for a very long time. Besides, you will be reducing scope now, which is cleaner than null assignment, and the GC is non-deterministic, anyway.

https://tmmb2ro3icewhmqz.onion/
nmat
Hero Member
*****
Offline Offline

Activity: 602


View Profile
July 18, 2011, 12:03:03 AM
 #898

It's a matter of preference but here is the values I use.

-f 30 for browsing
-f 60 for HD video
-f 240 for games

It's also a good idea to disable flash acceleration and aero.

Thank you
macrum
Newbie
*
Offline Offline

Activity: 24


View Profile
July 18, 2011, 07:14:16 PM
 #899

Hello!

I've found a bug in the current version...

I can't connect to my mining pool with the -l option anymore. -o still works. Please check this out.

Also i have this problem here with my second card i installed today:

[7/18/11 9:01:36 PM] Started                                                 
[7/18/11 9:01:36 PM] Connecting to: http://174.133.197.173:8332/             
[7/18/11 9:01:37 PM] Using AMD Accelerated Parallel Processing OpenCL 1.1 AMD-APP-SDK-v2.4 (595.10)
[7/18/11 9:01:40 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:40 PM] Added Cayman (#1) (24 CU, local work size of 256)       
[7/18/11 9:01:44 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:44 PM] Added Cayman (#2) (24 CU, local work size of 256)       
[7/18/11 9:01:46 PM] 174.133.197.173 accepted block 1 from Cayman (#1)       
[7/18/11 9:02:00 PM] 174.133.197.173 accepted block 2 from Cayman (#2)       
[7/18/11 9:02:12 PM] 174.133.197.173 accepted block 3 from Cayman (#1)       
[7/18/11 9:02:14 PM] 174.133.197.173 accepted block 4 from Cayman (#2)       
[7/18/11 9:02:22 PM] 174.133.197.173 accepted block 5 from Cayman (#1)       
mhash: 362.1/412.3 | accept: 5 | reject: 0 | hw error: 40718

Please help me, i really don't like those python miners...

I am running on CentOS 6 with two 6950's
If you need more info please tell!
DiabloD3
Legendary
*
Offline Offline

Activity: 1162


DiabloMiner author


View Profile WWW
July 18, 2011, 08:36:03 PM
 #900

Hello!

I've found a bug in the current version...

I can't connect to my mining pool with the -l option anymore. -o still works. Please check this out.

Also i have this problem here with my second card i installed today:

[7/18/11 9:01:36 PM] Started                                                 
[7/18/11 9:01:36 PM] Connecting to: http://174.133.197.173:8332/             
[7/18/11 9:01:37 PM] Using AMD Accelerated Parallel Processing OpenCL 1.1 AMD-APP-SDK-v2.4 (595.10)
[7/18/11 9:01:40 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:40 PM] Added Cayman (#1) (24 CU, local work size of 256)       
[7/18/11 9:01:44 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:44 PM] Added Cayman (#2) (24 CU, local work size of 256)       
[7/18/11 9:01:46 PM] 174.133.197.173 accepted block 1 from Cayman (#1)       
[7/18/11 9:02:00 PM] 174.133.197.173 accepted block 2 from Cayman (#2)       
[7/18/11 9:02:12 PM] 174.133.197.173 accepted block 3 from Cayman (#1)       
[7/18/11 9:02:14 PM] 174.133.197.173 accepted block 4 from Cayman (#2)       
[7/18/11 9:02:22 PM] 174.133.197.173 accepted block 5 from Cayman (#1)       
mhash: 362.1/412.3 | accept: 5 | reject: 0 | hw error: 40718

Please help me, i really don't like those python miners...

I am running on CentOS 6 with two 6950's
If you need more info please tell!

Holy crap dude. What is the entire arguments you're feeding it?

Also, what did you try feeding it with -l? It should work fine if you're using it right.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 »
  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!