Skip to content

docs(coverage): sync scenario catalog with sv2-spec main - #28

Merged
lucasbalieiro merged 1 commit into
stratum-mining:mainfrom
lucasbalieiro:docs/coverage-spec-sync
Nov 13, 2026
Merged

lucasbalieiro merged 1 commit into
stratum-mining:mainfrom
lucasbalieiro:docs/coverage-spec-sync

Conversation

@lucasbalieiro

Copy link
Copy Markdown
Collaborator

I've run an AI in the COVERAGE.md file and asked to check if the references are still up-to-date;

as a results some changes are needed;

checked againt sv2-spec@main:efade57715f1f5146966a52d1c6e8921ab839728

Comment thread COVERAGE.md Resolved
Comment thread COVERAGE.md Outdated
Comment on lines +78 to +79
| GEN-13 | Ω1 | Θ1 | Server does not treat a non-printable byte in a client-supplied `STR0_255` field as a protocol error (accepts the message or silently ignores the bad field) | [§3.1](https://github.com/stratum-mining/sv2-spec/blob/main/03-Protocol-Overview.md#31-data-types-mapping) `STR0_255` "Every byte MUST be a printable ASCII character (0x20 to 0x7E). A receiver MUST treat any other byte as a protocol error." | Send a byte-level `SetupConnection` and `OpenStandardMiningChannel`/`OpenExtendedMiningChannel` with one `STR0_255` field at a time set to a control byte or a byte > 0x7E (all other fields valid; `endpoint_host`, `vendor`, `hardware_version`, `firmware`, `device_id`, `user_identity`); assert a framed error or disconnect | `SetupConnection`, `OpenStandardMiningChannel`, `OpenExtendedMiningChannel`, `SetupConnection.Error`, `OpenMiningChannel.Error` |
| GEN-14 | Ω1 | Θ1 | Server does not treat a non-finite or negative `nominal_hash_rate` as a protocol error (accepts the request or silently ignores the value) | [§3.1](https://github.com/stratum-mining/sv2-spec/blob/main/03-Protocol-Overview.md#31-data-types-mapping) `F32` "A receiver MUST treat NaN, ±Infinity, and negative values (including -0.0) as protocol errors." | Send `OpenStandardMiningChannel`, `OpenExtendedMiningChannel`, and `UpdateChannel` with each invalid `F32` bit pattern (`NaN`, `+Infinity`, `-Infinity`, `-0.0`, negative); assert a framed error or disconnect | `OpenStandardMiningChannel`, `OpenExtendedMiningChannel`, `UpdateChannel`, `OpenMiningChannel.Error`, `UpdateChannel.Error` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clanker finding:

GEN-13 and GEN-14 each bundle active probes on several messages (SetupConnection, OpenStandardMiningChannel, OpenExtendedMiningChannel, and UpdateChannel for GEN-14) into one row. The "Symmetric split" rule at the top of the file says scenarios that apply to a standard/extended pair get separate IDs because they exercise different server code paths, and C-SC-9 already files a STR0_255 probe on SetupConnection under C-SC, not GEN. With one row, Suite Coverage can only flip to ✅ when every message is covered, and a server can fail one and pass the others.

Since IDs are never renumbered, I'd rather split these before merge: one row per message, filed under that message's table (C-SC, M-OSMC, M-OEMC, M-UC), each citing the §3.1 type rule. GEN-3 and GEN-15 are fine as they are, they are passive checks on everything the server sends.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, addressed

Comment thread COVERAGE.md Resolved
Update STR0_255 references, add message-specific scenarios for STR0_255 and F32 validation, B0_32 length checks, SetTarget on already-received future jobs, extension 0x0002, and tighten several detection rules.

Checked against sv2-spec@main:efade57715f1f5146966a52d1c6e8921ab839728.
@lucasbalieiro
lucasbalieiro force-pushed the docs/coverage-spec-sync branch from 8d1468e to 9e80c0e Compare November 13, 2026 16:48
@lucasbalieiro
lucasbalieiro merged commit 2c87647 into stratum-mining:main Nov 13, 2026
3 checks passed
@lucasbalieiro
lucasbalieiro deleted the docs/coverage-spec-sync branch November 13, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants