Bitcoin Forum
January 20, 2018, 01:19:14 PM *
News: Electrum users must upgrade to 3.0.5 if they haven't already. More info.
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 [3]  All
  Print  
Author Topic: Stratum protocol discussion  (Read 8226 times)
Realpra
Hero Member
*****
Offline Offline

Activity: 819


View Profile
September 18, 2015, 03:47:54 AM
 #41

I had found this great Stratum wiki here:
http://electrum.orain.org/wiki/Stratum_protocol_specification

Now when I go to that link it redirects me to the pornhub web site I kid you not - what gives? Sabotage?

For all the talk of documentation in posts / anywhere I'm having trouble finding out how this works and the expected syntax for commands.
Can anyone help with this problem for instance:
http://bitcoin.stackexchange.com/questions/40556/how-do-i-get-merkle-branches-using-the-stratum-protocol

Cheap and sexy Bitcoin card/hardware wallet, buy here:
http://BlochsTech.com
1516454354
Hero Member
*
Offline Offline

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

1516454354
Report to moderator
1516454354
Hero Member
*
Offline Offline

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

1516454354
Report to moderator
1516454354
Hero Member
*
Offline Offline

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

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

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

1516454354
Report to moderator
1516454354
Hero Member
*
Offline Offline

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

1516454354
Report to moderator
1516454354
Hero Member
*
Offline Offline

Posts: 1516454354

View Profile Personal Message (Offline)

Ignore
1516454354
Reply with quote  #2

1516454354
Report to moderator
kano
Legendary
*
Offline Offline

Activity: 2338


Linux since 1997 RedHat 4


View Profile
September 18, 2015, 04:37:40 AM
 #42

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

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
Luke-Jr
Legendary
*
Offline Offline

Activity: 2310



View Profile
September 18, 2015, 04:53:06 AM
 #43

https://en.bitcoin.it/wiki/Stratum_mining_protocol

kano
Legendary
*
Offline Offline

Activity: 2338


Linux since 1997 RedHat 4


View Profile
September 18, 2015, 05:39:20 AM
 #44

Unfortunately there's not much point taking notice of that.
Luke-Jr wont allow corrections to his mistakes there.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
bernardk
Newbie
*
Offline Offline

Activity: 19


View Profile WWW
December 16, 2015, 11:07:54 AM
 #45

I have a question about the mining.set_difficult method.

In the example here https://mining.bitcoin.cz/help/#!/manual/stratum-protocol

the first time the parameter here is a string (I would say it's the target), but the second time its a number.
Is it supposed to be a string only if it's a result to mining.subscribe or should the client handle both?

Another question is about the result to mining.subscribe. Can the result have an arbitrary number of [method, params] pairs or am I missing it completely?

Stellar Forum | https://galactictalk.org
Luke-Jr
Legendary
*
Offline Offline

Activity: 2310



View Profile
December 16, 2015, 11:31:46 AM
 #46

I have a question about the mining.set_difficult method.

In the example here https://mining.bitcoin.cz/help/#!/manual/stratum-protocol

the first time the parameter here is a string (I would say it's the target), but the second time its a number.
Is it supposed to be a string only if it's a result to mining.subscribe or should the client handle both?
The first one is only in mining.subscribe, and is a subscription id - just ignore it.
Target is not supported by anything for mining.set_difficulty, as far as I know.

Another question is about the result to mining.subscribe. Can the result have an arbitrary number of [method, params] pairs or am I missing it completely?
Yes, an arbitrary number is possible.

Have you read https://en.bitcoin.it/wiki/Stratum_mining_protocol ?

bernardk
Newbie
*
Offline Offline

Activity: 19


View Profile WWW
December 16, 2015, 12:58:25 PM
 #47

Yes, I had a look at the wiki.

The first one is only in mining.subscribe, and is a subscription id - just ignore it.
Target is not supported by anything for mining.set_difficulty, as far as I know.

Why do we send mining.set_difficulty in this case? Only to show the client we support this method?

I saw other examples that don't do it, only send back mining.notify. I guess the mining.notify subscription id is useful to resume the connection if it drops (I can't find now the method used by the client to do so, but I'm sure I saw it once).

And I can't think of any use case of the mining.set_difficulty subscription id. What was the original idea behind it?

In this case the default difficulty is 1 until the server sets a higher one, right?

In the end wouldn't it make much more sense to set the difficulty per worker if we already support multiple workers per connection?

Stellar Forum | https://galactictalk.org
Luke-Jr
Legendary
*
Offline Offline

Activity: 2310



View Profile
December 16, 2015, 01:21:23 PM
 #48

Why do we send mining.set_difficulty in this case? Only to show the client we support this method?
Right.

And I can't think of any use case of the mining.set_difficulty subscription id. What was the original idea behind it?
Basically every subscription would get an id so you could unsubscribe from them.

In this case the default difficulty is 1 until the server sets a higher one, right?
Right. And the changes only take effect for notifys after it.

In the end wouldn't it make much more sense to set the difficulty per worker if we already support multiple workers per connection?
Yes, the stratum mining protocol is quite poorly designed.

kano
Legendary
*
Offline Offline

Activity: 2338


Linux since 1997 RedHat 4


View Profile
December 16, 2015, 07:26:38 PM
 #49

Stratum is fine except for 2 things.

1) difficulty isn't associated with work
Solution that resolved this: difficulty affects the next work item

2) the initial connection is convoluted for the miner
Cause of this problem: Getwork and GBT
Solution: well no one has done it, but it would be best to just ignore getwork and GBT connections and throw them away
cgminer already ignores getwork connections

Edit: also read the stratum definition in this thread: https://bitcointalk.org/index.php?topic=557866.0 (also linked in my sig)
The wiki version includes the no so-nice hash hack that is a major security issue for miners

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
macbook-air
Sr. Member
****
Offline Offline

Activity: 324


View Profile WWW
December 16, 2015, 07:34:58 PM
 #50

Stratum is fine except for 2 things.

1) difficulty isn't associated with work
Solution that resolved this: difficulty affects the next work item

2) the initial connection is convoluted for the miner
Cause of this problem: Getwork and GBT
Solution: well no one has done it, but it would be best to just ignore getwork and GBT connections and throw them away
cgminer already ignores getwork connections

Stratum uses too much bandwidth. I would like to see a zeroconf mining protocol which could deliver new job notifications to every miner in a big farm (same network) with only one packet from the pool server.

kano
Legendary
*
Offline Offline

Activity: 2338


Linux since 1997 RedHat 4


View Profile
December 16, 2015, 08:37:20 PM
 #51

That would be the job of a proxy, but not ideal for a pool.
So yes it could be an addition to the stratum protocol, but would not be ideal for a pool to use it.

The basis of course would be to remove the variable information from the work notification and keep that extra state information in both the work source (proxy) and the miner.

So I'd guess it would be best implemented under a new name ... whatever, whoever Smiley

e.g. as a suggestion Smiley
mining.zerostate to define the state information for all following: mining.zeronotify to send work without the state information
You'd have to watch out, again, to avoid the 'difficulty' issue that would also have the same issue with 'state'
(that is resolved by defining what 'difficulty' and 'state' applies to rather than having it part of the notify)

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
Luke-Jr
Legendary
*
Offline Offline

Activity: 2310



View Profile
December 17, 2015, 01:37:49 AM
 #52

The wiki version includes the no so-nice hash hack that is a major security issue for miners
What are you talking about here?

bitsolutions
Sr. Member
****
Offline Offline

Activity: 248



View Profile
December 19, 2015, 01:36:29 PM
 #53

The wiki version includes the no so-nice hash hack that is a major security issue for miners
What are you talking about here?
Pretty sure he's talking about the mining.extranonce.subscribe extension.
loshia
Legendary
*
Offline Offline

Activity: 1610


View Profile
December 19, 2015, 03:15:30 PM
 #54

Stratum is fine except for 2 things.

1) difficulty isn't associated with work
Solution that resolved this: difficulty affects the next work item

2) the initial connection is convoluted for the miner
Cause of this problem: Getwork and GBT
Solution: well no one has done it, but it would be best to just ignore getwork and GBT connections and throw them away
cgminer already ignores getwork connections

Stratum uses too much bandwidth. I would like to see a zeroconf mining protocol which could deliver new job notifications to every miner in a big farm (same network) with only one packet from the pool server.
Come on same network big farm even 5 usd China switch can handle that. I am  sure that you have even cheaper ones laying arround Grin You do not need Cisco for this job. Your goal is to force other people do work for you so you can save a bug from hosting expnses right Grin I like your style though Grin
Some thorny from l2 networking if that is what you REALY want ...please note you will still gona need 5 usd switches here and there in the big farm

In general what you need is multicast and some strtum miner hacks Grin
As a big pool op it will be a peace of cake for you to make first two. But for the third one you need to have the sources of your crappy CHINESE borders miners fork. And as we all know it is a top secret STOLLEN FROM COMMUNITY and it is CLOSED. And you will have to pay a lot of money to your brothers to get ti;D Grin. What a irony dude Cheesy

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
Luke-Jr
Legendary
*
Offline Offline

Activity: 2310



View Profile
December 19, 2015, 05:11:48 PM
 #55

The wiki version includes the no so-nice hash hack that is a major security issue for miners
What are you talking about here?
Pretty sure he's talking about the mining.extranonce.subscribe extension.
I meant in terms of security issue. mining.extranonce.subscribe is not in itself one, at least in theory.

wetblanket
Jr. Member
*
Offline Offline

Activity: 42


View Profile
January 19, 2018, 08:04:39 AM
 #56

My original post was here (because I didn't want to resurrect an old thread necessarily, I see now I was wrong): https://bitcointalk.org/index.php?topic=2768236.0

My main question at the moment is around the various transports mentioned:

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.
kano
Legendary
*
Offline Offline

Activity: 2338


Linux since 1997 RedHat 4


View Profile
January 19, 2018, 08:56:13 AM
 #57

It's all just Socket.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
Pages: « 1 2 [3]  All
  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!