Skip to content

fix(sv1_api): parse configure min-bit-count as decimal - #2414

Open
cfilipescu wants to merge 1 commit into
stratum-mining:mainfrom
cfilipescu:agent/configure-min-bit-count-parsing
Open

cfilipescu wants to merge 1 commit into
stratum-mining:mainfrom
cfilipescu:agent/configure-min-bit-count-parsing

Conversation

@cfilipescu

@cfilipescu cfilipescu commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2412: parse the version-rolling.min-bit-count request hint as a decimal integer in 0..=32.

  • String "16" now means 16 rather than hexadecimal 22. The old hex interpretation is removed.
  • Invalid, negative, fractional, or over-32 hints are logged at warn level and treated as absent, so a monitoring hint does not disconnect a miner. Mask validation remains strict.

This is independently based on main for focused review. It touches the same parser as #2413, applies cleanly with it, and the combined sv1_api suite passed. Malformed hints now appear as absent in monitoring; legacy eight-digit strings are read as decimal.

Validation: CC= CPATH= cargo test --locked -p sv1_api (37 passed), CC= CPATH= cargo +1.89.0 clippy --locked -p sv1_api --all-features -- -D warnings, cargo fmt --all -- --check --config-path /dev/null, and ./scripts/check-version-bumps.sh origin/main.

@cfilipescu
cfilipescu force-pushed the agent/configure-min-bit-count-parsing branch 2 times, most recently from 3648586 to 0da6d63 Compare October 7, 2026 13:58
Read string-valued min-bit-count hints as decimal integers. Log and
ignore malformed or out-of-range values so a monitoring hint does not
disconnect a miner; keep mask validation strict.

stratum-mining#2412
@cfilipescu
cfilipescu force-pushed the agent/configure-min-bit-count-parsing branch from 0da6d63 to de00730 Compare October 8, 2026 15:40
@Jolah1

Jolah1 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

tACK. Ran the sv1 tests and the client_and_server example with #2413, #2414 and
#2415 merged together, and checked the configure traces from #1173, #532 and #2412
against main.

@cfilipescu

Copy link
Copy Markdown
Contributor Author

@GitGab19 @plebhash is there something holding this up?

@plebhash

Copy link
Copy Markdown
Member

any special reason why we're aiming to close #2412 with 3 different PRs?

@cfilipescu

Copy link
Copy Markdown
Contributor Author

I thought I would make it easy to review by breaking it up into 3 smaller PRs that are mutually exclusive

@plebhash

Copy link
Copy Markdown
Member

@bit-aloo is this related to #2498 or orthogonal?

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.

3 participants