validate pool authority pubkey to prevent broken TOML#117
Merged
pavlenex merged 2 commits intostratum-mining:mainfrom Apr 23, 2026
Merged
validate pool authority pubkey to prevent broken TOML#117pavlenex merged 2 commits intostratum-mining:mainfrom
pavlenex merged 2 commits intostratum-mining:mainfrom
Conversation
Contributor
Author
|
@lucasbalieiro please give this a look ! |
1ee8c95 to
eec80b9
Compare
eec80b9 to
2357b4b
Compare
Collaborator
Contributor
Author
|
Yeah I had already noticed that locally and am working on it will push it soon ! |
2357b4b to
5ef654d
Compare
Contributor
Author
|
@lucasbalieiro please give it a look at this ! |
Contributor
Author
|
@lucasbalieiro Thanks for your review let me know if any other changes are needed before merging this :) |
Signed-off-by: rx18-eng <remopanda78@gmail.com>
Signed-off-by: rx18-eng <remopanda78@gmail.com>
5ef654d to
4587711
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Body
Closes #113.
Pool authority pubkeys in the SRI docs and Discord channels are almost always shown wrapped in quotes, and users copy them with the quotes. The wizard dropped that value verbatim into a TOML basic string, producing invalid TOML and a silent container crash loop.
Fix is input-time validation mirroring how Bitcoin addresses are already validated (per @GitGab19 and @lucasbalieiro's note that this field is base58check).
bs58check.decodeUnsafecatches both charset errors and checksum failures, which is what copy-paste corruption looks like. Wrapping quotes get stripped on every update so the dominant paste case becomes a zero-click fix; the validator itself stays strict and rejects anything still quoted or whitespace-padded. Same treatment foruser_identity- rejects",\, and control characters that would break TOML.Bootstraps vitest for
src/and covers the validators with 40 unit tests: every preset pubkey, wrapping-quote paste, tampered checksum, and each individual TOML-unsafe character. Verified manually: pasted quoted Braiins key, quotes stripped on entry, made it through to the review page cleanly.