Skip to content

fix(rewards): apply collateral in repo allocation#1272

Open
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/repo-allocation-collateral
Open

fix(rewards): apply collateral in repo allocation#1272
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/repo-allocation-collateral

Conversation

@Desel72
Copy link
Copy Markdown
Contributor

@Desel72 Desel72 commented May 14, 2026

Summary

Applies finalized open-PR collateral when collecting repo-local PR allocation scores, so contributors with collateral are allocated from merged earned_score - same-repo collateral_score clamped at zero.

This keeps no-collateral allocation proportional to merged PR scores while making repo-bounded emission allocation agree with the collateral-adjusted scoring output.

Related Issues

Fixes #1266

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested
uv run pytest tests/validator/test_blend_emission_pools.py -q
uv run ruff check gittensor/validator/emission_allocation.py tests/validator/test_blend_emission_pools.py
uv run ruff format --check gittensor/validator/emission_allocation.py tests/validator/test_blend_emission_pools.py

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Repo allocation ignores open-PR collateral deductions

1 participant