Skip to content

Self-solved issues falsely satisfy valid_solved_count eligibility gate #386

@Grizouforever

Description

@Grizouforever

Description

In gittensor/validator/issue_discovery/scoring.py, function _collect_issues_from_prs, the line data.valid_solved_count += 1 executes before the same-account guard:

if pr.token_score >= MIN_TOKEN_SCORE_FOR_BASE_SCORE:
    data.valid_solved_count += 1

# Same-account: discoverer == solver → 0 score but credibility counts
if discoverer_id == pr.github_id:
    continue

A miner who discovers an issue and then self-solves it with a qualifying PR will have that issue counted toward valid_solved_count. If the miner does this 7+ times they can satisfy the eligibility gate for the issue discovery reward pool without having any legitimately third-party-solved discoveries.

Steps to Reproduce

  1. Miner creates issues on a repo.
  2. Miner opens PRs that solve those same issues (self-solve).
  3. Each self-solved issue increments valid_solved_count before the discoverer_id == pr.github_id guard skips it.
  4. After enough self-solves, valid_solved_count reaches the threshold and the miner is considered eligible for the discovery pool.

Expected Behavior

valid_solved_count should only count issues solved by a different account than the discoverer. The increment should occur after (or be gated by) the same-account check.

Actual Behavior

Self-solved issues inflate valid_solved_count, allowing miners to unlock the reward pool without legitimate cross-account issue discovery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions