Skip to content

stratum-apps::monitoring::server::{ServerExtendedChannelInfo,ServerStandardChannelInfo} displays SubmitShares.Error.error_code#450

Merged
GitGab19 merged 6 commits intostratum-mining:mainfrom
plebhash:2026-04-22-share-accounting-error-codes
Apr 28, 2026
Merged

stratum-apps::monitoring::server::{ServerExtendedChannelInfo,ServerStandardChannelInfo} displays SubmitShares.Error.error_code#450
GitGab19 merged 6 commits intostratum-mining:mainfrom
plebhash:2026-04-22-share-accounting-error-codes

Conversation

@plebhash
Copy link
Copy Markdown
Member

@plebhash plebhash commented Apr 22, 2026

close #423

companion stratum-mining/stratum#2139

blocked by #462


the affected endpoint is GET /api/v1/server/channels

before, each channel would have:

"shares_rejected": 2

now, it gets:

"shares_rejected": {
  "duplicate-share": 1,
  "difficulty-too-low": 1
}

and if there's no rejected shares:

"shares_rejected": {}

@plebhash
Copy link
Copy Markdown
Member Author

cc @gimballock

Comment thread miner-apps/translator/src/lib/monitoring.rs Outdated
Comment thread miner-apps/translator/Cargo.toml
Comment thread pool-apps/jd-server/Cargo.toml
Comment thread pool-apps/pool/Cargo.toml
Comment thread miner-apps/jd-client/Cargo.toml
Comment thread integration-tests/Cargo.toml
@plebhash
Copy link
Copy Markdown
Member Author

plebhash commented Apr 25, 2026

btw I think if we merge this without a companion for stratum-mining/sv2-ui#93, then sv2-ui main branch might break, given that the HTTP endpoint response is changing

let mut shares_acknowledged: u32 = 0;
let mut shares_submitted: u32 = 0;
let mut shares_rejected: u32 = 0;
let mut shares_rejected: HashMap<String, u32> = HashMap::new();
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.

Suggested change
let mut shares_rejected: HashMap<String, u32> = HashMap::new();
let mut shares_rejected = HashMap::new();

Copy link
Copy Markdown
Member Author

@plebhash plebhash Apr 27, 2026

Choose a reason for hiding this comment

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

the other variables around it already set this pattern of explicit type declaration, so I don't think it makes sense to only remove this one.

Comment thread stratum-apps/src/monitoring/http_server.rs Outdated
Comment thread stratum-apps/src/monitoring/http_server.rs Outdated
@plebhash plebhash force-pushed the 2026-04-22-share-accounting-error-codes branch 2 times, most recently from e1dbc3a to 3734b02 Compare April 27, 2026 18:25
Comment thread miner-apps/translator/src/lib/monitoring.rs Outdated
Comment thread miner-apps/translator/src/lib/monitoring.rs Outdated
Copy link
Copy Markdown
Member

@GitGab19 GitGab19 left a comment

Choose a reason for hiding this comment

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

Just a very minor thing, not a blocker.

LGTM.

@plebhash plebhash force-pushed the 2026-04-22-share-accounting-error-codes branch from 3734b02 to dd4e115 Compare April 28, 2026 00:03
@GitGab19
Copy link
Copy Markdown
Member

We merged #462, so this is now unblocked.

@plebhash plebhash force-pushed the 2026-04-22-share-accounting-error-codes branch 2 times, most recently from 5df569b to 042cac1 Compare April 28, 2026 12:48
@plebhash plebhash force-pushed the 2026-04-22-share-accounting-error-codes branch from 042cac1 to acb6145 Compare April 28, 2026 12:51
@GitGab19 GitGab19 merged commit 2d545a7 into stratum-mining:main Apr 28, 2026
11 checks passed
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.

stratum-apps::monitoring::server::{ServerExtendedChannelInfo,ServerStandardChannelInfo} should display SubmitShares.Error.error_code

4 participants