Skip to content

Added a possibility to configure max epochs per block.#2770

Open
evgeny-s wants to merge 9 commits into
devnet-readyfrom
feat/configure-max-epochs-per-block
Open

Added a possibility to configure max epochs per block.#2770
evgeny-s wants to merge 9 commits into
devnet-readyfrom
feat/configure-max-epochs-per-block

Conversation

@evgeny-s

Copy link
Copy Markdown
Collaborator

Description

Added a possibility to configure max epochs per block via root call.
Related to #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.

@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

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

BASELINE scrutiny: established 2012 account with write permission, substantial prior subtensor PR history, no committer mismatch, no trusted Gittensor allowlist match; branch feat/configure-max-epochs-per-block -> devnet-ready.

Static-only review found a narrow root-gated runtime/admin change: MaxEpochsPerBlock moves from a compile-time constant to bounded u8 storage seeded by the prior runtime value, and epoch deferral reads that storage value. The diff bumps spec_version; it does not modify .github/ai-review/*, .github/copilot-instructions.md, dependencies, lockfiles, or build scripts.

Findings

No findings.

Conclusion

No malicious code or security vulnerability found in the reviewed diff. The new setter is ensure_root gated, rejects zero, uses bounded storage with the prior default, emits an event, and has benchmark/test coverage in the patch.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor UNKNOWN: no trusted allowlist match; author has write permission and substantial prior subtensor history, so calibrated as an established contributor.

Spec version is bumped from 420 to 421; no auto-fix was applied. The runtime/admin-utils change is root-gated, rejects a zero cap, uses bounded u8 storage seeded from the prior runtime constant, emits the Subtensor event, and includes benchmark weight coverage.

The added tests cover non-root rejection, zero-value rejection, storage/event update, and the configured cap's effect on epoch deferrals. I did not run targeted cargo tests because I did not find a defect requiring runtime confirmation.

No overlapping open PR appears to implement the same configurable max-epochs-per-block feature; the overlaps are incidental shared runtime/mock files or unrelated deployment/feature PRs.

Findings

No findings.

Prior-comment reconciliation

  • c8d9e1d6: no longer applies — The current fetched diff no longer includes .github/workflows/typescript-e2e.yml; there is no workflow cleanup hunk to pin or carry forward in this review.

Conclusion

The PR implements the requested configurable epoch cap in a small, bounded, root-only path with the required runtime version bump and focused tests. I found no blocking domain issues.


📜 Previous run (superseded)
Sev File Finding Status
MEDIUM .github/workflows/typescript-e2e.yml:181 Scope diagnostic node cleanup to the process this step started ⏭️ No longer applies
The current fetched diff no longer includes .github/workflows/typescript-e2e.yml; there is no workflow cleanup hunk to pin or carry forward in this review.

l0r1s
l0r1s previously approved these changes Jun 18, 2026
Comment thread pallets/admin-utils/src/lib.rs Outdated

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

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👎

@evgeny-s evgeny-s added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 18, 2026
- updated type
- added more tests
@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: 👍

@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 .github/workflows/typescript-e2e.yml Outdated
@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 .github/workflows/typescript-e2e.yml Outdated
@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 .github/workflows/typescript-e2e.yml Outdated
@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: 👍

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.

3 participants