Skip to content

define types for commonly-used error_code strings #2142

@plebhash

Description

@plebhash

this was discussed on Sv2 Working Group call of April 30th 2026 and proposed by @coleFD

this is tied to stratum-mining/sv2-spec#194 and stratum-mining/sv2-spec#165

the core concepts here are:

  • the spec allows for implementations to take automated actions on error_code strings
  • the spec does not force implementations to use specific error_code strings, only provides suggestions for common scenarios

so we end up in a situation where different implementations could be aiming for the same error_code string, but still be subject to small typo or encoding issues

while that is hard to avoid without major spec changes, SRI can greatly reduce the room for such scenarios by providing types for commonly-used error_code strings

these should be provided on their respective message-crates:

  • common_messages_sv2
  • mining_sv2
  • job_declaration_sv2
  • template_distribution_sv2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Ready For Review 🔍

Status

Ready For Review 🔍

Relationships

None yet

Development

No branches or pull requests

Issue actions