Skip to content

fix wrong and bad comments#2838

Open
UnArbosSix wants to merge 2 commits into
devnet-readyfrom
fix-wrong-and-bad-comments
Open

fix wrong and bad comments#2838
UnArbosSix wants to merge 2 commits into
devnet-readyfrom
fix-wrong-and-bad-comments

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR corrects inaccurate or stale comments in Subtensor runtime, pallet, mock, and test files. The updates clarify current behavior around TAO weight scaling, set-weights normalization, childkey take scaling, owner cut auto-lock defaults, subnet netuid terminology, and default mock/runtime parameter comments.

Files of Interest

  • pallets/subtensor/src/macros/dispatches.rs: Updates set-weights and childkey take rustdoc to describe max-upscaled u16 values rather than percentage/sum-based semantics.
  • pallets/subtensor/src/staking/stake_utils.rs: Rewords TAO weight/stake comments to match the actual storage and stake-combination logic.
  • pallets/subtensor/src/lib.rs: Corrects default-value comments for DefaultTrue, DefaultCKBurn, and OwnerCutAutoLockEnabled.
  • runtime/src/lib.rs, chain-extensions/src/mock.rs, eco-tests/src/mock.rs, and pallet test mocks: Correct TAO weight percentage comments.
  • runtime/src/lib.rs: Bumps spec_version from 426 to 427 for the devnet-ready runtime change.

Behavioral Impact

No executable logic is changed. The PR only updates comments/rustdoc and the runtime spec_version.

Migration / Spec Version

No storage migration is introduced. spec_version is bumped to 427.

Testing

No runtime tests were added or run because the implementation logic is unchanged. Static review confirmed the edited comments match the nearby code paths.

@UnArbosSix UnArbosSix added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

eco-tests changed — indexer review required

This PR modifies files under eco-tests/. and may affect downstream indexing.
cc @evgeny-s — please review manually

Changed files
  • eco-tests/src/mock.rs

@github-actions github-actions Bot requested a review from evgeny-s July 8, 2026 03:40
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH scrutiny from new account / low public contribution graph, mitigated by repo write permission; no Gittensor association found; branch fix-wrong-and-bad-comments -> devnet-ready.

Findings

No findings.

Conclusion

Static review found documentation/comment corrections plus a runtime spec_version bump, with no hidden logic, dependency, build-script, workflow, or AI-review instruction changes. No security vulnerability or malicious pattern found.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor association UNKNOWN by allowlist/heuristic; author account is very new but has repo write permission, so review focused on whether the comment-only changes accurately describe existing behavior.

PR body was empty/trivial; the Auditor has auto-filled it. Please review.

Static audit found documentation/comment corrections plus the expected spec_version bump. The changed comments match the surrounding implementation: TAO weight is stored as a u64 normalized over u64::MAX, set-weights storage uses max-upscaled u16 values, childkey take is scaled by u16::MAX, and owner cut auto-lock defaults to false.

No duplicate PR appeared to be a better candidate; the overlapping PRs are broader feature/deployment/SDK changes rather than competing documentation fixes. I ran git diff --check; no whitespace errors were reported. I did not run cargo tests because this PR does not change executable logic.

Findings

No findings.

Conclusion

Approve: the PR is narrow, comment-only aside from the version bump, and the corrected comments align with the current code paths reviewed.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant