adapt sv2-apps with channels_sv2::server::share_accounting keeping track of rejected shares#491
Conversation
channels_sv2::server::share_accounting keeps track of rejected sharessv2-apps with channels_sv2::server::share_accounting keeping track of rejected shares
bfcb912 to
8a1422d
Compare
|
All of these changes seem to follow the correct conventions and processes, only nit i found was in the companion PR regarding use of &str instead of String to save some memory allocations. |
8a1422d to
054864a
Compare
thanks @gimballock ! so I assume this also includes |
You're following the conventions correctly:
But let me deploy this now to verify the metrics actually show up in grafana..
The lazy-loaded metrics will cause issues for alerting and make associated grafana panels fail to load until first share rejection, so that one is high priority. |
3f70070 to
3ae9eff
Compare
GitGab19
left a comment
There was a problem hiding this comment.
LGTM, apart from a minor thing on the Prometheus metrics cache, for which I'd like to get a confirmation from @gimballock on.
|
Heads up: |
|
thanks @gimballock cherry-picked the commit from plebhash#3 with a small adaptation:
renamed to |
0b91c4f to
22446f6
Compare
…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.
22446f6 to
0f3f70b
Compare
companion stratum-mining/stratum#2149
adds two new fields to
ExtendedChannelInfoandStandardChannelInfo:pub shares_rejected: u32pub shares_rejected_by_reason: HashMap<String, u32>