Bitcoin Forum
June 25, 2018, 06:51:46 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Help with stratum protocol/transport questions  (Read 140 times)
wetblanket
Jr. Member
*
Offline Offline

Activity: 88
Merit: 1


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.
1529909506
Hero Member
*
Offline Offline

Posts: 1529909506

View Profile Personal Message (Offline)

Ignore
1529909506
Reply with quote  #2

1529909506
Report to moderator
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

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

Posts: 1529909506

View Profile Personal Message (Offline)

Ignore
1529909506
Reply with quote  #2

1529909506
Report to moderator
1529909506
Hero Member
*
Offline Offline

Posts: 1529909506

View Profile Personal Message (Offline)

Ignore
1529909506
Reply with quote  #2

1529909506
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: 88
Merit: 1


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
Full Member
*
Offline Offline

Activity: 225
Merit: 262


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!