-
Notifications
You must be signed in to change notification settings - Fork 35
yaml based configuration #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jbride
wants to merge
5
commits into
256foundation:main
Choose a base branch
from
jbride:config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| Cargo.lock | ||
| /target/ | ||
| /.cache/ | ||
| mujina.yaml |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| # Mujina Miner — example configuration | ||
| # | ||
| # Copy this file to /etc/mujina/mujina.yaml and edit as needed. | ||
| # All keys are optional; values shown here are the hard-coded defaults. | ||
| # | ||
| # Full documentation: docs/configuration.md | ||
|
|
||
| # ------------------------------------------------------------ | ||
| # daemon — process and logging | ||
| # ------------------------------------------------------------ | ||
| daemon: | ||
| # Minimum log level emitted to stdout or journald. | ||
| # Values: error | warn | info | debug | trace | ||
| log_level: "info" | ||
|
|
||
| # PID file written on startup, removed on clean exit. | ||
| # Null disables PID file creation. | ||
| pid_file: ~ | ||
|
|
||
| # Emit systemd sd_notify readiness notifications. | ||
| # Enable when running under a systemd Type=notify service unit. | ||
| systemd: false | ||
|
|
||
|
|
||
| # ------------------------------------------------------------ | ||
| # api — HTTP REST API server | ||
| # ------------------------------------------------------------ | ||
| api: | ||
| # TCP address and port for the API server. | ||
| # Use 127.0.0.1 (loopback) to restrict access to localhost. | ||
| # Use 0.0.0.0 to expose on all interfaces (see security note below). | ||
| listen: "127.0.0.1:7785" | ||
|
|
||
| # WARNING: The API has no authentication. Binding to a non-loopback | ||
| # address exposes full miner control to the network. Only do this | ||
| # behind a firewall or reverse proxy that provides authentication. | ||
|
|
||
|
|
||
| # ------------------------------------------------------------ | ||
| # pool — primary mining pool | ||
| # ------------------------------------------------------------ | ||
| pool: | ||
| # Stratum v1 pool URL. | ||
| # Format: stratum+tcp://<host>:<port> | ||
| # Required for actual mining. When absent, the daemon starts with | ||
| # a dummy job source (useful for hardware testing). | ||
| url: ~ | ||
|
|
||
| # Worker name, typically wallet_address.worker_name | ||
| user: "mujina-testing" | ||
|
|
||
| # Worker password. Most pools accept "x". | ||
| password: "x" | ||
|
|
||
| # Target share rate in shares per minute for the forced-rate wrapper. | ||
| # When set, overrides the pool's share target so a CPU miner finds shares | ||
| # at this rate regardless of pool difficulty. Useful for testing share | ||
| # submission flow without waiting days for a real share. | ||
| # Null disables the wrapper (normal pool difficulty applies). | ||
| forced_rate: ~ | ||
|
|
||
|
|
||
| # ------------------------------------------------------------ | ||
| # backplane — board discovery and lifecycle management | ||
| # ------------------------------------------------------------ | ||
| backplane: | ||
| # Enable USB device discovery and hotplug monitoring. | ||
| # Disable for environments without USB mining hardware | ||
| # (e.g., CPU-only testing). | ||
| usb_enabled: true | ||
|
|
||
|
|
||
| # ------------------------------------------------------------ | ||
| # boards — per-board-type hardware configuration | ||
| # ------------------------------------------------------------ | ||
| boards: | ||
|
|
||
| # -- Bitaxe family (BM1370-based boards) -- | ||
| # NOTE: These fields are parsed but not yet wired to board behavior. | ||
| # They are reserved for near-term implementation. | ||
| bitaxe: | ||
| # Emergency shutdown temperature in Celsius. | ||
| # The board halts hashing if any sensor reads above this value. | ||
| temp_limit_c: 85.0 | ||
|
|
||
| # Fan speed bounds as a percentage of full speed. | ||
| # The thermal controller adjusts within this range. | ||
| fan_min_pct: 20 | ||
| fan_max_pct: 100 | ||
|
|
||
| # Maximum board power consumption in watts. | ||
| # Null disables the power cap (hardware default applies). | ||
| power_limit_w: ~ | ||
|
|
||
| # -- CPU miner (software SHA256d, for testing and development) -- | ||
| cpu_miner: | ||
| # Enable the software CPU miner. | ||
| # When false, no CPU mining threads are started. | ||
| enabled: false | ||
|
|
||
| # Number of OS threads to dedicate to hashing. | ||
| threads: 1 | ||
|
|
||
| # Target CPU utilisation per thread as a percentage (1–100). | ||
| # At 80%, each thread hashes for 800 ms then sleeps for 200 ms. | ||
| # Useful on cloud instances that alert on sustained 100% CPU usage. | ||
| duty_percent: 50 | ||
|
|
||
|
|
||
| # ------------------------------------------------------------ | ||
| # hash_thread — ASIC hash thread tuning | ||
| # NOTE: These fields are parsed but not yet wired to board behavior. | ||
| # They are reserved for near-term implementation. | ||
| # ------------------------------------------------------------ | ||
| hash_thread: | ||
| # Difficulty target configured on-chip for share reporting. | ||
| # Lower values produce more frequent shares (useful for health | ||
| # monitoring); higher values reduce message volume on large | ||
| # installations. The scheduler still applies pool difficulty | ||
| # filtering before forwarding shares to the pool. | ||
| chip_target_difficulty: 256 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: May be worth pointing out which PR, branch, discussion, etc, led you to this near-term implementation. |
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather just skip this and then each author will implement support for their upcoming features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept thinking about this and wanted to clarify, I'm coming from a place of implementing the thermal control for the bitaxes and not knowing for sure what should be exposed, if you check this config file it has many properties and each of them are arguably important for this implementation.
I believe the properties there might change a lot and so it's introduced already "out of sync" while both this and #33 are open at the same time. If anything I'd be more inclined exposing them all and giving our users the power of customizing everything, but having safe defaults.