Skip to content

Restore miner-burn emission scaling - #3071

Open
UnArbosSix wants to merge 3 commits into
mainfrom
fix/restore-miner-burn-scaling
Open

Restore miner-burn emission scaling#3071
UnArbosSix wants to merge 3 commits into
mainfrom
fix/restore-miner-burn-scaling

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Restore the miner-burn adjustment to cross-subnet emission allocation. A subnet’s normalized EMA-price share should be scaled by the portion of miner incentive that was not withheld, so subnet-owner-directed miner emission affects its network-wide allocation regardless of whether that value is recycled or burned.

Changes

  • Restore price_share × (1 − MinerBurned) weighting in pallets/subtensor/src/coinbase/subnet_emissions.rs.
  • Renormalize burn-adjusted weights before applying the emission gate.
  • Fall back to unadjusted price shares when every burn-adjusted weight is zero, preventing emission from being stranded.
  • Keep MinerBurned independent of the subnet’s RecycleOrBurn configuration.
  • Update emission documentation, release notes, website calculations, snapshot generation, and snapshot data to match runtime behavior.

Economic behavior

For subnet i, the runtime computes:

demand_share_i = price_ema_i / Σ price_ema
burn_adjusted_share_i = demand_share_i × (1 − miner_burned_i)
                        / Σ(demand_share × (1 − miner_burned))
final_share_i ∝ burn_adjusted_share_i × gate(burn_adjusted_share_i)

MinerBurned is clamped to one and all runtime arithmetic uses saturating fixed-point operations. If all adjusted weights are zero, allocation reverts to normalized EMA-price shares.

Files of interest

  • pallets/subtensor/src/coinbase/subnet_emissions.rs
  • pallets/subtensor/src/coinbase/run_coinbase.rs
  • pallets/subtensor/src/tests/subnet_emissions.rs
  • docs/concepts/emissions.mdx
  • website/apps/bittensor-website/src/lib/emission-math.ts

Testing

Added regression coverage for unequal miner-burn values, a fully burned subnet, and the all-subnets-fully-burned fallback.

Runtime and migration impact

This changes runtime economic behavior but introduces no storage migration. The existing runtime spec_version is 444, above the referenced Finney snapshot version 443, so no additional bump is required for the main-branch check.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview Aug 11, 2026 7:11pm

Request Review

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH scrutiny by account tier (40-day-old account, zero public repos), mitigated by repository write access and substantive merged history; no Gittensor association found. Branch fix/restore-miner-burn-scaling -> main.

Findings

No findings.

Conclusion

Static analysis found no malicious behavior or security vulnerability. The bounded fixed-point change restores the prior miner-burn scaling formula, safely handles zero aggregate weight, preserves the AI review trust boundary, and includes the required runtime version bump.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor association UNKNOWN; established repository contributor with write access and substantial recent subtensor contributions.

Description discrepancy

The branch bumps spec_version from 444 to 445, but the runtime-impact paragraph still describes 444 as the current local version and says no additional bump was required. The implementation otherwise consistently applies miner-burn scaling before the gate, safely handles the all-zero fallback, and includes appropriate boundary regression coverage.

Findings

Sev File Finding
LOW PR body — Runtime and migration impact PR body reports the wrong spec version (off-diff)

Other findings

  • [LOW] PR body reports the wrong spec version (PR body — Runtime and migration impact) — The branch changes runtime/src/lib.rs from spec 444 to 445, while this paragraph says the local version remains 444 and no additional bump is required. Replace it with: “This changes runtime economic behavior but introduces no storage migration. The runtime spec_version is bumped from 444 to 445.”

Prior-comment reconciliation

  • bba6a947: not addressed — The runtime-impact paragraph still reports spec version 444 despite the implemented bump to 445.

Conclusion

The runtime change is coherent, uses safe fixed-point arithmetic, and is adequately tested. The stale PR-body statement is non-blocking but should be corrected.


📜 Previous run (superseded)
Sev File Finding Status
LOW PR body — Runtime and migration impact PR body reports the wrong spec version ➡️ Carried forward to current findings
The runtime-impact paragraph still reports spec version 444 despite the implemented bump to 445.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive self-requested a review August 11, 2026 17:33
@UnArbosSix
UnArbosSix force-pushed the fix/restore-miner-burn-scaling branch from 29ee1b8 to aec9c86 Compare August 11, 2026 19:08
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFour UnArbosFour reopened this Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot mentioned this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants