Bitcoin Forum
November 05, 2024, 10:43:01 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
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 »
  Print  
Author Topic: [ANN] Stratum mining protocol - ASIC ready  (Read 146056 times)
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 07:55:47 AM
 #541

most likely port number

Code:
rpcport=9333
maybe?
https://bitcointalk.org/index.php?topic=47417.0

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   =)
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 28, 2013, 08:34:04 AM
 #542

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.

c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 09:02:47 AM
 #543

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...
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 28, 2013, 09:09:08 AM
 #544

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...

c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 09:13:58 AM
 #545

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...
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
March 28, 2013, 09:31:49 AM
 #546

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?

c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 09:39:55 AM
 #547

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...
-ck
Legendary
*
Offline Offline

Activity: 4284
Merit: 1645


Ruu \o/


View Profile WWW
March 28, 2013, 09:42:29 AM
 #548

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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 10:06:10 AM
 #549

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


c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 11:03:35 AM
 #550

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
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 11:55:27 AM
 #551

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!
doublec
Legendary
*
Offline Offline

Activity: 1078
Merit: 1005


View Profile
March 28, 2013, 12:02:21 PM
 #552

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.
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 02:13:56 PM
 #553

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...
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 04:16:51 PM
 #554

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...
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
March 28, 2013, 04:34:30 PM
 #555

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..
ocminer
Legendary
*
Offline Offline

Activity: 2688
Merit: 1240



View Profile WWW
April 02, 2013, 04:24:44 PM
 #556

  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: <type 'exceptions.TypeError'>: 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
--- <exception caught here> ---
/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: <type 'exceptions.TypeError'>: 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
--- <exception caught here> ---
/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 ?

suprnova pools - reliable mining pools - #suprnova on freenet
https://www.suprnova.cc - FOLLOW us @ Twitter ! twitter.com/SuprnovaPools
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 02, 2013, 04:27:14 PM
 #557

I assume you've installed simplejson...?
ocminer
Legendary
*
Offline Offline

Activity: 2688
Merit: 1240



View Profile WWW
April 02, 2013, 04:35:06 PM
 #558

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

suprnova pools - reliable mining pools - #suprnova on freenet
https://www.suprnova.cc - FOLLOW us @ Twitter ! twitter.com/SuprnovaPools
c4n10
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
April 02, 2013, 04:44:07 PM
 #559

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

Are you launching cgminer with:

Code:
cgminer -o stratum+tcp://poolurl:stratumport
ocminer
Legendary
*
Offline Offline

Activity: 2688
Merit: 1240



View Profile WWW
April 02, 2013, 04:50:15 PM
 #560

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

Are you launching cgminer with:

Code:
cgminer -o stratum+tcp://poolurl:stratumport

Yes, I am :-)

Result:



In the late 90's I would say it looks like error correction is not working and cgminer is sending garbage OR stratum is interpreting binary data as gargabe... I'm not really sure what is going on or what is wrong.. maybe slush has an idea..

suprnova pools - reliable mining pools - #suprnova on freenet
https://www.suprnova.cc - FOLLOW us @ Twitter ! twitter.com/SuprnovaPools
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 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!