fix(#8078): require evidence for fingerprint checks claiming a pass [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] - #8079
Open
waterWang wants to merge 1 commit into
Conversation
…a pass [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]
Contributor
|
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! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix: Require evidence for fingerprint checks claiming a pass (#8078)
Problem
A VM (
prometheusvt) is passing all six fingerprint checks on the live node by submitting a flat map of sixtruevalues with nodataobject, no measurements, no evidence of any kind. The server accepted it and setfingerprint_passed = 1.The root cause is in
_fingerprint_check_passed(): a dict entry like{"passed": true}with nodatakey was treated as a full pass. The rotating check system could not distinguish "this hardware cannot measure it" (legitimate vintage/console miners) from "this client did not bother to submit evidence" (the bypass).Fix
_fingerprint_check_passed()now returnsNone(unmeasured) instead ofTruewhen a dict check has{"passed": true}but nodatakey, or whendatais not a usable dict. Bool-only entries (C miner compat) keep their literal value.evaluate_rotating_fingerprint_checks()now excludesNone(unmeasured) results from the active-ratio denominator. Unmeasured checks are neither passes nor failures — they don't count either way. This is the proportional-evidence rule: the weight of a check scales with the evidence submitted.Impact
{"clock_drift": true, "cache_timing": true, ...}with no data → all 6 checks count as unmeasured → active_ratio = 1.0 (no active checks measured) → no reward weight from the rotating check system{"clock_drift": {"passed": true, "data": {"cv": 0.09, "samples": 200}}, ...}with real data → all 6 checks pass normally → full weighttime.perf_counter_ns) already omit that check from the payload → the check is absent →checks.get(name)returnsNone→Noneis unmeasured → excluded from the ratio. No regression.References
vm_indicatorscase; this PR covers the no-data-at-all case)