Skip to content

Spec 466: cap staking scan fees at four hotkeys - #3181

Merged
unarbos merged 3 commits into
mainfrom
cursor/spec-466-safer-3180-e52d
Sep 18, 2026
Merged

unarbos merged 3 commits into
mainfrom
cursor/spec-466-safer-3180-e52d

Conversation

@unarbos

@unarbos unarbos commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #3180 onto current main (spec 465 → 466).

Caps the staking-hotkey scan fee at four hotkeys. Full 256-hotkey execution weight stays for block admission. Native block budget goes 4s → 12s so a 65-item transfer_stake batch fits (PayTAO / Lium). EVM and scheduler budgets stay on the old 4s reference.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

What this is

What this is not

Checklist

Open in Web Open in Cursor 

UnArbosFour and others added 3 commits September 18, 2026 00:27
Drop unused Get import. Bring SwapHandler into scope so
get_alpha_amount_for_tao compiles. Bump spec 466 so the
train can move past live 465.

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
subtensor Building Building Preview Sep 18, 2026 12:29am UTC

Request Review

@unarbos
unarbos merged commit dfdfba1 into main Sep 18, 2026
42 of 45 checks passed
@unarbos

unarbos commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@IntiTechnologies spec 466 Propose is the one to approve.

This is a fee cap for transfer_stake (and other stake-exit calls). After 464, the 256-hotkey scan bound made declared weight ~64× and broke client payouts (PayTAO / Lium and others). 466 charges the scan fee at four hotkeys. Full execution weight stays for block admission. Native block budget is 12s so a 65-item batch fits. EVM / scheduler stay on the old 4s budget.

Train: https://github.com/RaoFoundation/subtensor/actions/runs/35291554030
Merge: dfdfba159d675b532ac61d6ccea3745e34cf1bcc (#3181)
Live before this train: devnet 465, testnet 465, finney 464

Approve this 466 Propose, not leftover 465 on https://github.com/RaoFoundation/subtensor/actions/runs/35267938998 (cancelled; already deployed 465 everywhere except finney) and not leftover 464 Watch https://github.com/RaoFoundation/subtensor/actions/runs/35262050154.

BasketTradingEnabled stays off. Do not sudo-enable baskets. Do not merge #3135. Do not approve until I confirm Sudo-upgrade mainnet clone and test on this merge is green — I will report if that job goes red.

After you approve, signers:

btcli upgrade sign --url https://github.com/RaoFoundation/subtensor/releases/tag/v466 -w <your-wallet>

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

LOW contributor risk / baseline scrutiny: write-access maintainer with substantive merged history; no listed Gittensor association. Branch targets main; cherry-picked authorship is explained.

Reviewed all 10 changed files and traced fee discounts through dispatch weights, wrappers, and settlement. No dependency, CI, or review-policy changes.

Static analysis only; block timing remains unverified. git diff --check passed; git status --short was clean. Builds, tests, and formatting tools were not run under Skeptic restrictions.

Findings

No findings.

Conclusion

No malicious behavior or concrete security vulnerability found. Fee discounts preserve execution-weight accounting, while EVM and scheduler budgets retain their previous limits.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Established contributor with write access and substantial merged history; Gittensor association UNKNOWN.

Reviewed all 10 changed files, fee settlement, wrapper traversal, RPC estimates, and added regression tests. Execution-weight accounting remains intact; EVM and scheduler budgets retain their previous limits. Spec version increases to 466.

This PR is the better candidate. Recommend closing #3180. Comparison with its final commit confirms the same implementation and tests plus the stated import fixes and spec updates. Other overlapping PRs address different features.

Validation: git diff --check passed; git status --short was clean. cargo fmt --check --all could not complete because rustup required writing to its read-only temporary directory. Python Ruff checks were skipped because uv and the existing SDK environment were unavailable. Builds and tests were left to CI; no files were modified.

Findings

No findings.

Conclusion

No substantive correctness issue found. The implementation matches the stated fee-cap policy and preserves full execution-weight accounting.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@unarbos

unarbos commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@IntiTechnologies the 466 Propose from this merge (dfdfba1, 12s block budget) is void. Jacob dropped the block-budget change.

Approve the new fee-cap-only 466 instead: #3182 / train https://github.com/RaoFoundation/subtensor/actions/runs/35292102814 / merge cdffbe2f7ab0c37ab07884387bfbd6443dca178d.

This branch was successfully deployed

1 active deployment
Preview — 54183849 Deployed Sep 18, 2026 by vercel[bot]
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.

2 participants