Feat/emission share allocation#1216
Closed
tao-hunter wants to merge 2 commits into
Closed
Conversation
10 tasks
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
weight(used as a per-PR multiplier) withemission_share: each repo’s share of the unified 90% scoring pool (OSS_EMISSION_SHARE), enforced at round allocation inallocate_round_emissions, not in the per-PR multiplier chain.issue_discovery_shareonRepositoryConfig(default 0.5): splits each repo’s slice between PR scoring and issue discovery, with same-repo spill when one side has no eligible weight; recycle only when both sides are empty.repo_weightfrom earned-score math (legacy + mirror PRs + issue discovery);repo_weight_multiplier/discovery_repo_weight_multiplierstay 1.0 for DB/schema compatibility where needed.RECYCLE_UIDonly receives registry slack(1 − Σ emission_share) × OSS_EMISSION_SHAREand unclaimed per-repo slices (no redistribution to other repos). Treasury is a flat 10% to UID 111 (ISSUES_TREASURY_EMISSION_SHAREtrimmed from 15%).master_repositories.json:weight→emission_share, preserving relative weights and normalizing so Σ emission_share = 1.0. Loader validates[0, 1]per entry and Σ ≤ 1 (strict> 1→ empty registry).get_rewardsreturns evaluations only (no global OSS normalize);allocate_round_emissionsruns after issue discovery. CLIgitt miner scoreuses the same path; rewards JSON highlightsblended_final.RepositoryConfig(weight=...)intest_label_multiplier.pyandtest_load.pyupdated toemission_sharefor pyright/pytest.Related Issues
weightfrom unbounded multiplier toemission_share(bounded pool slice) #1215Type of Change
Testing
tests/validator/test_emission_allocation.py— allocation, slack, spill, slice vs PR count.tests/validator/test_load_weights.py—emission_shareinvariants + JSON fixtures.test_load/test_label_multiplierupdated forRepositoryConfig(emission_share=...).pytest+pyrightin CI / local (dev env:uv pip install -e ".[dev]"for pre-commit hooks).rewards.sum() ≈ 1.0when treasury + recycle UIDs exist on metagraph.Checklist