feat(validator): redistribute ineligible repo emissions to eligible repos#1547
Conversation
|
Nice work — this is a strict improvement (burn never goes up, slices conserve to The issue: repo eligibility is binary at the whole-repo level, but a repo can be partially eligible.
Proposed fix: split the repo into two piles and treat them separately.
So the multiplier applies to the scoring slice only, not the whole repo slice. Anything that would've burned — dead repos, the miner-half of maintainer-only repos, unclaimed maintainer cuts — flows into the scoring pool instead. Rough shape:
Conserves to You'll figure out the cleanest way to thread it — main thing is the maintainer pile and the scoring pile never touch. |
|
Good catch — addressed in 074808c. Split into the two piles you described:
One deviation from the literal sketch: I weight the scoring pool by each active repo's post-cut scoring share ( New tests lock it in:
603 tests green. |
…epos Ineligible repo slices (no maintainer, no scorers, no contributions) recycled to UID 0, burning emissions. Renormalize configured emission_share across only repos that pay a miner this round so the full configured pool is always released; registry slack (configured shares < 1.0) still recycles.
Address review: pay the maintainer cut at the repo's base rate (never scaled by redistribution) and redistribute only the scoring pool across repos with actual PR/issue scorers, weighted by post-cut scoring share. A maintainer-only repo's miner half now flows to active scorers instead of re-burning, and a maintainer's take no longer inflates when other repos go dead. Maintainer presence no longer marks a repo active. With no active repos the scoring pool recycles as before.
074808c to
c249c62
Compare
Problem
A repo assigned an
emission_sharebut with no eligible recipients this round (no registered maintainer, no PR/issue scorers, no contributions yet) recycled its entire slice toUID 0— burning those emissions instead of releasing them.Change
In
calculate_repo_emission_breakdown, renormalize configuredemission_shareacross only the repos that pay at least one miner this round, then scale each eligible repo's slice byconfigured_total / eligible_total. Ineligible repos' shares are redistributed to eligible repos in proportion to their configured weight, so the full configured pool is always released.issue_discovery_share < 1.0), issue scorers (when> 0.0), or a maintainer carve-out with a registered maintainer.< 1.0) is untouched and still recycles.Tests
test_empty_repo_slice_recycles_without_redistributionwith redistribution coverage (single eligible repo + weight-proportional split across multiple eligible repos).