Skip to content

allow implementations to use error codes for automated actions#194

Merged
GitGab19 merged 3 commits into
stratum-mining:mainfrom
plebhash:2026-04-30-automated-action-error-codes
Jun 16, 2026
Merged

allow implementations to use error codes for automated actions#194
GitGab19 merged 3 commits into
stratum-mining:mainfrom
plebhash:2026-04-30-automated-action-error-codes

Conversation

@plebhash

Copy link
Copy Markdown
Member

as discussed in #165

more specifically, this PR implements suggestion from #165 (comment)

@plebhash

plebhash commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

with the changes on this PR:

  • 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

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

that will be tackled via stratum-mining/stratum#2142

Comment thread 03-Protocol-Overview.md
Comment thread 03-Protocol-Overview.md Outdated
@average-gary

average-gary commented May 28, 2026

Copy link
Copy Markdown

Does this mean an implementation of JDC that wants to have multiple upstreams, will need to implement all upstreams error codes? How should an implementation learn of error codes for a given upstream?

Edit: answered on call. clients are responsible for implementing handling of each Upstream's unique implementation.

@gimballock

gimballock commented May 28, 2026

Copy link
Copy Markdown

Some of the issues raised like 'rejecting 100% of your shares' are not necessarily detected by particular error codes, those types of issues could potentially be tracked with lower-level traffic metrics (by adding byte/message count metrics)

  • tracking failures to ack or similar spec violations
  • tracking excessive data transfers, ingress/egress
  • tracking proportion of failed shares to total shares (already possible)

@TheBlueMatt TheBlueMatt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good enough

@plebhash
plebhash force-pushed the 2026-04-30-automated-action-error-codes branch from 0c0bdbb to e071ffd Compare June 8, 2026 20:57
@Fi3

Fi3 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

ok with me

@plebhash
plebhash force-pushed the 2026-04-30-automated-action-error-codes branch from e071ffd to 3c5d7bb Compare June 9, 2026 15:34
@GitGab19
GitGab19 merged commit 06ea802 into stratum-mining:main Jun 16, 2026
1 check passed
@plebhash
plebhash deleted the 2026-04-30-automated-action-error-codes branch June 22, 2026 15:08
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.

6 participants