Stratum works fine on Ozcoin. I'd say Stratum implementation on Eclipse is broken..
I found Con's implementation of stratum had 3 problems with regard to working on Eclipse:
- It assumes all difficulties set are integers. JSON treats all Numbers as the same type, and stratum doesn't restrict the range to integer values. Every stratum client implementation except Con's correctly handles real number difficulties. EclipseMC has an unrestricted vardiff range, and more often than not uses a real number.
- It assumes the server will send a notify (or at least some message) every 90 seconds. Stratum makes no such guarantees.
- It gives up on authorizations if a response is not received basically instantly.
id: An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]
It seems like luke-jr misunderstands what a client is. The client is CGminer. Also in no example I have found in the documentation was id anything but an integer. This doesn't mean it has to be but if every example has it being so then it seems like a precedent. It seems like id is used instead of method. Shouldn't it be like this?
{"jsonrpc": "2.0", "method": "auth", "id": (whatever the client sent)}
According to the Stratum Documentation.
Response
Every response contains following parts
◦message ID - same ID as in request, for pairing request-response together
◦result - any json-encoded result object (number, string, list, array, )
◦error - null or list (error code, error message)
While true it says that any string, number or NULL value is required, it also stated it is selected by the client. I am not 100% positive on the rest I didn't write the specs or anything. I just read them. I really don't see why a person wouldn't want authorized before they get a difficulty.
As I see it and maybe I am totally wrong but I want to try stratum on EMC. Since authorize can come at any time why can't it come before subscribing?
help?
Obviously the stratum proxy and/or poclbm should work fine too.
I suppose the second addendum to the numbers was glossed over slightly. It says this:
[2] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions.
That would seem to indicate that it is better to use Integers then decimals or other real numbers. At least since they may not get the same value that the server sends.
Actually I have an idea on how to suggest handling it I may see what Con thinks.