Author

Topic: Help with stratum protocol/transport questions (Read 328 times)

sr. member
Activity: 351
Merit: 410
January 18, 2018, 04:01:46 PM
#4
-ck has collected all relevant documentation about the stratum protocol here.

Discussion about the stratum protocol goes here.

This thread is therefore locked.
jr. member
Activity: 95
Merit: 2
The original spec, pretty clearly dislikes the whole HTTP / long poll approach, and I agree, I barely considered anything other than a plain socket (with cJSON to handle the data), it's way simpler than anything else and does *almost* everything needed... only potential extra feature needed, is SSL...  So I think a proxy just supporting TCP sockets would do for most miners.

I think you ought to be able to do SSL with just the plain TCP socket - it's just a 'modification' to the socket transport layer. I'm pretty sure that miners that support SSL are doing it this way. Remember, HTTPS != SSL; HTTPS == HTTP on top of SSL-enabled sockets.  I suppose the proper term these days is TLS though...

I've looked through a couple of the open source Monero miners today, and everything I've checked just uses plain TCP sockets.

I'm using Claymore for Ethereum and that's stratum+tcp also.

That is interesting to note! Thanks for your reply.

So anecdotally speaking from the evidence presented by 1 response, I can safely say that TCP and SSL+TCP socket streams are all that's needed!  Wink  Would love further feedback as well.
newbie
Activity: 6
Merit: 0
Currently having problems with stratum from the opposite side, while building my own mining software.  I've spent the last couple of days, trying to simply submit a result to a stratum pool...

The original spec, pretty clearly dislikes the whole HTTP / long poll approach, and I agree, I barely considered anything other than a plain socket (with cJSON to handle the data), it's way simpler than anything else and does *almost* everything needed... only potential extra feature needed, is SSL...  So I think a proxy just supporting TCP sockets would do for most miners.

I've looked through a couple of the open source Monero miners today, and everything I've checked just uses plain TCP sockets.

I'm using Claymore for Ethereum and that's stratum+tcp also.

Thx Monerofox
jr. member
Activity: 95
Merit: 2
As an exercise, I'm toying with building a stratum proxy. I know they already exist, but I'm looking to experiment with some more recent tech and this seems like a good project.

This BCT thread is a good starting point for the stratum protocol. Along with the 'canonical' stratum protocol google doc and slushpool's stratum overview, there's a fair bit to digest. Definitely not a true spec, but enough to work with.

The 'spec' defines 4 transports: Socket transport, Websocket, HTTP Poll, and HTTP Push (which is a variation of HTTP Poll). I get the feeling that much has changed since stratum was first introduced, so I'm wondering if all 4 protocols are still needed/used - is it necessary to implement them all in a proxy? What about if one was implementing a pool? For example, if miners have moved towards supporting plain TCP Socket transport only, there's no point in implementing the other 3 transports.

 - Let me know if there's a better forum board for this post - I'll move it if needed.
Jump to: