Skip to content

Conversation

@jirijakes
Copy link

This PR adds jsonrpc member to all messages to comply with JSON-RPC 2.0 specification:

The Request object has the following members:
    jsonrpc: A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
    …

@mutatrum
Copy link
Collaborator

mutatrum commented Aug 3, 2025

I'm not sure the Stratum API follows the json-rpc spec?

@jirijakes
Copy link
Author

I'm not sure the Stratum API follows the json-rpc spec?

The widely linked specification at https://reference.cash/mining/stratum-protocol claims so. But I am not sure whether that is generally accepted or not.

@mutatrum
Copy link
Collaborator

mutatrum commented Aug 3, 2025

I've never seen that one. Not claiming that it's not a valid source, but I only know https://en.bitcoin.it/wiki/Stratum_mining_protocol. I also don't know what in the new BIP-40/BIP-41 is proposed?

@jirijakes
Copy link
Author

I only know https://en.bitcoin.it/wiki/Stratum_mining_protocol

Seems like the page behind "Original example on slush's pool site" link in this document also says JSON-RPC 2.0: https://web.archive.org/web/20150307191254/http://mining.bitcoin.cz/stratum-mining#developers

BIP40 (draft) says both JSON-RPC 1.0 and 2.0 are acceptable: https://github.com/ben221199/bips/blob/add-bip40/bip-0040.mediawiki#specification-data-format . But IIUC that is not for mining. I think BIP41 draft is not yet written.

@ben221199
Copy link

The BIP41 draft indeed is not written yet. I will then investigate if both JSON-RPC 1.0 or 2.0 are accepted.

@mutatrum mutatrum added the enhancement New feature or request label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants