Feat/mip001 pool config - #84
Closed
jayrmotta wants to merge 2 commits into
Closed
Conversation
Phase 1 of the MIP-0001 incremental rollout, scoped to pool config as the pilot feature: the dead, all-unimplemented Config stub is replaced with a real tree populated from the MUJINA_POOL_* environment variables that the daemon already read ad hoc. No cascade, no config files, no persistence yet -- those land in later increments. PoolConfig deliberately has no Serialize impl, since it carries a plaintext password; API exposure comes in a follow-up commit via a redacted view type. Debug is hand-implemented for the same reason -- the derived version would print the password. password_set tracks whether MUJINA_POOL_PASS was explicitly provided, since password itself always has a value (falling back to a placeholder).
Phase 2 of the MIP-0001 incremental rollout: mirrors the existing /miner state-tree endpoint, but for configuration. Returns a redacted PoolConfig view (password_set: bool) instead of the raw config type, via an explicit From impl rather than ad hoc handler code, so the pool password can never be echoed back over the API. pool_config is shared as Arc<Option<PoolConfig>> rather than owned data in SharedState, since SharedState is cloned on every request -- an owned password-bearing value there would mean copying the plaintext password out of shared state on every single API call, not just /config. Writable fields and additional tree sections arrive in later increments.
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.
No description provided.