How to apply it to my p2pool? I have only p2pool from git and stratum-mining-proxy from git.
basic linux stuff u should know
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
git clone https://github.com/forrestv/stratum.git stratum-forrestv
cd stratum-forrestv
git checkout maxlengthfix
$ python mining_proxy.py -o localhost -p 9332 -gp 5550 -sp 5551
2013-05-26 20:51:22,381 INFO proxy jobs.# Using C extension for midstate speedup. Good!
2013-05-26 20:51:22,398 ERROR proxy mining_proxy.main # Stratum host/port autodetection failed
Traceback (most recent call last):
File "mining_proxy.py", line 178, in main
new_host = (yield utils.detect_stratum(args.host, args.port))
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1070, in _inlineCallbacks
result = g.send(result)
File "/home/pioruns/stratum-mining-proxy/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__'
2013-05-26 20:51:22,401 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.2
2013-05-26 20:51:22,408 WARNING proxy mining_proxy.test_update # Checking for updates...
2013-05-26 20:51:22,709 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at localhost:9332
2013-05-26 20:51:22,711 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:22,712 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:22,712 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 5551 (stratum) AND 5550 (getwork)
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-26 20:51:22,772 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:22,773 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:22,773 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:25,809 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:25,809 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:25,809 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:25,812 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:25,813 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:25,813 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:28,183 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:28,183 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:28,184 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:28,186 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:28,187 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:28,188 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:30,894 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:30,894 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:30,894 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:30,897 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:30,898 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:30,898 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
diff --git a/stratum/protocol.py b/stratum/protocol.py
index 02d9954..f64fce8 100644
--- a/stratum/protocol.py
+++ b/stratum/protocol.py
@@ -36,6 +36,7 @@ class RequestCounter(object):
class Protocol(LineOnlyReceiver):
delimiter = '\n'
+ MAX_LENGTH = 16384000
def _get_id(self):
self.request_id += 1
$ python mining_proxy.py -o localhost -p 9332 -gp 5550 -sp 5551
2013-05-26 20:51:22,381 INFO proxy jobs.# Using C extension for midstate speedup. Good!
2013-05-26 20:51:22,398 ERROR proxy mining_proxy.main # Stratum host/port autodetection failed
Traceback (most recent call last):
File "mining_proxy.py", line 178, in main
new_host = (yield utils.detect_stratum(args.host, args.port))
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1070, in _inlineCallbacks
result = g.send(result)
File "/home/pioruns/stratum-mining-proxy/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__'
2013-05-26 20:51:22,401 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.2
2013-05-26 20:51:22,408 WARNING proxy mining_proxy.test_update # Checking for updates...
2013-05-26 20:51:22,709 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at localhost:9332
2013-05-26 20:51:22,711 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:22,712 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:22,712 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 5551 (stratum) AND 5550 (getwork)
2013-05-26 20:51:22,771 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-26 20:51:22,772 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:22,773 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:22,773 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:25,809 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:25,809 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:25,809 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:25,812 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:25,813 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:25,813 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:28,183 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:28,183 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:28,184 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:28,186 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:28,187 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:28,188 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-05-26 20:51:30,894 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-26 20:51:30,894 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-05-26 20:51:30,894 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-26 20:51:30,897 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-05-26 20:51:30,898 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-05-26 20:51:30,898 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
for service_name in method.split('.')[:-1]:
provider = getattr(provider, 'svc_' + service_name, None)
if provider is None:
raise Error_for_code(-32601)(u'Service not found')
{"id": 1, "method": "mining.subscribe", "params": []}
for service_name in method.split('.')[:-1]:
provider = getattr(provider, 'svc_' + service_name, None)
if provider is None:
raise Error_for_code(-32601)(u'Service not found')
{"id": 1, "method": "mining.subscribe", "params": []}
blockmaxsize=1000000
blockminsize=400000
mintxfee=0.00001
minrelaytxfee=0.00001
{
"blocks" : 238047,
"currentblocksize" : 996888,
"currentblocktx" : 1175,
"difficulty" : 12153411.70977583,
"errors" : "",
"generate" : false,
"genproclimit" : -1,
"hashespersec" : 0,
"pooledtx" : 3059,
"testnet" : false
}
for service_name in method.split('.')[:-1]:
provider = getattr(provider, 'svc_' + service_name, None)
if provider is None:
raise Error_for_code(-32601)(u'Service not found')
blockmaxsize=1000000
blockminsize=400000
mintxfee=0.00001
minrelaytxfee=0.00001
blockmaxsize=250000
blockminsize=0
mintxfee=0.0001
minrelaytxfee=0.0001
{
"blocks" : 237896,
"currentblocksize" : 998727,
"currentblocktx" : 965,
"difficulty" : 12153411.70977583,
"errors" : "",
"generate" : false,
"genproclimit" : -1,
"hashespersec" : 0,
"pooledtx" : 2064,
"testnet" : false
}