Bitcoin Forum
June 25, 2018, 04:59:53 AM
 News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 Home Help Search Donate Login Register
 Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [33] 34 35
 Author Topic: [ANN] Stratum mining protocol - ASIC ready  (Read 144598 times)
kano
Legendary

Offline

Activity: 2492
Merit: 1042

Linux since 1997 RedHat 4

 February 23, 2014, 01:04:45 AM

I do find only old threads, that are not related to stratum mining, like this one: https://bitcointalk.org/index.php?topic=63273.0

All these calculations yield wrong result.

The closest one I came to was when using following formula: H = num_shares * pool_diff * 2^16 / time_in_sec

This is in case pool_diff = 32

A 1 diff share has an expectation of occurring, on average, once every 2^32 hashes.

So it's 2^32 not 2^16

So if you submit S shares at difficulty D over T period of seconds, your calculated hash rate would be:

S * D * 2^32 / T

Which I have called in other threads: Your "Paid GH/s" (if you also divide by 10^9)

Edit: FYI
S * D = DiffA

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!
1529902793
Hero Member

Offline

Posts: 1529902793

Ignore
 1529902793

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

Offline

Posts: 1529902793

Ignore
 1529902793

1529902793
 Report to moderator
1529902793
Hero Member

Offline

Posts: 1529902793

Ignore
 1529902793

1529902793
 Report to moderator
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 23, 2014, 10:10:30 AM

I thought this would be the solution too, but I get extremely high value, 500.000.000, when in fact doing only <200kH/s. So this formula can't be correct (at least not for scrypt mining)

-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 23, 2014, 10:14:07 AM

I thought this would be the solution too, but I get extremely high value, 500.000.000, when in fact doing only <200kH/s. So this formula can't be correct (at least not for scrypt mining)
Scrypt is nonsense and uses 65536 * the actual difficulty as a defacto standard because it started at too low a difficulty to begin with.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 23, 2014, 10:37:52 AM

I thought this would be the solution too, but I get extremely high value, 500.000.000, when in fact doing only <200kH/s. So this formula can't be correct (at least not for scrypt mining)
Scrypt is nonsense and uses 65536 * the actual difficulty as a defacto standard because it started at too low a difficulty to begin with.

So, my "guessed" formula is then correct?

Sannin
Newbie

Offline

Activity: 19
Merit: 0

 February 24, 2014, 10:00:27 AM

Hi,

can somebody explain me what is the session in stratum?

Quote
{"error": null, "id": 1, "result": [["mining.notify", "ae6812eb4cd7735a302a8a9dd95cf71f"], "00000001", 4]}

Can I ignore this parameter? What is it? Can I set this parameter?

Analyzing stratum myself and it looks like this one isn't being used anywhere. Maybe reserved for later usage?

I analyzed cgminer code and I think that 'sessionid' is used only to reconnect. Am I right?
-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 24, 2014, 10:02:30 AM

Hi,

can somebody explain me what is the session in stratum?

Quote
{"error": null, "id": 1, "result": [["mining.notify", "ae6812eb4cd7735a302a8a9dd95cf71f"], "00000001", 4]}

Can I ignore this parameter? What is it? Can I set this parameter?

Analyzing stratum myself and it looks like this one isn't being used anywhere. Maybe reserved for later usage?

I analyzed cgminer code and I think that 'sessionid' is used only to reconnect. Am I right?
Correct. Whether the pool uses it or not is implementation dependent, but it is required to support reconnect.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
Sannin
Newbie

Offline

Activity: 19
Merit: 0

 February 24, 2014, 10:06:29 AM

Thanks
-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 24, 2014, 10:08:03 AM

Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 24, 2014, 11:50:11 AM

ckolivas, since you made cgminer, I am sure you will know to answer this question about stratum protocol; is it possible to turn stratum client into a pool, so that incoming stratum work is further divided into work for other clients. I am building a proxy that sits between pool and multiple instances of cgminer, so that the pool "thinks" it is in fact only one miner running. I know there is existing implementation that does stratum->getwork, but why should I go that heavy load path. I need to develop something light and fast, doing it in C and every cycle is important.

-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 24, 2014, 12:23:12 PM

ckolivas, since you made cgminer, I am sure you will know to answer this question about stratum protocol; is it possible to turn stratum client into a pool, so that incoming stratum work is further divided into work for other clients. I am building a proxy that sits between pool and multiple instances of cgminer, so that the pool "thinks" it is in fact only one miner running. I know there is existing implementation that does stratum->getwork, but why should I go that heavy load path. I need to develop something light and fast, doing it in C and every cycle is important.
Possible yes.  Someone has to implement it though, and I have no interest in turning cgminer into pool or proxy software at this stage with so much else to do.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 24, 2014, 12:45:06 PM

ckolivas, since you made cgminer, I am sure you will know to answer this question about stratum protocol; is it possible to turn stratum client into a pool, so that incoming stratum work is further divided into work for other clients. I am building a proxy that sits between pool and multiple instances of cgminer, so that the pool "thinks" it is in fact only one miner running. I know there is existing implementation that does stratum->getwork, but why should I go that heavy load path. I need to develop something light and fast, doing it in C and every cycle is important.
Possible yes.  Someone has to implement it though, and I have no interest in turning cgminer into pool or proxy software at this stage with so much else to do.

I will do it, I just need to know theory behind it. Formulas or pseudocode, whatever that can help me to understand what has to be done for it to work.

gh2k
Full Member

Offline

Activity: 126
Merit: 100

 February 25, 2014, 04:54:10 PM

Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners

Where is the documentation on 'reconnect'? This sounds like it would be useful to me, but I can't find it on slush's page.
-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 25, 2014, 08:39:01 PM

Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners

Where is the documentation on 'reconnect'? This sounds like it would be useful to me, but I can't find it on slush's page.

My post here is as close to the official documentation as it gets:
https://bitcointalk.org/index.php?topic=108533.msg1557099#msg1557099

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
gh2k
Full Member

Offline

Activity: 126
Merit: 100

 February 25, 2014, 09:54:24 PM

Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners

Where is the documentation on 'reconnect'? This sounds like it would be useful to me, but I can't find it on slush's page.

My post here is as close to the official documentation as it gets:
https://bitcointalk.org/index.php?topic=108533.msg1557099#msg1557099

That's excellent. Thanks. Unfortunately, I was hoping to find a way to tell the miner to reconnect (other than just tearing down the connection) so that I could nefariously switch the extranonce for a different one. I misread the post.
-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 25, 2014, 10:22:46 PM

Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners

Where is the documentation on 'reconnect'? This sounds like it would be useful to me, but I can't find it on slush's page.

My post here is as close to the official documentation as it gets:
https://bitcointalk.org/index.php?topic=108533.msg1557099#msg1557099

That's excellent. Thanks. Unfortunately, I was hoping to find a way to tell the miner to reconnect (other than just tearing down the connection) so that I could nefariously switch the extranonce for a different one. I misread the post.
Ah no, what you want then is client.reconnect . If you give the client a reconnect and just send it the same stratum url it will reconnect to the same url with a new connection.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
gh2k
Full Member

Offline

Activity: 126
Merit: 100

 February 25, 2014, 10:58:18 PM

Ah no, what you want then is client.reconnect . If you give the client a reconnect and just send it the same stratum url it will reconnect to the same url with a new connection.

Thanks, that's the one I want!

It would be nice if this were documented somewhere. Maybe I'll have a crack at reading your source and making a wiki page about it, once I'm done with my current project.
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 26, 2014, 12:10:50 AM

ckolivas, are you aware of cgminer bug (in ver 3.7.2) that causes cgminer to crash - it is related to stratum networking. When there are network issues, it can happen.

-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 26, 2014, 12:22:55 AM

ckolivas, are you aware of cgminer bug (in ver 3.7.2) that causes cgminer to crash - it is related to stratum networking. When there are network issues, it can happen.
I have no interest in bug reports for old versions.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
djeZo
Hero Member

Offline

Activity: 546
Merit: 500

 February 26, 2014, 12:24:41 AM

ckolivas, are you aware of cgminer bug (in ver 3.7.2) that causes cgminer to crash - it is related to stratum networking. When there are network issues, it can happen.
I have no interest in bug reports for old versions.

I know, I am just asking if it was reported and fixed in later versions.

-ck
Moderator
Legendary

Offline

Activity: 2562
Merit: 1097

Ruu \o/

 February 26, 2014, 12:25:44 AM

ckolivas, are you aware of cgminer bug (in ver 3.7.2) that causes cgminer to crash - it is related to stratum networking. When there are network issues, it can happen.
I have no interest in bug reports for old versions.

I know, I am just asking if it was reported and fixed in later versions.
Check the changelogs, I recall a few stratum patches.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
 Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [33] 34 35
 « previous topic next topic »