Skip to content

fix: anti-double-mining — one machine, one reward per epoch #1449

@Scottcjn

Description

@Scottcjn

Anti-Double-Mining Fix (2026-03-16)

Problem

A single machine could run two miner instances with different wallet names and earn double rewards. The hardware binding check catches different hardware_ids, but if the old and new miners compute slightly different hardware hashes (different field names in device payload), both pass binding and enroll in the same epoch.

Root Cause

Found on the Mac Pro trashcan — an old v2.5 miner (auto-generated wallet x86_64_c03ce...RTC) and a new v3 miner (wallet trashcan-d500-scott) were both attesting and enrolling simultaneously on the same hardware.

Fix

Added MAC address overlap detection at enrollment time in submit_attestation():

  1. When a wallet enrolls in an epoch, compute its MAC hashes
  2. Query miner_macs + epoch_enroll for any OTHER wallet sharing MACs in the same epoch
  3. If overlap found: set enrollment weight to 0.0 — one machine, one reward
  4. Log the duplicate for auditing: [DOUBLE-MINE] wallet shares MACs with [other_wallet]

The first wallet to enroll keeps its weight. The duplicate gets zero.

Deployed

All 3 attestation nodes updated and restarted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions