Repository navigation
fix(windows-miner): switch default node to https://rustchain.org with TLS verification and /health check (Refs #179) - #8706
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
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! |
Scottcjn
left a comment
There was a problem hiding this comment.
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_wallettests/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)
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:RUSTCHAIN_APIfrom deadhttp://50.28.86.131:8088tohttps://rustchain.org, with_normalize_node_url()upgrading legacy:8088URLs._tls_verify()/_request_kwargs()keeping TLS verification strictly enabled (system CA store default, honoringRUSTCHAIN_CA_BUNDLEor~/.rustchain/node_cert.pem; neververify=False).check_node_health()(GET /health).miners/windows/rustchain_miner_setup.bat&setup_miner.py:MINER_SHA256(6800122ff10831e12a2a123c53c8c121cc3aa7630c5e0b6fb9da87a0e4b6e13e).tests/test_windows_miner_tls_health_179.py:# 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-> exit0python miners/windows/check_bootstrap_hashes.py->Windows bootstrap hashes are in sync.python tools/check_relative_links.py-> OKpython tools/bcos_spdx_check.py --base-ref origin/main->OKpython tools/falsegreen/falsegreen.py . --diff origin/main --min-sev HIGH->0 finding(s)pytest(12 Windows/TLS/checksum suites) ->53 passed in 2.33sRustChainMiner.check_node_health()againsthttps://rustchain.org/health->{'ok': True, 'status_code': 200, 'version': '2.2.1-rip200'}Wallet:
RTCfe0ac752b80e543048c0d91e7dddd1277678b8a5Beacon Agent ID:
bcn_fe0ac752b80e