From b0f349c3a61ac47b6c1db8ed1dbb10ba8d24cce1 Mon Sep 17 00:00:00 2001 From: Xeophon <508704820@qq.com> Date: Wed, 13 May 2026 02:15:48 +0800 Subject: [PATCH] FIX(#4855): implement proof hash verification in validate_response() - Recompute expected proof hash from response data - Compare against submitted proof_hash - Mismatch penalizes confidence by 50 points - Prevents emulators from submitting fake proofs --- rips/rustchain-core/src/anti_spoof/mutating_challenge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rips/rustchain-core/src/anti_spoof/mutating_challenge.py b/rips/rustchain-core/src/anti_spoof/mutating_challenge.py index c3b83219c..ea98977fc 100644 --- a/rips/rustchain-core/src/anti_spoof/mutating_challenge.py +++ b/rips/rustchain-core/src/anti_spoof/mutating_challenge.py @@ -404,7 +404,10 @@ def validate_response( confidence -= 20.0 # 5. Verify proof hash (must have correct round count) - # In production, we'd recompute and verify + expected_proof = response.compute_proof(challenge, b'') + if response.proof_hash and response.proof_hash != expected_proof: + failures.append("Proof hash mismatch - possible emulator") + confidence -= 50.0 valid = confidence >= 50.0