Bitcoin Forum
March 19, 2024, 05:40:32 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with stratum protocol/transport questions  (Read 299 times)
wetblanket (OP)
Jr. Member
*
Offline Offline

Activity: 95
Merit: 2


View Profile
January 16, 2018, 10:13:51 PM
 #1

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.

Improve mining pool share/hash rates with the aiostratum-proxy (https://bitcointalk.org/index.php?topic=3179895) stratum mining proxy.
1710826832
Hero Member
*
Offline Offline

Posts: 1710826832

View Profile Personal Message (Offline)

Ignore
1710826832
Reply with quote  #2

1710826832
Report to moderator
1710826832
Hero Member
*
Offline Offline

Posts: 1710826832

View Profile Personal Message (Offline)

Ignore
1710826832
Reply with quote  #2

1710826832
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
monerofox2
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
January 16, 2018, 11:09:57 PM
 #2

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
wetblanket (OP)
Jr. Member
*
Offline Offline

Activity: 95
Merit: 2


View Profile
January 17, 2018, 12:43:04 AM
 #3

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.

Improve mining pool share/hash rates with the aiostratum-proxy (https://bitcointalk.org/index.php?topic=3179895) stratum mining proxy.
Pages: [1]
  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!