Pages:
Author

Topic: [ANN] Stratum mining protocol - ASIC ready - page 8. (Read 146153 times)

legendary
Activity: 2688
Merit: 1240
Sure...

Its running and accepting some shares, but then fails .. cgminer 2.11.0 disconnects, reconnects again, submits some shares, then again disconnects .. everytime with the same error message in debug log of stratum
sr. member
Activity: 294
Merit: 250
I assume you've installed simplejson...?
legendary
Activity: 2688
Merit: 1240
  File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 185, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 216, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
ProtocolException: Cannot decode message '{"params": ["ocminer.gad01", "@ä^Q^C", "p^\Ì^B", "<80>sþ^B", "163a1000"], "id": 1221, "method": "mining.submit"}'
2013-04-02 18:19:35,292 ERROR protocol protocol.process_failure # [Failure instance: Traceback: : subscribe() takes exactly 1 argument (2 given)
/usr/local/lib/python2.7/dist-packages/stratum/protocol.py:185:dataReceived
/usr/local/lib/python2.7/dist-packages/stratum/protocol.py:230:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum/services.py:13:_handle_event
/usr/local/lib/python2.7/dist-packages/stratum/services.py:81:call
--- ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/usr/local/lib/python2.7/dist-packages/stratum/services.py:78:_run
]
None
2013-04-02 18:19:35,516 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 185, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 216, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
ProtocolException: Cannot decode message '{"params": ["ocminer.gad01", "àë^K^C", "0ÛÌ^B", "°<93>Ý^B", "f3e51200"], "id": 1232, "method": "mining.submit"}'
2013-04-02 18:19:35,552 ERROR protocol protocol.process_failure # [Failure instance: Traceback: : subscribe() takes exactly 1 argument (2 given)
/usr/local/lib/python2.7/dist-packages/stratum/protocol.py:185:dataReceived
/usr/local/lib/python2.7/dist-packages/stratum/protocol.py:230:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum/services.py:13:_handle_event
/usr/local/lib/python2.7/dist-packages/stratum/services.py:81:call
--- ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/usr/local/lib/python2.7/dist-packages/stratum/services.py:78:_run


Anyone can point me to the direction where the error is ?
sr. member
Activity: 294
Merit: 250
Ok, we have it working, we know how to adjust share diffiiculty, it's all good...

We will be uploading our fork with new documentation for the community later..
sr. member
Activity: 294
Merit: 250
Ok, so we actually managed to get it working with litecoind without copying over the getblocktemplate from bitcoind, but when connecting with cgminer we are getting:

"Rejected: Share Difficulty Above Target"

So we are one step closer...

I assume we need to edit:

Code:
def diff_to_target(self, difficulty):
        '''Converts difficulty to target'''
        diff1 = 0x00000000ffff0000000000000000000000000000000000000000000000000000
        return diff1 / difficulty

But not sure what to edit it to in order to convert to litecoin difficulty... Any help is greatly appreciated...
sr. member
Activity: 294
Merit: 250
Confirmed working with bitcoind... Apparently (info thanks to nicksasa) I need to copy the latest getblocktemplate function from bitcoin over to litecoin...

Will be trying this and will report back whether it's working or not...
legendary
Activity: 1078
Merit: 1005
It should ideally be: Miner->Stratum server->Litecoind directly and bypass pushpool entirely

But you could put the proxy between the miner and the stratum server if they're using a miner that only does getwork. You'll likely have to write code for the stratum server to update your pools backend database with share information,etc (I haven't looked at the python server code).

If your Java is better that your Python you might find fireduck's SockThing easier to get going.
sr. member
Activity: 294
Merit: 250
Am I understanding the workflow correctly:

Miner connects to stratum-proxy, then stratum-proxy relays to stratum-mining server, which should then connect to pushpool then pushpool connects to litecoind/bitcoind

Or should it be Miner->Stratum Proxy->Stratum server->Litecoind directly and bypass pushpool entirely...?

We have tried both, I'd just like clarification on which is the more correct method...

Thanks!
sr. member
Activity: 294
Merit: 250
Btw does litecoind support the getblocktemplate call?

I have tested the rpc calls on bitcoin_rpc.py with litecoind and they all work, including getblocktemplate
sr. member
Activity: 294
Merit: 250
Ok, testing with bitcoind seems to hang in the same spot, does the blockchain need to be fully downloaded in order to be able to connect to bitcoind...?

Here is our config file for stratum-mining (sensitive info removed):

http://pastebin.com/ucCd2GbF


-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
litecoind is stuck in a timewarp where people are apparently developing on it, but in actual fact the code has not changed for a very long time with no real sign of progress. As I've said in the alt currency forum threads, I see no real sign of development or even trying to stay in sync with the bitcoind code base.
sr. member
Activity: 294
Merit: 250
Ridiculous...

You just met the bitcoin business ;-).

I have almost no interest in litecoin, but if I'll see how to help you and get it running, I'll do it. The first step is to check that you didn't do any stupid mistake in configuration, by running Stratum pool against stock bitcoind 0.8.0 (preferably). If it will work and if it won't work with litecoind, there must be something different in the RPC.

Btw does litecoind support the getblocktemplate call?

it is to my understanding that litecoind uses getblocktemplate version "1"...

Testing with bitcoind now...
legendary
Activity: 1386
Merit: 1097
Ridiculous...

You just met the bitcoin business ;-).

I have almost no interest in litecoin, but if I'll see how to help you and get it running, I'll do it. The first step is to check that you didn't do any stupid mistake in configuration, by running Stratum pool against stock bitcoind 0.8.0 (preferably). If it will work and if it won't work with litecoind, there must be something different in the RPC.

Btw does litecoind support the getblocktemplate call?
sr. member
Activity: 294
Merit: 250
And when we get this figured out we will fork the litecoin version for the community instead of hiding it like everyone else seems to be doing.

I even had one pool operator tell me:

"Sorry I can't because its not my code and I promised I wouldn't say who's it is or how to do it. I'm not trying to hide it from you and if I could I would give it to you"

and:

"im not trying to hold out on u its just i had to pull massive favors to get help on this code. I cant go breaking trust and ruining my rep.

ill see what i can do no promises tho."

Ridiculous...
legendary
Activity: 1386
Merit: 1097
I have edited all the necessary "BITCOIN_TRUSTED_BLAH-BLAH-BLAH:" that is not the issue. if I didn't know how to connect to my litecoin daemon then pushpool would not be working...

I have no experience with litecoin, so I cannot give any real advice here. I would try to run it with bitcoind instead, to see if there isn't some incompatibility on litecoind side.

Communication between the stratum pool and bitcoind should be seamless, filling BITCOIN_TRUSTED_BLAHBLAH should be enough in normal case...
sr. member
Activity: 294
Merit: 250
Then write it yourself. I'm not providing "clone & run" mining pool, this is supposed to be just a demo of Stratum mining protocol. I'm not using this code myself, I made some heavy changes in that during last half a year.

We have the pool code, that was my point, lol... The description makes it seem like you are offering a demo pool with stratum mining support included which is why I wasn't downlaoding it because we already have the pool software, our pool is up and running...

What I need now is the information on where in the code I need to make changes so that stratum can work with litecoind instead of bitcoind...

Quote
Feel free to write it, I'll merge your pull request.

I would be more than happy to, but first I need to be clear on what is needed for what, which I still am not... Understand, I'm not trying to trash-talk the work you have put in, I'm not trying to say you are putting out a bad product, I'm saying the documentation is sparse and confusing...

Quote
No, really. I wrote pool server for myself. I obviously don't need full documentation for my own code. Then I decided to opensource it. And you're asking for full support to product where support was never promised. If you see that the project is lacking documentation, please contribute. It's opensource.

I'm not asking for support... I am asking for help... You made a product and released it to the community, we wqant to use this product to provide better service for the community at our pool to also benefit the community at large, I need help trying to implement it for my use and I have no one to ask for help besides you because you are the one who wrote this implementation so i would assume you to be the guy to ask for help in this situation... I'm not asking you to re-write the whole back-end for me, just tell me where in the code to find that which needs editing... I have been nothing but polite to you, thanked you for writing the Stratum protocol and thanked you for taking a look and trying to help, I really don't understand why you are being a dick about this...

Quote
It *is* useful output. The pool server is obviously waiting to bitcoin_rpc, which means it cannot connect to bitcoind/litecoind/whatever for some reason. There're some config directives about bitcoin rpc connection, so you probably didn't set it correctly.

I have edited all the necessary "BITCOIN_TRUSTED_BLAH-BLAH-BLAH:" that is not the issue. if I didn't know how to connect to my litecoin daemon then pushpool would not be working...

Quote
Read the code. You probably won't hack the code for litecoin until you understand how it works.

I've been doing nothing but reading the code, I've spent nearly 48 hours doing nothing but reading through this code but as I have mentioned in the stratum IRC channel we are php/css/html/JS developers with minimal experience in Python, which is why we are asking for help.

I love that all these other people throughout this thread you are willing to take time and look at logs and offer help but when I ask for help your basic response is:

"Figure it out for yourself"

Thanks...
legendary
Activity: 1386
Merit: 1097
then on github the repository says to download from gitorious (in README) and on github there's Stratum repository

Oh, I fixed this. It was really deprecated information Wink.

Quote
(which SAYS it IS the server)

But it IS stratum server ;-). It just don't implement mining service.

Quote
there's stratum-mining repository (which says it is a DEMO implementation of a POOL which is using the stratum server, we already have a pool so when I read that I think, I don't need a DEMO pool implementation, I need the working back-end)

Then write it yourself. I'm not providing "clone & run" mining pool, this is supposed to be just a demo of Stratum mining protocol. I'm not using this code myself, I made some heavy changes in that during last half a year.

Quote
there's stratum mining-proxy which I was being told from other pool owners like serraz I needed to make it work

I have no idea why he desinformed you. It's not supposed to run on server, although it *may* run on server, to provide getwork interface for old miners.

Quote
none of these reps have instructions/README/INSTALL which is clear on what is needed for which purpose...

Feel free to write it, I'll merge your pull request.

No, really. I wrote pool server for myself. I obviously don't need full documentation for my own code. Then I decided to opensource it. And you're asking for full support to product where support was never promised. If you see that the project is lacking documentation, please contribute. It's opensource.

Quote
It's stuck at: waiting for bitcoin_rpc with no useful DEBUG output on the live output or in "stratum.log"

It *is* useful output. The pool server is obviously waiting to bitcoin_rpc, which means it cannot connect to bitcoind/litecoind/whatever for some reason. There're some config directives about bitcoin rpc connection, so you probably didn't set it correctly.

Quote
Any ideas...?

Read the code. You probably won't hack the code for litecoin until you understand how it works.
sr. member
Activity: 294
Merit: 250

I'm fairly certain there needs to be changes made to the back-end code for stratum-mining to make it compatible with litecoind but I gave the litecoind listen port (9333) a try anyway, still no dice...

Thank you for trying though   =)
legendary
Activity: 3920
Merit: 2349
Eadem mutata resurgo
As I mentioned above, you're running wrong code. This is not a pool server, it's just a stratum server. Please use launcher_demo.tac from stratum-mining.

So now, I have completely removed all references to stratum from system, re-cloned: https://github.com/slush0/stratum-mining

I've edited config.py and launched with DEBUG output...

It's stuck at: waiting for bitcoin_rpc with no useful DEBUG output on the live output or in "stratum.log"

I assume that there are some changes which need to be made to the bitcoin_rpc interface to make it compatible with litecoind, but with no useful DEBUG output to give me errors at specific line numbers inside of specific files/scripts I have no idea what to change...

Any ideas...?

most likely port number

Code:
rpcport=9333
maybe?
https://bitcointalksearch.org/topic/ann-litecoin-a-lite-version-of-bitcoin-launched-47417
sr. member
Activity: 294
Merit: 250
As I mentioned above, you're running wrong code. This is not a pool server, it's just a stratum server. Please use launcher_demo.tac from stratum-mining.

Ah, ok... Now I understand... It's confusing because you have a gitorious rep which says the server software is available on github, then on github the repository says to download from gitorious (in README) and on github there's Stratum repository (which SAYS it IS the server), there's stratum-mining repository (which says it is a DEMO implementation of a POOL which is using the stratum server, we already have a pool so when I read that I think, I don't need a DEMO pool implementation, I need the working back-end) and then there's stratum mining-proxy which I was being told from other pool owners like serraz I needed to make it work and none of these reps have instructions/README/INSTALL which is clear on what is needed for which purpose...

So I apologize for my confusion...

So now, I have completely removed all references to stratum from system, re-cloned: https://github.com/slush0/stratum-mining

I've edited config.py and launched with DEBUG output...

It's stuck at: waiting for bitcoin_rpc with no useful DEBUG output on the live output or in "stratum.log"

I assume that there are some changes which need to be made to the bitcoin_rpc interface to make it compatible with litecoind, but with no useful DEBUG output to give me errors at specific line numbers inside of specific files/scripts I have no idea what to change...

Any ideas...?
Pages:
Jump to: