Skip to content

Merge staging into main#2930

Closed
UnArbosFive wants to merge 12 commits into
mainfrom
staging
Closed

Merge staging into main#2930
UnArbosFive wants to merge 12 commits into
mainfrom
staging

Conversation

@UnArbosFive

Copy link
Copy Markdown
Contributor

Summary

Promote the current staging branch to main.

  • restore and harden public multi-architecture localnet image publication
  • publish only the native images that passed smoke testing, using immutable digest handoff
  • add the SS58 balance precompile and accompanying SDK/documentation updates
  • correct leasing weights and optimize hotkey-swap stake iteration
  • remove build warnings and resolve remaining dependency security alerts

Included changes

Scope

  • 12 commits
  • 51 files changed
  • 2,744 insertions and 1,255 deletions

Validation

The included changes were validated in their staging PRs. This promotion PR runs the full main-target check suite before merge.

unarbos and others added 12 commits July 16, 2026 11:37
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ixes, no diff

Co-authored-by: Cursor <cursoragent@cursor.com>
Consolidate pending PRs into staging
…-hotkey

reuse canonical alpha iterator helper
* Publish tested localnet images

* Make localnet publication immutable

* Pin localnet publication tooling revision
@vercel

vercel Bot commented Jul 16, 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 16, 2026 4:53pm

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 on lines +29 to +31
fn prepare_hotkey_stake(old_hotkey: &T::AccountId) -> PreparedHotkeyStake<T::AccountId> {
let positions: Vec<(T::AccountId, NetUid, SafeFloat)> =
Self::alpha_iter_single_prefix(old_hotkey).collect();

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] Unbounded stake positions exceed the fixed dispatch weight

This collects every stake position under a user-populatable hotkey and later performs storage operations for each position. However, swap_hotkey() charges a fixed weight benchmarked with exactly 1,273 positions; the added test explicitly permits more than the former cap. An attacker can create a larger prefix and make execution exceed its declared weight, potentially exhausting block resources. Enforce a protocol-level maximum before mutation or parameterize/conservatively bound the weight by the number of positions.

@github-actions

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: VULNERABLE

BASELINE scrutiny — repository admin with substantial merged history; staging → main promotion, no known Gittensor association.

The runtime changes include an unbounded stake migration charged using a fixed incident-sized benchmark, and they retain the existing runtime specification version.

Findings

Sev File Finding
HIGH runtime/src/lib.rs Runtime behavior changed without a specification-version bump (off-diff)
HIGH pallets/subtensor/src/swap/swap_hotkey.rs:31 Unbounded stake positions exceed the fixed dispatch weight inline

Other findings

  • [HIGH] Runtime behavior changed without a specification-version bump (runtime/src/lib.rs) — This PR changes consensus runtime behavior in pallets/subtensor and registers a new balance precompile, but runtime/src/lib.rs remains at spec_version: 431. Runtime-affecting releases require a new specification version so nodes and release tooling can distinguish the new Wasm. Increment spec_version before merging.

Conclusion

The PR is legitimate-looking, but the unbounded hotkey-swap workload and missing spec_version bump are merge-blocking runtime safety issues.


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

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

IntiTechnologies pushed a commit that referenced this pull request Jul 16, 2026
Bring in the staging→main promotion: localnet publication, SS58 balance
precompile, leasing/hotkey-swap fixes, and dependency cleanups.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	website/package.json
#	website/yarn.lock
@UnArbosFive

Copy link
Copy Markdown
Contributor Author

Superseded by #2910

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.

3 participants