Skip to content

fix single-hotkey root claim quote - #3097

Open
UnArbosSix wants to merge 2 commits into
release-448from
fix/root-claim-hotkey-quote
Open

fix single-hotkey root claim quote#3097
UnArbosSix wants to merge 2 commits into
release-448from
fix/root-claim-hotkey-quote

Conversation

@UnArbosSix

Copy link
Copy Markdown
Collaborator

Description

@vercel

vercel Bot commented Aug 19, 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 21, 2026 2:59pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

#[pallet::call_index(148)]
#[pallet::weight(
<T as crate::pallet::Config>::WeightInfo::claim_root(crate::MAX_ROOT_CLAIM_WORK)
<T as crate::pallet::Config>::WeightInfo::claim_root(crate::MAX_ROOT_CLAIM_HOTKEY_WORK)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Single-hotkey claims can execute beyond their declared weight

This reduces the declaration to 129 units, but the call still uses root_claim_fits_declared_budget, whose budget remains MAX_ROOT_CLAIM_WORK (256). A single basket can contain historical/deregistered subnet rows beyond the current 128-subnet limit, so a claim with 130–256 rows passes admission and performs more work than declared. That permits under-accounted block execution and resource-exhaustion attacks. Give this call a 129-unit admission check, including its actual basket-row count, or retain the 256-unit declaration.

Suggested change
<T as crate::pallet::Config>::WeightInfo::claim_root(crate::MAX_ROOT_CLAIM_HOTKEY_WORK)
<T as crate::pallet::Config>::WeightInfo::claim_root(crate::MAX_ROOT_CLAIM_WORK)

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: VULNERABLE

HIGH scrutiny: account is under 90 days old with no public repos, though it has repository write access and substantial merged contributions; no Gittensor association found; branch fix/root-claim-hotkey-quote -> release-448.

Findings

Sev File Finding
HIGH pallets/subtensor/src/macros/dispatches.rs:1991 Single-hotkey claims can exceed their declared weight inline

Prior-comment reconciliation

  • b79553f1: not addressed — The declaration remains 129, while the invoked admission helper still uses the 256-unit coldkey-wide budget.

Conclusion

The prior vulnerability remains: the single-hotkey call declares only 129 work units while its unchanged admission check permits up to 256. The declared weight and admission ceiling must match before merge.


📜 Previous run (superseded)
Sev File Finding Status
HIGH pallets/subtensor/src/macros/dispatches.rs:1991 Single-hotkey claims can execute beyond their declared weight ➡️ Carried forward to current findings
The declaration remains 129, while the invoked admission helper still uses the 256-unit coldkey-wide budget.

# 🔍 AI Review — Auditor (domain review) has not yet run on this PR.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@UnArbosSix UnArbosSix changed the title Tighten single-hotkey root claim quote fix single-hotkey root claim quote Aug 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

Comment thread pallets/subtensor/src/macros/dispatches.rs
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

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.

1 participant