Skip to content

core: Remove fraud detection logic #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: chore/remove-rewards
Choose a base branch
from

Conversation

pyropy
Copy link
Contributor

@pyropy pyropy commented Jun 16, 2025

This pull request simplifies the evaluation process in lib/evaluate.js by removing the runFraudDetection function and replacing it with a streamlined approach for grouping and evaluating measurements. By removing the fraud detection all measurements are marked as valid and are accepted by the evaluation mechanism. It also updates related telemetry and test cases to reflect these changes.

Simplifications in Evaluation Logic:

  • Removed the runFraudDetection function and replaced it with an inline implementation that directly processes measurements marking them as valid using a generator function (iterateAcceptedMeasurements) to avoid array duplication. (lib/evaluate.js, [1] [2] [3]
  • Changed REQUIRED_COMMITTEE_SIZE from 30 to 1. (lib/evaluate.js, lib/evaluate.jsL3-R12)

Updates to Telemetry:

  • Removed telemetry for fraud_detection_duration_ms and retrieval_stats_honest, consolidating all retrieval stats under retrieval_stats_all. (lib/evaluate.js, [1] [2]

Test Case Adjustments:

  • Updated tests in test/evaluate.js to reflect the removal of runFraudDetection and the consolidation of telemetry points. This includes changes to expected telemetry data and test descriptions. (test/evaluate.js, [1] [2] [3] [4] [5]

Blocked by #569
Closes #574

@pyropy pyropy changed the title WIP: Remove fraud detection Remove fraud detection Jun 20, 2025
@pyropy pyropy marked this pull request as ready for review June 20, 2025 09:42
@pyropy pyropy changed the title Remove fraud detection core: Remove fraud detection logic Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant