Skip to content

Read ss58 Balance Precompile#2916

Open
UnArbosSix wants to merge 3 commits into
mainfrom
read-ss58-balance-precompile
Open

Read ss58 Balance Precompile#2916
UnArbosSix wants to merge 3 commits into
mainfrom
read-ss58-balance-precompile

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds a precompile to read an ss58 balance from a smart contract

@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 3:33pm

Request Review

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: VULNERABLE

VERY HIGH scrutiny: 13-day-old account with no public repos, mitigated by repository write permission; no Gittensor association or author/committer mismatch. Branch targets main.

The balance lookup is bounded, charges for one database read, and exposes public chain state. No malicious behavior, dependency changes, or modifications to trusted review instructions were found.

Findings

Sev File Finding
HIGH runtime/src/lib.rs:238 Runtime behavior changed without a spec-version bump (off-diff)

Other findings

  • [HIGH] Runtime behavior changed without a spec-version bump (runtime/src/lib.rs:238) — This PR adds and enables a runtime precompile while leaving spec_version at 431. Nodes may treat stale native code and the changed Wasm runtime as interchangeable, risking divergent execution. Increment spec_version.

Prior-comment reconciliation

  • 9b64c225: not addressedruntime/src/lib.rs still declares spec_version: 431; the PR adds no spec-version bump.

Conclusion

The implementation appears legitimate, but enabling a new runtime precompile without incrementing spec_version creates a native/Wasm consensus risk and must be fixed before merge.


📜 Previous run (superseded)
Sev File Finding Status
HIGH runtime/src/lib.rs:238 Runtime behavior changed without a spec-version bump ➡️ Carried forward to current findings
runtime/src/lib.rs still declares spec_version: 431; the PR adds no spec-version bump.

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

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@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