Luke-Jr
Legendary
Offline
Activity: 2576
Merit: 1186
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 09, 2014, 05:54:06 PM |
|
Hi guys I'm trying to setup a simple http request to stratum mining pool in c#. I'm getting this error: "Underlaying connection was closed." string json = "{\"method\": \"getblocktemplate\", \"params\": [], \"id\": \"0\"}"; WebClient w = new WebClient(); w.Credentials = new NetworkCredential("user", "pass"); w.Headers.Add("Content-type", "application/stratum"); j = wc.UploadString("http://blabla.com:3333", json);
Please help This thread is for the stratum mining protocol, but you seem to be trying to use GBT (with the wrong Content-type, and apparently connecting to a stratum host...) GBT and stratum are not compatible.
|
|
|
|
fasbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 03, 2014, 09:19:50 PM |
|
So... I have stratum mining proxy up and running and it looks like everything is ok... but when I throw a miner at it..
All shares are rejected - Low Difficulty
Example:
[2014-04-03 16:02:21] Rejected 1423c153 Diff 3.25K/256 GSD 9 ((23, u'Low difficulty share'
You may notice I am using Gridseed Fork of cgminer....Maybe compatibility Issue? Its 3.7.2....
100% of the shares are rejected.
Ideas?
Stratum Set Up:
./mining_proxy.py -o ltc.ghash.io -p 3333 -cu myname.1 -cp x -sh 127.0.0.1 -sp 3333 -oh 127.0.0.1 -gp 8334 -nm -rt -st
Mining Side:
sudo ./cgminer -o 127.0.0.1:8334 -u myname.1 -p x --gridseed-options=baud=115200,freq=850,chips=5
Difficulty ti properly adjusted at the pool and can me mined without the proxy.
/fasbit
###EDIT - does "-rt" allow a difficulty setting?
|
|
|
|
DrHaribo
Legendary
Offline
Activity: 2730
Merit: 1034
Needs more jiggawatts
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 03, 2014, 10:02:10 PM |
|
Any documentation for these Stratum protocol extensions?
client.reconnect client.add_peers client.show_message mining.get_hashrate mining.get_temperature
Are there any other interesting extensions in use?
|
|
|
|
-ck
Legendary
Offline
Activity: 4200
Merit: 1644
Ruu \o/
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 03, 2014, 10:30:29 PM |
|
Any documentation for these Stratum protocol extensions?
client.reconnect client.add_peers client.show_message mining.get_hashrate mining.get_temperature
Are there any other interesting extensions in use?
Reconnect and message are implemented, but I'm pretty sure the others aren't implemented anywhere on either pool or miner side. As for documentation, yes it's a shame we never got a full document out somewhere and the links from slush's pool are now broken amplifying the problem. That means this thread is the closest we'll come to official documentation ![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif) unless someone goes through and collates it all into a nice document. That's why I pinned this thread.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Luke-Jr
Legendary
Offline
Activity: 2576
Merit: 1186
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 03, 2014, 11:37:13 PM |
|
Anyone up for writing a BIP draft? Slush finally had numbers assigned a while ago, but apparently he's been too busy to actually write the specs...
|
|
|
|
|
novanoob
Newbie
Offline
Activity: 43
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 17, 2014, 08:26:46 AM |
|
I am trying to connect asicminer BE cubes by miner_proxy with p2pool by stratum. Firstly, I am solved issue for geting job form p2pool to proxy by stratum, with patching protocol.py in stratum, by adding MAX_LENGTH = 16384000. Now job received by proxy, but cubes can not get works by getwork. C:\Python27\python.exe C:\stratum-mining-proxy-master\mining_proxy.py -gp 1234 -o 192.168.1.2 -p 9332 ecdsa package not installed. Signing of messages not available. 2014-04-17 11:19:33,654 INFO proxy jobs.<module> # C extension for midstate not available. Using default implementation instead. 2014-04-17 11:19:33,661 ERROR proxy mining_proxy.main # Stratum host/port autodetection failed Traceback (most recent call last): File "C:\stratum-mining-proxy-master\mining_proxy.py", line 182, in main new_host = (yield utils.detect_stratum(args.host, args.port)) File "C:\Users\Ed\AppData\Roaming\Python\Python27\site-packages\twisted\internet\defer.py", line 1039, in _inlineCallbacks result = g.send(result) File "C:\stratum-mining-proxy-master\mining_libs\utils.py", line 69, in detect_stratum header = f.response_headers.get('x-stratum', None)[0] TypeError: 'NoneType' object has no attribute '__getitem__' 2014-04-17 11:19:33,667 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.6 2014-04-17 11:19:33,673 WARNING proxy mining_proxy.test_update # Checking for updates... 2014-04-17 11:19:34,398 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at 192.168.1.2:9332 2014-04-17 11:19:34,401 INFO stats stats.print_stats # 1 peers connected, state changed 1 times 2014-04-17 11:19:34,403 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at 192.168.1.2:9332 2014-04-17 11:19:34,403 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs 2014-04-17 11:19:34,407 WARNING proxy mining_proxy.main # ----------------------------------------------------------------------- 2014-04-17 11:19:34,408 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 1234 (getwork) 2014-04-17 11:19:34,410 WARNING proxy mining_proxy.main # ----------------------------------------------------------------------- 2014-04-17 11:19:34,410 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:34,411 INFO proxy client_service.handle_event # New job 218120647496641940954239730939632275078 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:34,545 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:34,548 INFO proxy client_service.handle_event # New job 233046745934337131359805487615947343187 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:34,555 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:34,558 INFO proxy client_service.handle_event # New job 284941301167202598133416390532168241875 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:34,573 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:34,576 INFO proxy client_service.handle_event # New job 52839956628851028754347912368349498747 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:34,582 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:34,585 INFO proxy client_service.handle_event # New job 277582709765589873348201656238505047486 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:39,424 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:39,427 INFO proxy client_service.handle_event # New job 322025871892336027966607250075456363594 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:39,444 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:39,447 INFO proxy client_service.handle_event # New job 43771082499366205961820283141945869025 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:39,453 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:39,454 INFO proxy client_service.handle_event # New job 30759498972173187666825674470747965721 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:39,486 INFO proxy client_service.handle_event # Setting new difficulty: 41.8985580334 2014-04-17 11:19:39,487 INFO proxy client_service.handle_event # New job 174567020690227360933972996388366795346 for prevhash 6a692fa7, clean_jobs=True 2014-04-17 11:19:40,905 INFO proxy mining_proxy.on_shutdown # Shutting down proxy... 2014-04-17 11:19:40,907 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at 192.168.1.2:9332 2014-04-17 11:19:40,910 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
If I run miner_proxy.py by default, it work normally.
|
|
|
|
blackvoice
Newbie
Offline
Activity: 56
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 21, 2014, 08:30:15 AM |
|
ckolivas, since you made cgminer, I am sure you will know to answer this question about stratum protocol; is it possible to turn stratum client into a pool, so that incoming stratum work is further divided into work for other clients. I am building a proxy that sits between pool and multiple instances of cgminer, so that the pool "thinks" it is in fact only one miner running. I know there is existing implementation that does stratum->getwork, but why should I go that heavy load path. I need to develop something light and fast, doing it in C and every cycle is important.
I think the answer maybe "yes" ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
mrflibblehat
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 350
Merit: 250
★YoBit.Net★ 350+ Coins Exchange & Dice
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2014, 10:32:43 AM |
|
My cousin is behind a firewall (sky) and cant open port 3333 due to his sky router not working correctly however he does know some ports that are open and we have tried one of these. However we are having some issues with it. Every share he submits get rejected with the below. when we tried a closed port we got nothing so the work is deffo getting through. I can see the shares on the proxy, but just dud shares, does anyone have any idea? 2014-05-06 11:13:53,167 INFO proxy stratum_listener.submit # [120ms] Share from 'catinahat.1' REJECTED: (-2, u"Job 'b59d' not found", None) he is using sgminer because he gets the best hashrate out of it. Is stratum proxy just too old now?
|
|
|
|
|
|
robmob
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 27, 2014, 07:37:05 PM |
|
Can someone help me I am having a hard time getting my cubes to connnect to stratum and mine ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Foi58.tinypic.com%2Fvy2irq.jpg&t=665&c=1cUSAx0tHcDK9w) This is my settings for the cube miner I have a batch file that opens the stratum proxy using this code cd C:\Program Files (x86)\Proxy mining_proxy.exe -o us1.ghash.io -p 3333 and I am getting these errors 2014-05-27 16:36:33,032 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.102 2014-05-27 16:36:33,033 INFO stats stats.print_stats # 5 peers connected, state changed 1 times 2014-05-27 16:36:33,033 INFO stats stats.print_stats # 6 peers connected, state changed 1 times 2014-05-27 16:36:33,039 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.103 2014-05-27 16:36:33,040 INFO stats stats.print_stats # 5 peers connected, state changed 1 times 2014-05-27 16:36:33,042 INFO stats stats.print_stats # 6 peers connected, state changed 1 times 2014-05-27 16:36:33,042 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.102
|
Donate BTC:15YMgV1nb97bpRqBT7CEf6ryo37gqeeRpL
|
|
|
AbiTxGroup
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 09, 2014, 12:33:17 AM |
|
Can someone help me I am having a hard time getting my cubes to connnect to stratum and mine http://oi58.tinypic.com/vy2irq.jpgThis is my settings for the cube miner I have a batch file that opens the stratum proxy using this code cd C:\Program Files (x86)\Proxy mining_proxy.exe -o us1.ghash.io -p 3333 and I am getting these errors 2014-05-27 16:36:33,032 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.102 2014-05-27 16:36:33,033 INFO stats stats.print_stats # 5 peers connected, state changed 1 times 2014-05-27 16:36:33,033 INFO stats stats.print_stats # 6 peers connected, state changed 1 times 2014-05-27 16:36:33,039 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.103 2014-05-27 16:36:33,040 INFO stats stats.print_stats # 5 peers connected, state changed 1 times 2014-05-27 16:36:33,042 INFO stats stats.print_stats # 6 peers connected, state changed 1 times 2014-05-27 16:36:33,042 WARNING protocol protocol.dataReceived # Failed message: Cannot decode message 'POST / HTTP/1.1' from 192.168.2.102 Don't know if you have solved this by now, but here is my two-cents of info. It's been a while since I messed with one of these, but I think the problem is that you need to specify a getworks port on the proxy for the cubes to connect correctly. They are "getwork-based" miners. Use: mining_proxy.exe -o us1.ghash.io -p 3333 -gp 8332 Then in the cube configuration, set "Pool ports" to 8332,8332 instead of the 3333,3333 that you are currently using. Then select the "Update/Restart" tab to save and restart the cube. Once that is tested and the cube is working, I would add a few more arguments that will help your cube work better. Try this: mining_proxy.exe -nm -q -rt -o us1.ghash.io -p 3333 -gp 8332 These arguments are: -nm, --no-midstate Don't compute midstate for getwork. This has outstanding performance boost with the blades/cubes. -q, --quiet Make output more quiet -rt, --real-target Propagate >diff1 target to getwork miners. Some miners work incorrectly with higher difficulty.
|
|
|
|
infernoman
Legendary
Offline
Activity: 964
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 28, 2014, 09:02:01 PM |
|
i am looking for some help with p2pool and the stratum server. i am having problems getting the latency to stay lower. i have a very good internet connection so i dont see why that would hurt it at all. 250 mbps down 15 up. the stratum proxy p2pool and bitcoind are all on the same computer. i7 6 core intel overclocked watercooled and 32gb of ram. so there should also be no problem with the cpu load or ram load. all of the ports that needed to be forwarded are. and i am still having no luck. after an hour or a few hours. the stratum proxy seems to lag like crazy to bitcoind
|
|
|
|
infernoman
Legendary
Offline
Activity: 964
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 09, 2014, 02:35:58 AM |
|
i also cannot seem to get the proxy to connect directly to my wallet so that i am able to solo mine. and i am having alot of problems with the p2pool still so i would like to try mining directly to the wallet.
|
|
|
|
ScriptProdigy
Newbie
Offline
Activity: 37
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 30, 2014, 01:20:24 AM |
|
Few questions as I'm doing some heavy work with a custom stratum pool.
First off, is mining.set_extranonce being officially supported? If so, is cgminer going to be officially implementing this? I know bfgminer does currently support it.
|
|
|
|
Luke-Jr
Legendary
Offline
Activity: 2576
Merit: 1186
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 30, 2014, 01:25:13 AM |
|
Few questions as I'm doing some heavy work with a custom stratum pool.
First off, is mining.set_extranonce being officially supported? If so, is cgminer going to be officially implementing this? I know bfgminer does currently support it.
cgminer doesn't support most things, just the minimum necessity for specific use cases. Generally, you shouldn't need mining.set_extranonce, though.
|
|
|
|
ScriptProdigy
Newbie
Offline
Activity: 37
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 30, 2014, 01:44:56 AM |
|
Few questions as I'm doing some heavy work with a custom stratum pool.
First off, is mining.set_extranonce being officially supported? If so, is cgminer going to be officially implementing this? I know bfgminer does currently support it.
cgminer doesn't support most things, just the minimum necessity for specific use cases. Generally, you shouldn't need mining.set_extranonce, though. I do, however, require support for set_extranonce. I'll do my own build of cgminer then. Just a pain to get users to use it rather than what they already have. Thanks for the reply.
|
|
|
|
Luke-Jr
Legendary
Offline
Activity: 2576
Merit: 1186
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 30, 2014, 02:30:05 AM |
|
Few questions as I'm doing some heavy work with a custom stratum pool.
First off, is mining.set_extranonce being officially supported? If so, is cgminer going to be officially implementing this? I know bfgminer does currently support it.
cgminer doesn't support most things, just the minimum necessity for specific use cases. Generally, you shouldn't need mining.set_extranonce, though. I do, however, require support for set_extranonce. I'll do my own build of cgminer then. Just a pain to get users to use it rather than what they already have. Thanks for the reply. Could just tell them to upgrade to BFGMiner...
|
|
|
|
ScriptProdigy
Newbie
Offline
Activity: 37
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 30, 2014, 02:38:57 AM |
|
Few questions as I'm doing some heavy work with a custom stratum pool.
First off, is mining.set_extranonce being officially supported? If so, is cgminer going to be officially implementing this? I know bfgminer does currently support it.
cgminer doesn't support most things, just the minimum necessity for specific use cases. Generally, you shouldn't need mining.set_extranonce, though. I do, however, require support for set_extranonce. I'll do my own build of cgminer then. Just a pain to get users to use it rather than what they already have. Thanks for the reply. Could just tell them to upgrade to BFGMiner... Likely will, do you plan on supporting the new titans and vaultbreakers? Not sure how mining software goes about supporting new hardware. I will need support for very high mhs scrypt machines as soon as they ship.
|
|
|
|
|