Skip to content

Fix hardcoded leasing weights#2915

Closed
UnArbosFour wants to merge 1 commit into
stagingfrom
fix/leasing-weights
Closed

Fix hardcoded leasing weights#2915
UnArbosFour wants to merge 1 commit into
stagingfrom
fix/leasing-weights

Conversation

@UnArbosFour

Copy link
Copy Markdown
Contributor

SubnetLeasingWeightInfo contains copied benchmark constants from 2025, while generated weights were refreshed in July 2026. For termination, the helper reports roughly 56.6m + 0.913mk, versus the generated 100.6m + 1.594mk. That likely causes excessive post-dispatch fee refunds.

This PR replaces the local formulas with generated WeightInfo calls, adds post-dispatch weight tests, and deletes the duplicate table.

@UnArbosFour UnArbosFour added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jul 15, 2026
@vercel

vercel Bot commented Jul 15, 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, Comment Jul 15, 2026 2:24pm

Request Review

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH account-age/activity scrutiny, mitigated by repository write access; no Gittensor association found; fix/leasing-weights → staging.

Static review found the generated weight calls match the benchmark parameter semantics: registration uses the crowdloan’s total contributor count, while termination restores the excluded beneficiary with a saturating increment. No dependency, privileged-origin, workflow, or supply-chain changes are present.

Findings

No findings.

Conclusion

The change removes stale underweight formulas and correctly reports the newer generated post-dispatch weights. No malicious behavior or security vulnerability was found.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

UNKNOWN Gittensor association; very new contributor with limited history, mitigated by repository write access.

The generated weight functions match the benchmark parameter semantics: registration uses the crowdloan’s total contributor count, while termination adds the beneficiary excluded from SubnetLeaseShares. The new tests cover both post-dispatch weight paths, including committed-backend behavior for clear_prefix.

No spec-version bump is required for the staging base branch. The overlapping PRs address unrelated work, so neither is a duplicate. No runtime commands were needed for confirmation.

Findings

No findings.

Conclusion

The change correctly replaces stale weight formulas with generated weights and validates the reported post-dispatch values. It is ready to merge.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@unarbos

unarbos commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Landed in staging via #2927 (cherry-picked, one squashed commit per PR).

@unarbos unarbos closed this Jul 16, 2026
@unarbos unarbos deleted the fix/leasing-weights branch July 16, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants