Repository navigation
fix(scenarios): probe accepted protocols in C-SC-7 - #29
Open
lucasbalieiro wants to merge 3 commits into
Open
lucasbalieiro wants to merge 3 commits into
lucasbalieiro wants to merge 3 commits into
Conversation
Describe the conditional §3.6.1 requirement, the per-protocol probe, and the Template Distribution and Job Declaration outcomes. A bare SetupConnection.Success is no longer described as a violation.
C-SC-7 treated the selected app type as exclusive and failed any SetupConnection.Success for another protocol. The §3.6.1 MUST is conditional and §3 allows one deployment to serve several sub-protocols on the same address, so .Success alone is not evidence of a violation. Probe every other defined protocol with its own SetupConnection flags and classify the first protocol-family reply. A same-family reply passes as a multi-protocol endpoint; another family fails. No reply fails only where a first server response is mandated (Mining §5.3.2, Template Distribution §7). Job Declaration silence is not exercised because §6.4.2 rate-limits the token request and leaves user_identifier restrictions to the server. Closes stratum-mining#17
Cover the protocol probe against mock endpoints: both other protocols rejected, another protocol served, Job Declaration silence reported as not exercised, Template Distribution silence reported as failed, and a reply from the wrong protocol family reported as failed.
lucasbalieiro
marked this pull request as ready for review
November 15, 2026 20:04
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.
closes #17
C-SC-7assumed the app type configured for the suite was the only Sv2 sub-protocol the endpoint served, so anySetupConnection.Successfor another protocol was treated as a violation.That assumption is not in the spec: 3.6.1 only requires
SetupConnection.Errorwhen the server does not support the requested protocol, and one deployment may serve several sub-protocols on the same address.The scenario now probes every other defined protocol with its own
SetupConnectionflags, sends that protocol’s first client message (OpenStandardMiningChannel,AllocateMiningJobToken, orCoinbaseOutputConstraints), and classifies the reply.A same-family reply passes and notes that the endpoint serves both; a reply from another protocol family fails; no reply fails for Mining and Template Distribution because both specs require a first server response, while Job Declaration silence is reported as not exercised because 6.4.2 rate-limits the token request and leaves
user_identifierrestrictions to the server.COVERAGE.mdand the mock-endpoint tests were updated to cover rejection, multi-protocol service, JD silence, TD silence, and wrong-family replies.