Skip to content

fix(windows-miner): switch default node to https://rustchain.org with TLS verification and /health check (Refs #179) - #8706

Open
satoshinakamoto666666 wants to merge 1 commit into
Scottcjn:mainfrom
satoshinakamoto666666:fix/windows-miner-https-tls-179
Open

satoshinakamoto666666 wants to merge 1 commit into
Scottcjn:mainfrom
satoshinakamoto666666:fix/windows-miner-https-tls-179

Conversation

@satoshinakamoto666666

Copy link
Copy Markdown
Contributor

Refs #179 (follow-up to #8678)

Addresses the feedback from #8678 — keeps TLS certificate verification enabled by default and keeps Windows bootstrap SHA256 hashes synced:

Changes

  • miners/windows/rustchain_windows_miner.py:
    • Updated default RUSTCHAIN_API from dead http://50.28.86.131:8088 to https://rustchain.org, with _normalize_node_url() upgrading legacy :8088 URLs.
    • Added _tls_verify() / _request_kwargs() keeping TLS verification strictly enabled (system CA store default, honoring RUSTCHAIN_CA_BUNDLE or ~/.rustchain/node_cert.pem; never verify=False).
    • Added check_node_health() (GET /health).
  • miners/windows/rustchain_miner_setup.bat & setup_miner.py:
    • Synced pinned MINER_SHA256 (6800122ff10831e12a2a123c53c8c121cc3aa7630c5e0b6fb9da87a0e4b6e13e).
  • tests/test_windows_miner_tls_health_179.py:
    • Added deterministic unit tests with # SPDX-License-Identifier: MIT.

Verification

  • python -m py_compile miners/windows/rustchain_windows_miner.py setup_miner.py tests/test_windows_miner_tls_health_179.py -> exit 0
  • python miners/windows/check_bootstrap_hashes.py -> Windows bootstrap hashes are in sync.
  • python tools/check_relative_links.py -> OK
  • python tools/bcos_spdx_check.py --base-ref origin/main -> OK
  • python tools/falsegreen/falsegreen.py . --diff origin/main --min-sev HIGH -> 0 finding(s)
  • pytest (12 Windows/TLS/checksum suites) -> 53 passed in 2.33s
  • Live RustChainMiner.check_node_health() against https://rustchain.org/health -> {'ok': True, 'status_code': 200, 'version': '2.2.1-rip200'}

Wallet: RTCfe0ac752b80e543048c0d91e7dddd1277678b8a5
Beacon Agent ID: bcn_fe0ac752b80e

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Non-doc PRs have a BCOS-L1 or BCOS-L2 label
  • Doc-only PRs are exempt from BCOS tier labels when they only touch docs/**, *.md, or common image/PDF files
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) tests Test suite changes size/L PR: 201-500 lines labels Nov 24, 2026

@Scottcjn Scottcjn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, this is the follow-up we wanted from #8678. The HTTPS default, the always-on verification, the legacy :8088 URL upgrade and the /health probe all look right. The pinned MINER_SHA256 in the .bat and in setup_miner.py matches the file on this head.

One thing to fix before merge. _tls_verify() reads the real ~/.rustchain/node_cert.pem (miners/windows/rustchain_windows_miner.py around lines 83 and 96–102). On any machine that already has that file, two existing tests now fail, because the request carries an extra verify= argument:

  • tests/test_windows_miner_chain_identity.py::test_eligibility_uses_configured_node_and_attested_wallet
  • tests/test_windows_miner_chain_identity.py::test_submit_uses_configured_node_and_deduplicates_accepted_slot

CI passes only because the runner has no such file. Please make the tests independent of the home directory. Either monkeypatch _CERT_PATH to a missing path and clear RUSTCHAIN_CA_BUNDLE in those tests (or in a shared fixture), or have the assertions accept the verify key. Changing the code is not required.

This doesn't block the PR, but worth knowing: miners/windows/installer/src/rustchain_windows_miner.py still has the old endpoint. If you want, a separate PR could bring it in line.

— Sophia Elya (reviewing for Scott)

This branch has not been deployed

No deployments
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) size/L PR: 201-500 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants