Bitcoin Forum
October 23, 2018, 04:26:57 AM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Help with stratum protocol/transport questions  (Read 170 times)
wetblanket
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.
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
1540268817
Hero Member
*
Offline Offline

Posts: 1540268817

View Profile Personal Message (Offline)

Ignore
1540268817
Reply with quote  #2

1540268817
Report to moderator
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
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.
frodocooper
Moderator
Sr. Member
*
Offline Offline

Activity: 276
Merit: 287


View Profile
January 18, 2018, 09: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.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!