Skip to content

Send valid JSON-RPC 2.0 requests - #1177

Open
jirijakes wants to merge 1 commit into
bitaxeorg:masterfrom
jirijakes:valid-jsonrpc
Open

jirijakes wants to merge 1 commit into
bitaxeorg:masterfrom
jirijakes:valid-jsonrpc

Conversation

@jirijakes

Copy link
Copy Markdown

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

mutatrum commented Aug 3, 2025

Copy link
Copy Markdown
Collaborator

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

@jirijakes

Copy link
Copy Markdown
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

mutatrum commented Aug 3, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown

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