Alphabetical Bias in PoC Slot Allocation #700
Description
The current implementation of the ML node allocation logic in x/inference/module/model_assignment.go contains an alphabetical bias that affects the fairness of the network.
Alphabetical Bias: The allocation algorithm iterates through participants in deterministic alphabetical order. This allows participants with "vanity addresses" (lexicographical prefixes like gonka1aaa...) to have a significantly higher probability of receiving PoC slots, potentially starving honest participants with random addresses.
Impact
Economic Injustice: Participants are incentivized to mine vanity addresses rather than focus on hardware quality/uptime to increase their selection chances. Starvation: Honest hardware providers with random addresses receive fewer opportunities despite having equal or higher eligibility.
Proposed Solution
Deterministic Shuffle: Implement a pseudo-random shuffle of the participant list using SHA256(EpochIndex + ModelID) as a seed. This ensures fair rotation across epochs and models, providing equal opportunity to all eligible participants regardless of their address prefix.
💬 Comments (3)
Assign to me plz. Task already done.
701
@akup, I believe you worked on PoC Slot attack. Do you want to review these issues and PRs? Thanks
🔄 Auto-synced from Issue #700 every hour.
Fix submitted in PR #777 — adds a deterministic SHA256-seeded Fisher-Yates shuffle to
allocateMLNodePerPoCForModel, following the same pattern already used insampleEligibleParticipantsWithHistory. All 27 tests pass.