Skip to content

yaml based configuration#36

Open
jbride wants to merge 1 commit into256foundation:mainfrom
jbride:config
Open

yaml based configuration#36
jbride wants to merge 1 commit into256foundation:mainfrom
jbride:config

Conversation

@jbride
Copy link
Collaborator

@jbride jbride commented Mar 5, 2026

Details of implementation can be found here.

@jayrmotta
Copy link

Hey @jbride, good job with the pull request mate! I wish GitHub would allow me to submit a proper review, so I'll do it with comments for now.

Found an issue with the CPU miner config:

▪ MUJINA__DAEMON__LOG_LEVEL=debug \
MUJINA__API__LISTEN=0.0.0.0:7785 \
MUJINA__POOL__URL=stratum+tcp://public-pool.io:3333 \
MUJINA__POOL__USER=myuser \
MUJINA__POOL__PASSWORD=mypassword \
MUJINA__BACKPLANE__USB_ENABLED=false \
MUJINA__BOARDS__CPU_MINER__ENABLED=true \
MUJINA__BOARDS__CPU_MINER__THREADS=4 \
cargo run -p mujina-miner --bin mujina-minerd
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s
     Running `target/debug/mujina-minerd`
09:07:16 INFO  daemon: USB discovery disabled (backplane.usb_enabled = false)
09:07:16 INFO  daemon: CPU miner enabled
               threads=4, duty=50
09:07:16 INFO  daemon: Started.
09:07:16 INFO  daemon: For debugging, set RUST_LOG=mujina_miner=debug or trace.
09:07:16 INFO  backplane: CPU miner board connected.
               board=CPU Miner, threads=4, duty=50
09:07:16 INFO  job_source::stratum_v1: Waiting for hash threads before connecting
               pool=stratum+tcp://public-pool.io:3333
09:07:16 ERROR backplane: Failed to create CPU miner board
               board=CPU Miner, error=Configuration error: CPU miner not configured (MUJINA_CPU_MINER not set)
09:07:16 INFO  api::server: API server listening.
               url=http://0.0.0.0:7785
09:07:16 WARN  api::server: API server is bound to a non-localhost address (0.0.0.0). This exposes the API to the network without authentication.
^C09:07:21 INFO  daemon: Received SIGINT.
09:07:21 INFO  scheduler: Mining status.
               uptime=5s, hashrate=--, shares=0
09:07:21 INFO  daemon: Exiting.

I asked my LLM to provide a fix and then it provided this solution, maybe you want to port it to your branch.

@jayrmotta
Copy link

jayrmotta commented Mar 10, 2026

Another improvement would be replacing or removing references to the old environment variables. Found instances on the following files:

  • docs/api.md
  • mujina-miner/src/cpu_miner/config.rs
  • mujina-miner/src/cpu_miner/mod.rs
  • .github/DISCUSSION_TEMPLATE/issue-triage.yml
  • docs/cpu-mining.md
  • mujina-miner/src/bin/cli.rs
  • README.md
  • mujina-miner/src/bin/minerd.rs
  • mujina-miner/src/stratum_v1/client.rs
  • docs/container.md

Some of the mentions are in the context of explaining this PR's changes but some are just residue, if left like that it might confuse and misinform future developers.

@jayrmotta
Copy link

nit: Maybe we should find ways to avoid committing real config files by accident and leaking secrets? For one we could add mujina.yaml to .gitignore.

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.

2 participants