Bitcoin Forum
May 12, 2024, 10:49:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Stratum protocol  (Read 992 times)
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 21, 2014, 10:24:55 AM
 #1

Hi,

I could not find any information about the stratum protocol. I mean, I found this:
http://mining.bitcoin.cz/stratum-mining
and consequently this:
https://docs.google.com/document/d/17zHy1SUlhgtCMbypO8cHgpWH73V5iUQKk_0rWvMqSNs/edit?hl=en_US#

But this is useless, it's way too short. In the latter document, there are mostly topics marked as "TODO".

I want to create a pool using node.js, I know there are sources on github - considering what I want to do I reduced the number of interesting projects to two - one of them doesn't work (it send badly formatted answer to client's "mining.subscribe" message) the other one just doesn't compile (I spent a day trying to, on windows and linux) - besides both are very big, there are actually full pool servers, when I only want communication with a miner.

Please tell me where can find a comprehensive information about the protocol... Is it somewhere here, on this forum maybe? From what I know, the author of the protocol was/is very active on bitcointalk.org

1715554163
Hero Member
*
Offline Offline

Posts: 1715554163

View Profile Personal Message (Offline)

Ignore
1715554163
Reply with quote  #2

1715554163
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715554163
Hero Member
*
Offline Offline

Posts: 1715554163

View Profile Personal Message (Offline)

Ignore
1715554163
Reply with quote  #2

1715554163
Report to moderator
1715554163
Hero Member
*
Offline Offline

Posts: 1715554163

View Profile Personal Message (Offline)

Ignore
1715554163
Reply with quote  #2

1715554163
Report to moderator
1715554163
Hero Member
*
Offline Offline

Posts: 1715554163

View Profile Personal Message (Offline)

Ignore
1715554163
Reply with quote  #2

1715554163
Report to moderator
eleuthria
Legendary
*
Offline Offline

Activity: 1750
Merit: 1007



View Profile
March 21, 2014, 07:58:18 PM
 #2

https://www.btcguild.com/new_protocol.php

This includes a breakdown of all the major components of stratum, with detail on what each parameter means for each method.


Obviously you're not going to get something with a guide showing you how to build a TCP socket server.  But the above page includes all the methods you need to support in order to implement a stratum server, and a description of what each piece is.  It's a purely plain-text TCP system.


EDIT:  Forgot slush copied most of my new_protocol.php page and added it to his stratum page.


From what I know, the author of the protocol was/is very active on bitcointalk.org

Slush doesn't even post on his own pool thread anymore.

RIP BTC Guild, April 2011 - June 2015
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1633


Ruu \o/


View Profile WWW
March 21, 2014, 09:59:19 PM
 #3

Original discussion thread was here:

https://bitcointalk.org/index.php?topic=108533.0

There are some features that were only even documented in that thread buried in the middle.

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

Activity: 4102
Merit: 1633


Ruu \o/


View Profile WWW
March 21, 2014, 10:09:03 PM
 #4

Heck I think the protocol is old enough and poorly documented enough that it's time to create a new protocol fixing what we didn't get right with stratum in the first place...  Roll Eyes Of course no pool op would adopt it since precious few even adopted the whole stratum protocol.

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

Activity: 1750
Merit: 1007



View Profile
March 22, 2014, 01:36:11 AM
 #5

Heck I think the protocol is old enough and poorly documented enough that it's time to create a new protocol fixing what we didn't get right with stratum in the first place...  Roll Eyes Of course no pool op would adopt it since precious few even adopted the whole stratum protocol.

Eh, most of them did adopt stratum (only one I can think of that didn't that still exists is Deepbit...and they hardly qualify as existing anymore).

Stratum was a needed improvement.  Getwork was just too damn inefficient for mining remotely, and ASICs sealed the deal.  I can't imagine the horror of my bandwidth bills (or the bandwidth usage for a large ASIC farm) if we still had to use getwork today.  I've actually been debating the idea of a new mining protocol over UDP, but there isn't really a "need" for it, other than the fun of developing something *slightly* more efficient [though a pain in the ass for people to implement probably since UDP would require more work for error handling/lost packets vs TCP].  Would also allow for some interesting DDoS mitigation systems (anycast + multiple destination servers?).

RIP BTC Guild, April 2011 - June 2015
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1633


Ruu \o/


View Profile WWW
March 22, 2014, 02:51:37 AM
 #6

Actually I didn't say stratum wasn't needed. What I'm referring to is some quirks or limitations with the protocol and the lack of evolution of it. It was developed at the beginning of the asic era and has never been updated.

The things about the protocol that are problematic are :
First of all almost no pool implemented reconnect due to lack of interest since it only benefits miner.
The need for a separate subscribe and auth, and then virtually every pool in existence probably ignores the password which is a hangover from the getwork to local RPC bitcoind days and worthless today.
Separation of work and difficulty was a mistake. Even now new pools get the association wrong and will spew some messages about "old difficulty" when we nutted out a workaround to that limitation in the protocol. It should never have been separate.
Not setting diff on immediate connection. Starting at diff1 in the ASIC era is completely useless.
Not having some meaningful way to track transactions without having to download them all which no pool in their right mind supports due to crazy bandwidth anyway. Heck sending the hashes of the transactions only would be more efficient if you actually did write some code to compare what bitcoind is doing to what the pool is doing.
Ignoring suggested diff.
Other things I can't remember offhand.

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

Activity: 3578
Merit: 1090


Think for yourself


View Profile
March 22, 2014, 04:40:40 PM
 #7

Too bad there wasn't a viable alternative from a more active group of the Bitcoin community.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 24, 2014, 01:44:04 PM
 #8

OK, thank you all, I'll start with reading https://bitcointalk.org/index.php?topic=108533.0 and I hope it will be simpler than analyzing thousands lines of code of open sourced pools.
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 27, 2014, 01:09:49 PM
 #9

Thanks again.

I've read entire topic and I don't quite understand one thing: very often I could read that a miner can "lose their work/shares", for example "Good pools support it (mining.reconnect), so they don't force you to throw away your shares when a disconnect happens"

I thought that as soon as a miner finds a share which is <= difficulty then it immediately sends it to the pool, so how can it "lose" shares?
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!