Skip to content

[MINER-BUG] install Linux miner signing dependencies#6705

Open
JONASXZB wants to merge 1 commit into
Scottcjn:mainfrom
JONASXZB:codex/linux-miner-deps
Open

[MINER-BUG] install Linux miner signing dependencies#6705
JONASXZB wants to merge 1 commit into
Scottcjn:mainfrom
JONASXZB:codex/linux-miner-deps

Conversation

@JONASXZB
Copy link
Copy Markdown
Contributor

@JONASXZB JONASXZB commented Jun 1, 2026

Summary

  • add miners/linux/requirements-miner.txt with requests and PyNaCl
  • update the miner quickstart to install Linux miner dependencies before running from source
  • update install-miner.sh to download requirements-miner.txt and miner_crypto.py, verify their checksums, and install from the requirements file
  • refresh/add checksum entries needed by the installer

Fixes #6704.

Verification

  • git diff --check -- install-miner.sh miners/README.md miners/checksums.sha256 miners/linux/requirements-miner.txt
  • bash -n install-miner.sh
  • bash install-miner.sh --dry-run --wallet dry-run-wallet --skip-service
  • (cd miners && shasum -a 256 -c checksums.sha256)
  • Fresh venv: python3 -m venv /tmp/rustchain-linux-miner-deps-test
  • Fresh venv: /tmp/rustchain-linux-miner-deps-test/bin/python -m pip install -r miners/linux/requirements-miner.txt
  • Fresh venv dry-run: /tmp/rustchain-linux-miner-deps-test/bin/python miners/linux/rustchain_linux_miner.py --wallet JONASXZB --dry-run --show-payload

Fresh venv dry-run result: all 6 fingerprint checks passed; health probe returned HTTP 200; no mining loop started.

Bounty wallet

JONASXZB

Copy link
Copy Markdown

@Jorel97 Jorel97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head ef02cb789a41b7dd225799ef5434ab149bc5642e for the Linux miner dependency/install path.

What I checked:

  • install-miner.sh now downloads the miner requirements file and miner_crypto.py before installing dependencies, so the Linux signing dependency path is covered by the one-line installer flow.
  • The Linux requirements file includes both runtime pieces needed by the signing path: requests and PyNaCl.
  • The new checksum entries match the corresponding repository blobs for linux/rustchain_linux_miner.py, linux/fingerprint_checks.py, linux/miner_crypto.py, linux/requirements-miner.txt, and the existing macOS artifacts.
  • bash install-miner.sh --dry-run --wallet dry-run-wallet --skip-service exercises the updated download/install commands without starting the miner or touching services.
  • A fresh venv can install miners/linux/requirements-miner.txt, and both requests and nacl.signing import successfully.

Validation I ran:

  • bash -n install-miner.sh -> passed
  • python -m py_compile miners/linux/rustchain_linux_miner.py miners/linux/miner_crypto.py -> passed
  • fresh venv dependency install from miners/linux/requirements-miner.txt -> passed; requests and nacl.signing import OK
  • blob-level SHA-256 verification for the entries in miners/checksums.sha256 -> all checked artifacts matched
  • git diff --check origin/main...HEAD -- install-miner.sh miners/README.md miners/checksums.sha256 miners/linux/requirements-miner.txt -> passed

Small portability note, not a blocker for this PR: in my Windows checkout, miners/checksums.sha256 materialized with CRLF line endings (w/crlf), which makes local shasum -c checksums.sha256 treat each path as ending in \r. The committed blob itself is LF and the blob-level checksum verification passes, so the raw GitHub installer path should be fine. If Windows contributors commonly run the checksum command from a converted worktree, marking this checksum file with eol=lf would make local verification less surprising.

The broad GitHub test job is still red, but based on the failed-run context it appears to be the repo-wide CI pattern rather than a failure caused by this focused miner installer change.

Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! 🦀

Code review completed. Nice work! 🚀


Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG

Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution! 🔍 Reviewed and looks solid.

Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing to RustChain. Approved.

@JONASXZB JONASXZB force-pushed the codex/linux-miner-deps branch from ef02cb7 to 81ed981 Compare June 2, 2026 18:59
Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent PR! The code is well-organized with clear documentation.

@Scottcjn
Copy link
Copy Markdown
Owner

Scottcjn commented Jun 2, 2026

⏸️ This breaks the installer — referenced requirements files don't exist

Good idea (verify-and-install signing deps from a pinned requirements file), but the PR makes install-miner.sh do:

curl -sSL "$REPO_BASE/$REQUIREMENTS_FILE" -o requirements-miner.txt   # linux/ or macos/requirements-miner.txt
verify_sum "requirements-miner.txt" "$REQUIREMENTS_SUM"
pip install -r requirements-miner.txt

…but linux/requirements-miner.txt and macos/requirements-miner.txt are not in the repo, and this PR only changes install-miner.sh + checksums.sha256 — it doesn't add them. So curl 404s and the install aborts on the checksum check.

To fix: add both requirements-miner.txt files (with the actual signing deps — requests, cryptography/pynacl for Ed25519) in this same PR, and make sure their checksums in checksums.sha256 match the bytes you commit. Then the verify-and-install flow works.

Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing to RustChain. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) documentation Improvements or additions to documentation size/S PR: 11-50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux miner quickstart and installer miss PyNaCl/miner_crypto dependencies

4 participants