Pages:
Author

Topic: New stratum/getwork proxy with Web-based GUI and pools management - page 23. (Read 120841 times)

full member
Activity: 217
Merit: 100
Hi,

Could you explain which balance you are talking about ?
sr. member
Activity: 241
Merit: 250
I just found out about this great stratum-proxy and its perfect but i missing Balance. Is it anything that can be implented?

Cheers
hero member
Activity: 672
Merit: 500
Could you enable the DEBUG logLevel and disable the second pool in your configuration file ?

In the configuration file:
Change the value of:
 "logLevel" : "DEBUG",
 "disableLogAppend": true,

And in the second pool configuration (Westhash), add/change the line:
"isEnabled": false

I have read the log file and it seems that a worker has successfully submited shares. Have you several workers? If so, could you do the tests only with the workers which does not work ?

Thanks



i dont think the problem is  worker ,im using asicminer 850G tube , they say this shit cant mine anything except Ghash?
full member
Activity: 217
Merit: 100
Could you enable the DEBUG logLevel and disable the second pool in your configuration file ?

In the configuration file:
Change the value of:
 "logLevel" : "DEBUG",
 "disableLogAppend": true,

And in the second pool configuration (Westhash), add/change the line:
"isEnabled": false

I have read the log file and it seems that a worker has successfully submited shares. Have you several workers? If so, could you do the tests only with the workers which does not work ?

Thanks


hero member
Activity: 672
Merit: 500
https://mega.co.nz/#!BUZHUKKJ!wIn6SdIrlwXVdn0VOAvG2u23ZvSH-LYbMU3z0k2FRJg

stratum-proxy.log uploaded , please helpme if possible.
full member
Activity: 217
Merit: 100
Hi,

Could you send me the log file of the proxy please? I cannot see the begining of the error.
how to get the log file ? where? Huh Cry

On Windows, it is located by default in the temp folder of the user: use %temp% in the address bar of the file explorer. The file is called stratum-proxy.log
hero member
Activity: 672
Merit: 500
Hi,

Could you send me the log file of the proxy please? I cannot see the begining of the error.
how to get the log file ? where? Huh Cry
full member
Activity: 217
Merit: 100
Hi,

Could you send me the log file of the proxy please? I cannot see the begining of the error.
hero member
Activity: 672
Merit: 500


anyone can help me? Cry
full member
Activity: 343
Merit: 100
Thanks did some tweaks and made some observations for Nicehash.

1. It's best to start the miner/instance with the LOWEST hashrate first and run it for a few minutes to stabilize it's difficulty. If you don't they both go haywire for a lot longer until they settle down(Nicehash's fault)
2. With 2 instances the reject rate is DRAMATICALLY lower. I haven't calculated it yet but it looks like it kills %90 of the rejects, especially when switching coins with radically different difficulty levels.
3. Hashrate especially on the blades has increased. Obviously because the little blades are not trying to do the same work as the big miner.
4. When Nicehash does switch coins to a different difficulty level and the proxy goes "haywire"(adjusting a radical difficulty level) it recovers much faster with less errors.
5. It's not perfect but a definite improvement, next test would be to try an individual instance for each of the blade boards to improve it more, however it may be worth more trouble than it's worth.
6. I've set the stats page on different ports 8888, 8889. If you wish you can make a hosts entry so all you need to type in your browser "black" or "blades".

Updated config files:

For the black server(25 Mh/s):

{
  "isScrypt" : true,
  "disableStratum" : true,
  "pools" :
  [
  {
    "name" : "Nicehash Black",
    "host" : "stratum.nicehash.com:3333",
    "user" : "your bitcoin address.black",
    "password" : "d=2048",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Westhash Scrypt",
    "host" : "stratum.westhash.com:3333",
    "user" : "your bitcoin address.black",
    "password" : "d=2048",
    "enableExtranonceSubscribe" : true
  }
  ]
}

Config file for the Blades:

{
  "getworkListenPort" : 8333,             <-------Different listening port
  "databaseDirectory": "database1",    <-------Different database directory(copy contents from \database dir)
  "apiListenPort" : 8889,                    <-------Different port for statistics(ie http://yourproxyip:8889)
  "isScrypt" : true,
  "disableStratum" : true,
  "pools" :
  [
  {
    "name" : "Nicehash Blades",            <-----Different Pool name for web interface page
    "host" : "stratum.nicehash.com:3333",
    "user" : "your bitcoin address.blades",            <-------Different username so you can see the stats on Nicehash
    "password" : "d=512",                                     <-------Different starting difficulty for lower hashrate on this server
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Westhash Scrypt2",
    "host" : "stratum.westhash.com:3333",
    "user" : "your bitcoin address.blades",
    "password" : "d=512",
    "enableExtranonceSubscribe" : true
  }
  ]
}

Everyone is free to use any or all of this code. Happy mining!


full member
Activity: 217
Merit: 100
To run several instances of the proxy on the same host, you will need to modify the following parameters:
stratumListenPort, getworkListenPort, apiListenPort and databaseDirectory.

If you do not use stratum, getwork or the API/GUI, you can use the options disableStratum, disableGetwork and disableApi to free the ports.
full member
Activity: 343
Merit: 100
Yea! Success!. We'll see how it goes. Ok here is how it works:


I have 2 batch files called proxy_black.bat (for the 25 mHs)
and                              proxy_blades.bat (for the 10 Mhs total)

proxy_black.bat command:
java -jar stratum-proxy.jar -f stratum-proxy-nicehash.conf

proxy_blades.bat command:
java -jar stratum-proxy.jar -f stratum-proxy-nicehash2.conf

First instance config file:

stratum-proxy-nicehash.conf:

{
  "isScrypt" : true,
  "disableStratum" : true,
  "pools" :
  [
  {
    "name" : "Nicehash Scrypt",
    "host" : "stratum.nicehash.com:3333",
    "user" : "    "password" : "x",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Westhash Scrypt",
    "host" : "stratum.westhash.com:3333",
    "user" : "your bitcoin address.black",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  }
  ]
}


Second config file:

stratum-proxy-nicehash2.conf:

{
  "getworkListenPort" : 8333,               <----different port number to connect your miners ie http://proxyip:8333
  "databaseDirectory": "database1",      <----different directory for database must be different for each instance
  "isScrypt" : true,
  "disableStratum" : true,
  "pools" :
  [
  {
    "name" : "Nicehash Scrypt2",
    "host" : "stratum.nicehash.com:3333",
    "user" : "1your bitcoin address.blades",   <-------different worker name for second instance
    "password" : "x",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Westhash Scrypt2",
    "host" : "stratum.westhash.com:3333",
    "user" : "your bitcoin address.blades",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  }
  ]

There you go you can just keep creating instance as long as you give each instance there own directory for the database file. Just create database1, database2, etc and copy the dbpools and dbusers from the original database directory.
full member
Activity: 343
Merit: 100
How about creating 2 instances of the proxy server? How would this be achieved? I've tried to create 2 batch files pointing to different config files but couldn't get it to run probably because of a port issue. How could I use my basic config file to create 2 configs. Here's an alternate config for a second instance a worker called "blades":


{
  "getworkListenPort" : 8333,  <---I believe this is the syntax correct?(used next port up from the standard 8332 used on the first instance.)
  "isScrypt" : true,
  "disableStratum" : true,
  "pools" :
  [
  {
    "name" : "Nicehash Scrypt2",
    "host" : "stratum.nicehash.com:3333",
    "user" : "1CZcmzEsYnE86ZTkygV1gu8RG51vUfFJTs.blades",  <-----should I even bother with another worker?
    "password" : "x",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Westhash Scrypt2",
    "host" : "stratum.westhash.com:3333",
    "user" : "1CZcmzEsYnE86ZTkygV1gu8RG51vUfFJTs.blades",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  }
  ]
}

WHen I run a second batch file using this config it just gives me an error.

C:\stratum-proxy-0.5.0>java -jar stratum-proxy.jar -f stratum-proxy-nicehash2.co
nf
Log directory not set. Use the tmp OS directory.
Use log directory C:\Users\SCHTIC~1\AppData\Local\Temp
2014-09-08 08:22:53,852 INFO     [main]:strat.mining.stratum.proxy.configuration
.ConfigurationManager - Using INFO LogLevel.
2014-09-08 08:22:53,853 INFO     [main]:strat.mining.stratum.proxy.configuration
.ConfigurationManager - API log level not set. API logging disabled.
2014-09-08 08:22:53,858 INFO     [main]:strat.mining.stratum.proxy.configuration
.ConfigurationManager - Database directory not specified. Using default one: C:\
stratum-proxy-0.5.0\database.                                    <-------could this be the problem? Using the same file could be a windows filesharing error
2014-09-08 08:22:53,861 INFO     [main]:strat.mining.stratum.proxy.database.Data
baseManager - Starting DatabaseManager...              
2014-09-08 08:22:53,950 ERROR    [main]:strat.mining.stratum.proxy.Launcher - Fa
iled to start the proxy.  <<<<<<<< Error<<<<<<<<<com.db4o.ext.DatabaseFileLockedException: C:\stratum-proxy-0.5.0\database\dbpool
s                                                    <-----------locked file due to first instance. Whats the syntax for changing database path?
        at com.db4o.internal.JDK_1_4.lockFile(JDK_1_4.java:64)
        at com.db4o.internal.Platform4.lockFile(Platform4.java:439)
        at com.db4o.io.RandomAccessFileFactory.newRandomAccessFile(RandomAccessF
ileFactory.java:21)
        at com.db4o.io.FileStorage$FileBin.(FileStorage.java:43)
        at com.db4o.io.FileStorage.open(FileStorage.java:22)
        at com.db4o.io.StorageDecorator.open(StorageDecorator.java:27)
        at com.db4o.io.CachingStorage.open(CachingStorage.java:52)
        at com.db4o.internal.IoAdaptedObjectContainer.openImpl(IoAdaptedObjectCo
ntainer.java:57)
        at com.db4o.internal.ObjectContainerBase$1.run(ObjectContainerBase.java:
140)
        at com.db4o.foundation.DynamicVariable.with(DynamicVariable.java:54)
        at com.db4o.foundation.Environments.runWith(Environments.java:28)
        at com.db4o.internal.ObjectContainerBase.withEnvironment(ObjectContainer
Base.java:161)
        at com.db4o.internal.ObjectContainerBase.open(ObjectContainerBase.java:1
31)
        at com.db4o.internal.IoAdaptedObjectContainer.(IoAdaptedObjectCont
ainer.java:35)
        at com.db4o.internal.ObjectContainerFactory.openObjectContainer(ObjectCo
ntainerFactory.java:18)
        at com.db4o.Db4oEmbedded.openFile(Db4oEmbedded.java:65)
        at strat.mining.stratum.proxy.database.DatabaseManager.(DatabaseMa
nager.java:60)
        at strat.mining.stratum.proxy.database.DatabaseManager.getInstance(Datab
aseManager.java:75)
        at strat.mining.stratum.proxy.Launcher.initDatabaseManager(Launcher.java
:213)
        at strat.mining.stratum.proxy.Launcher.main(Launcher.java:123)



If I get it to work I'll post a tutorial for those that have different hashrates with different miners so everyone can benefit.
full member
Activity: 217
Merit: 100
Pools define the difficulty by connections, not by workers. Without proxy, each worker has its own connection, so they can each have their own difficulty value. With the proxy, the pool only see a single connection, and thus think there is only one worker => only one difficulty value.

Behind the proxy, all workers will have the same difficulty value (it is what you have already seen). I remember that Nicehash have implemented VarDiff recently. That is why your difficulty rises up, since Nicehash sees about 35 MH/s on the connection.

In the current version of the proxy, there is no solution to use different difficulty values by worker. I have already thought about a solution (since you are not the first one to ask me for this kind of feature), but I do not know when I will have enough time to implement it.
full member
Activity: 343
Merit: 100
full member
Activity: 217
Merit: 100
No, this feature is not implemented. Maybe one day, but it is a lots of work.
sr. member
Activity: 458
Merit: 250
beast at work
can this be used for something like this ?

wallet(win64) < proxy < minerd(rPI)
newbie
Activity: 2
Merit: 0
Cool, thanks for the explanation.
full member
Activity: 217
Merit: 100
Quote
Just passing the unmodified message to the miners would result in duplicate work being submitted, correct?

Right.

Quote
When the miner connects, I pass them all the data I received from the pool as subscribe response. 

The subscribe response contains only the extranonce1 and the size of extranonce2.

So, you have to send unique extranonce1 to each miner. To do so, you reduce the size of extranonce2 sent to miners and append a unique value to the extranonce1 value.

For example, if a pool send you an extranonce2Size of 4 and an extranonce1 which is "0152F784", you will have to send an extranonce2Size of 3 to workers and send to each workers an extranonce1 which is "0152F784" + "xx" where xx is a 1-byte unique value in Hexadecimal.

Then, when the pool send a new job notification , just send it back to all miners.
newbie
Activity: 2
Merit: 0
Hey,

I'm browsing your code, since I've tried to do something similar in the past. Could you please clarify a few things for me?

I've struggled to figure out what to do exactly when the pool sends the notify message with a new job. Just passing the unmodified message to the miners would result in duplicate work being submitted, correct? I have tried to pass the jobs to the miners in a round robin fashion, or something similar, but that resulted in timeouts and such. When the miner connects, I pass them all the data I received from the pool as subscribe response. 

Now, in your code, I see that you are sending a modified extra nounce when the miner connects:

request.setExtranonce2(extranonce1Tail + request.getExtranonce2());

I'm guessing that your are somehow "splitting" the work over the connected miners, correct? Can you please explain how does this work?


Then, you are just passing the work to every connected miner without problems (onPoolNotify you iterate through all of them), right?

Pages:
Jump to: