Pages:
Author

Topic: [ANN] Stratum mining protocol - ASIC ready - page 3. (Read 146153 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 25, 2014, 07:22:55 PM
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.
hero member
Activity: 588
Merit: 520
February 25, 2014, 07:10:50 PM
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.
full member
Activity: 126
Merit: 100
February 25, 2014, 05: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.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 25, 2014, 05:22:46 PM
Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners Undecided

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://bitcointalksearch.org/topic/m.1557099

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.
full member
Activity: 126
Merit: 100
February 25, 2014, 04:54:24 PM
Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners Undecided

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://bitcointalksearch.org/topic/m.1557099

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
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 25, 2014, 03:39:01 PM
Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners Undecided

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://bitcointalksearch.org/topic/m.1557099
full member
Activity: 126
Merit: 100
February 25, 2014, 11:54:10 AM
Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners Undecided

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.
hero member
Activity: 588
Merit: 520
February 24, 2014, 07:45:06 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.
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.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 24, 2014, 07:23:12 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.
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.
hero member
Activity: 588
Merit: 520
February 24, 2014, 06: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
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 24, 2014, 05:08:03 AM
Unfortunately very few pools currently support reconnect. We can't force them to implement a feature that only benefits miners Undecided
newbie
Activity: 19
Merit: 0
February 24, 2014, 05:06:29 AM
Thanks Wink
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 24, 2014, 05: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?

Thanks for reply

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.
newbie
Activity: 19
Merit: 0
February 24, 2014, 05: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?

Thanks for reply

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?
hero member
Activity: 588
Merit: 520
February 23, 2014, 05: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?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
February 23, 2014, 05: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.
hero member
Activity: 588
Merit: 520
February 23, 2014, 05: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)
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
February 22, 2014, 08:04:45 PM
I do find only old threads, that are not related to stratum mining, like this one: https://bitcointalksearch.org/topic/formula-to-calculate-share-calc-speed-given-hash-rate-diff-63273

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
Bad guess.

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

So it's 2^32 not 2^16 Tongue

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
hero member
Activity: 588
Merit: 520
February 22, 2014, 07:32:32 PM
I do find only old threads, that are not related to stratum mining, like this one: https://bitcointalksearch.org/topic/formula-to-calculate-share-calc-speed-given-hash-rate-diff-63273

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
hero member
Activity: 588
Merit: 520
February 22, 2014, 11:36:55 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?

Thanks for reply

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

Anyway, could someone explain to me how many hashes are solved if difficulty by stratum is set to 32.

I found this: http://bitcoin.stackexchange.com/questions/3621/how-do-mining-pools-figure-out-the-hashing-speed-of-the-connected-miners

I can count number of shares and I can determine share difficulty out of protocol. If I have recorded shares (+difficulty for each one), how would I go on and calculate total amount of hashes? And does it depend on hashing algorithm?
Pages:
Jump to: