Skip to content

Reject deterministic failures before block inclusion - #3040

Open
UnArbosSix wants to merge 3 commits into
mainfrom
fix/prevalidate-commitment-failures
Open

Reject deterministic failures before block inclusion#3040
UnArbosSix wants to merge 3 commits into
mainfrom
fix/prevalidate-commitment-failures

Conversation

@UnArbosSix

Copy link
Copy Markdown
Collaborator

Value

This change prevents the two largest deterministic extrinsic failure classes before block inclusion.

Failure prevented Last 30 days Validation added Estimated reduction
CommittingWeightsTooFast 448,600 failures Check the signer’s commit rate limit for the correct subnet/mechanism lane ~3.1 GB/year
AccountNotAllowedCommit 156,220 failures Check that the subnet exists and the signer is registered on it ~0.5 GB/year
Total 604,820 failures Reject invalid transactions before dispatch ~3.6 GB/year

At the report’s measured run rate, this removes approximately 69% of landed failures and 3.6 GB/year of failed extrinsic and ExtrinsicFailed event payload—about 71% of the report’s total ~5 GB/year failure flow.

Validation changes

  • set_commitment

    • Reject if the subnet does not exist.
    • Reject if the signer is not registered on the subnet.
    • Account for both validation storage reads.
  • Weight commits

    • Apply the existing commit-rate check to:
      • commit_timelocked_weights
      • commit_timelocked_mechanism_weights
      • commit_crv3_mechanism_weights
    • Resolve mechanism commits to their mechanism-specific rate-limit lane.
    • Add a transaction-pool provides tag keyed by signer and subnet/mechanism so competing commits cannot coexist in the pool.

Successful commitment behavior and the runtime transaction format remain unchanged.

@vercel

vercel Bot commented Aug 4, 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 4, 2026 5:49pm

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.

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

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: VULNERABLE

VERY HIGH scrutiny: 33-day-old account with 0 public repositories; mitigated by repository write permission and substantive merged contributions. No Gittensor association found. Branch targets main.

Findings

Sev File Finding
CRITICAL pallets/subtensor/src/extensions/subtensor.rs:94 Bump the runtime spec version inline

Prior-comment reconciliation

  • bfc6e820: not addressedruntime/src/lib.rs still declares spec_version: 442.

Conclusion

The runtime-affecting transaction-validation changes still leave spec_version at 442, risking native/Wasm behavior divergence during rollout. The prior blocking concern remains unresolved.


📜 Previous run (superseded)
Sev File Finding Status
CRITICAL pallets/subtensor/src/extensions/subtensor.rs:94 Bump the runtime spec version ➡️ Carried forward to current findings
runtime/src/lib.rs still declares spec_version: 442.

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@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/extensions/subtensor.rs
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@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.

return Ok(());
};

CheckColdkeySwap::<T>::check(who, call)?;

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.

[CRITICAL] Bump the runtime spec version

This changes runtime transaction validation while runtime/src/lib.rs still declares spec_version: 442. During rollout, a node containing this native runtime may substitute it for the existing on-chain Wasm runtime with the same version, causing nodes to apply different validation behavior. Increment VERSION.spec_version for this runtime-affecting change.

@github-actions

github-actions Bot commented Aug 4, 2026

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