Skip to content

use error_code constants#495

Merged
plebhash merged 8 commits into
stratum-mining:mainfrom
plebhash:2026-05-12-error-code-constants
May 14, 2026
Merged

use error_code constants#495
plebhash merged 8 commits into
stratum-mining:mainfrom
plebhash:2026-05-12-error-code-constants

Conversation

@plebhash

@plebhash plebhash commented May 12, 2026

Copy link
Copy Markdown
Member

@github-project-automation github-project-automation Bot moved this to Todo 📝 in sv2-apps 📱 May 12, 2026
@plebhash plebhash added this to the sv2-apps 📱 v0.5.0 milestone May 12, 2026
@plebhash plebhash moved this from Todo 📝 to Ready For Review 🔍 in sv2-apps 📱 May 12, 2026
@GitGab19 GitGab19 moved this from Todo 📝 to Ready For Review 🔍 in Stratum V2 - 2026 Q3 - Roadmap 📍🗺️ May 13, 2026
@plebhash
plebhash force-pushed the 2026-05-12-error-code-constants branch 13 times, most recently from cb3edb5 to bce6a32 Compare May 13, 2026 22:42
Comment thread pool-apps/pool/src/lib/channel_manager/mining_message_handler.rs
Comment thread pool-apps/pool/src/lib/channel_manager/mining_message_handler.rs
@plebhash
plebhash force-pushed the 2026-05-12-error-code-constants branch 5 times, most recently from b7dc9d4 to ec2098a Compare May 14, 2026 15:34
Comment thread pool-apps/pool/src/lib/channel_manager/mining_message_handler.rs
@GitGab19

Copy link
Copy Markdown
Member

For me green light on both, let's just remember to drop ec2098a before merging this one.

@plebhash
plebhash force-pushed the 2026-05-12-error-code-constants branch from ec2098a to cd387a8 Compare May 14, 2026 19:37
@plebhash
plebhash force-pushed the 2026-05-12-error-code-constants branch from cd387a8 to c0b2265 Compare May 14, 2026 20:12
@plebhash
plebhash marked this pull request as ready for review May 14, 2026 20:14
@plebhash
plebhash force-pushed the 2026-05-12-error-code-constants branch from 166e40e to 7bf2523 Compare May 14, 2026 21:14
@plebhash
plebhash merged commit 4c73702 into stratum-mining:main May 14, 2026
11 checks passed
@plebhash
plebhash deleted the 2026-05-12-error-code-constants branch May 14, 2026 21:29
@github-project-automation github-project-automation Bot moved this from Ready For Review 🔍 to Done ✅ in Stratum V2 - 2026 Q3 - Roadmap 📍🗺️ May 14, 2026
@github-project-automation github-project-automation Bot moved this from Ready For Review 🔍 to Done ✅ in sv2-apps 📱 May 14, 2026
gimballock added a commit to marafoundation/sv2-apps that referenced this pull request May 15, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
plebhash pushed a commit to plebhash/sv2-apps that referenced this pull request May 15, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
plebhash pushed a commit to plebhash/sv2-apps that referenced this pull request May 15, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
plebhash pushed a commit to plebhash/sv2-apps that referenced this pull request May 15, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
plebhash pushed a commit to plebhash/sv2-apps that referenced this pull request May 18, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
@GitGab19 GitGab19 removed this from the sv2-apps 📱 v0.5.0 milestone May 21, 2026
@GitGab19 GitGab19 removed this from sv2-apps 📱 May 21, 2026
xyephy pushed a commit to xyephy/sv2-apps that referenced this pull request May 27, 2026
…d_total

Fixes a GaugeVec lazy-loading bug where sv2_*_shares_rejected_total never
appears in /metrics until the first rejection occurs, breaking Grafana
panels and alerting rules during normal (zero-rejection) operation.

Pre-seeds every SubmitSharesError.error_code value defined by mining_sv2
to 0 on every snapshot refresh. Constants come from PR stratum-mining#495 — single
source of truth, no string duplication.

Schema and PreviousPrometheusLabelSets are unchanged; cleanup happens
naturally when channels disappear. +122 lines, -0 lines, purely additive.

Includes regression test shares_rejected_metric_emitted_with_zero_rejections
which fails on this branch's HEAD and passes with the seed. Verified live
on testnet4 slot2: all 7 codes appear at 0 immediately after rebuild.
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