Skip to content

Follow-up for dynamic tempo - removing deprecated activity cutoff#2774

Open
evgeny-s wants to merge 10 commits into
devnet-readyfrom
chore/dynamic-tempo-cleanup
Open

Follow-up for dynamic tempo - removing deprecated activity cutoff#2774
evgeny-s wants to merge 10 commits into
devnet-readyfrom
chore/dynamic-tempo-cleanup

Conversation

@evgeny-s

@evgeny-s evgeny-s commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up PR for #2638:

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@evgeny-s evgeny-s added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 22, 2026
@github-actions

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
  • eco-tests/src/tests_taocom_indexer.rs

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

BASELINE scrutiny: established 2012 account with repository write permission and substantial subtensor PR history; no Gittensor allowlist/index hit; branch chore/dynamic-tempo-cleanup -> devnet-ready.

Static review found no protected .github/ai-review/* or .github/copilot-instructions.md changes, no dependency or build-script changes, and no suspicious runtime execution path. The cleanup preserves dynamic-tempo conversion by reading legacy ActivityCutoff through a local storage alias before the new cleanup migration removes the legacy storage, and the replacement set_activity_cutoff_factor path keeps owner/root authorization with bounded factor checks.

Findings

No findings.

Conclusion

No malicious intent or security vulnerability was identified in the reviewed diff. The migration ordering, storage cleanup, API removal, and runtime proxy update are consistent with the prior dynamic-tempo migration model.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor: LIKELY by heuristic; author has write permission and substantial recent Subtensor PR activity, with no direct allowlist/index hit.

Static review covered the legacy ActivityCutoff / MinActivityCutoff removal, the retained storage alias used by migrate_dynamic_tempo, hook ordering that converts legacy cutoff values before deleting legacy storage, admin-utils and precompile API removal, runtime proxy filter update, and migration tests for wiping legacy storage.

spec_version is bumped from 423 to 424. git diff --check passed. I did not run targeted tests because no finding required runtime confirmation.

Findings

No findings.

Conclusion

Approving: the cleanup is coherent, migration ordering preserves the dynamic-tempo conversion path, and the new storage cleanup is covered by focused migration tests. The PR body’s “merge after dynamic tempo mainnet release” note remains a human merge-timing constraint, not a code finding.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@evgeny-s evgeny-s changed the title Follow-up for dynamic tempo - removing deprecated activity cutoff [DO NOT MERGE] Follow-up for dynamic tempo - removing deprecated activity cutoff Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

# Conflicts:
#	pallets/admin-utils/src/weights.rs
@evgeny-s evgeny-s changed the base branch from feat/configure-max-epochs-per-block to devnet-ready June 24, 2026 11:08

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

fn sudo_set_difficulty() -> Weight;
fn sudo_set_adjustment_interval() -> Weight;
fn sudo_set_target_registrations_per_interval() -> Weight;
fn sudo_set_activity_cutoff() -> Weight;

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] Remove the stale generated weight implementations too

Deleting this trait item leaves two generated sudo_set_activity_cutoff() implementations in this same file, around pallets/admin-utils/src/weights.rs:367 and pallets/admin-utils/src/weights.rs:1333. Those methods are no longer members of WeightInfo, and Rust trait impls cannot define extra associated methods, so pallet-admin-utils will not compile after this cleanup. Regenerate pallets/admin-utils/src/weights.rs or manually remove both stale method blocks along with this trait item.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👎

@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/admin-utils/src/weights.rs Outdated
fn sudo_trim_to_max_allowed_uids() -> Weight;
fn sudo_set_min_non_immune_uids() -> Weight;
fn sudo_set_max_epochs_per_block() -> Weight;
fn sudo_set_activity_cutoff() -> Weight;

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.

[LOW] Remove the stale generated activity-cutoff weight stub

sudo_set_activity_cutoff was removed from pallets/admin-utils/src/lib.rs and its benchmark was deleted, but the generated WeightInfo trait still exposes the method and both generated impls still define it against the removed SubtensorModule::ActivityCutoff / MinActivityCutoff storage. This no longer appears to be the compile-breaking mismatch from the prior run because the trait and impls are internally consistent, but it leaves dead generated weight code for an extrinsic this PR removes. Regenerate pallets/admin-utils/src/weights.rs or delete the stale trait item and the two sudo_set_activity_cutoff impl blocks.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

# Conflicts:
#	contract-tests/src/contracts/subnet.ts
#	contract-tests/src/subtensor.ts
#	contract-tests/test/staking.precompile.reward.test.ts

@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/admin-utils/src/weights.rs Outdated
fn sudo_trim_to_max_allowed_uids() -> Weight;
fn sudo_set_min_non_immune_uids() -> Weight;
fn sudo_set_max_epochs_per_block() -> Weight;
fn sudo_set_activity_cutoff() -> Weight;

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.

[LOW] Remove the stale generated activity-cutoff weight stub

sudo_set_activity_cutoff was removed from pallets/admin-utils/src/lib.rs, but this generated weight method is still re-added to the trait and the file still carries both impl bodies for the removed call. This is dead generated code over storage that the PR deletes; regenerate pallet_admin_utils weights or remove the trait method and both impl methods so the weights file matches the pallet surface.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@evgeny-s evgeny-s changed the title [DO NOT MERGE] Follow-up for dynamic tempo - removing deprecated activity cutoff Follow-up for dynamic tempo - removing deprecated activity cutoff Jun 29, 2026
@github-actions

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