enforce SetupConnection version ranges - #695
Merged
plebhash merged 6 commits intoAug 11, 2026
Merged
Conversation
plebhash
force-pushed
the
2026-08-06-fix-setup-connection-version
branch
from
August 7, 2026 00:19
3ef816b to
cf00a20
Compare
bit-aloo
reviewed
Aug 7, 2026
plebhash
force-pushed
the
2026-08-06-fix-setup-connection-version
branch
4 times, most recently
from
August 8, 2026 19:17
b377b63 to
b212671
Compare
Single source of truth for the SV2 protocol version supported by the apps in this workspace, to be used by SetupConnection handlers instead of per-app local constants. Related to stratum-mining#694
Per SV2 spec, SetupConnectionSuccess.used_version must be within the client's [min_version, max_version] range, and the server must respond with SetupConnectionError (protocol-version-mismatch) when it cannot support any version in the requested range. The pool was unconditionally responding with used_version=2. Depends on the companion stratum PR introducing ERROR_CODE_SETUP_CONNECTION_PROTOCOL_VERSION_MISMATCH in common_messages_sv2. Related to stratum-mining#694
Same defect as the pool: JDS was unconditionally responding with used_version=2 without validating the client's version range. Related to stratum-mining#694
…otocol version Same defect as pool and JDS on the JDC downstream-facing interface: it validated protocol and feature flags but not the client's version range, unconditionally responding with used_version=2. Related to stratum-mining#694
Assert that pool, JDS and JDC downstream reject a SetupConnection requesting only version 3 with a SetupConnectionError carrying the protocol-version-mismatch error code. Related to stratum-mining#694
plebhash
force-pushed
the
2026-08-06-fix-setup-connection-version
branch
from
August 11, 2026 19:24
b212671 to
5fb3885
Compare
plebhash
marked this pull request as ready for review
August 11, 2026 19:48
plebhash
force-pushed
the
2026-08-06-fix-setup-connection-version
branch
from
August 11, 2026 19:53
5fb3885 to
85921f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #694
companion stratum-mining/stratum#228