This repository was archived by the owner on Jul 10, 2026. It is now read-only.
Release/2.0.0#78
Merged
Merged
Conversation
…pport Dynamic tempo support
ibraheem-abe
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
High Risk
Breaking public API and FFI for weight commitments, with reveal timing driven by new chain-parity simulation—wrong epoch logic would cause commits to miss on-chain reveal windows.
Overview
v2.0.0 replaces legacy commit-reveal timing with a stateful epoch model aligned with dynamic subnet tempo on chain.
Breaking API:
get_encrypted_commitis removed in favor ofget_encrypted_commit_v2, which takes epoch schedule fields (last_epoch_block,pending_epoch_at,subnet_epoch_index,tempo,blocks_since_last_step,current_block) instead ofnetuidplus modulo-based(block + netuid + 1) / (tempo + 1)math. Python, PyO3, and C FFI (cr_generate_commit_v2inbindings.h) all follow the new signature;cr_generate_commitis gone.Core logic: New
epoch_schedulemodule simulatesblock_step/run_coinbase(including mempoolCOMMIT_INCLUSION_BLOCK_OFFSETand reveal-before-coinbase ordering) viapredict_first_reveal_block, then maps the reveal block to a Drand round as before. Shared constants move toconstants.rs.Tests & docs: Table-driven Rust vectors and FFI/Python contract tests cover v2; legacy Python commit-reveal round-trip tests are dropped. README and changelog document the migration (
bittensor>=11.0.0/get_epoch_schedule_state). Package version is 2.0.0 (maturin reads version fromCargo.toml).Reviewed by Cursor Bugbot for commit 0dff71e. Bugbot is set up for automated code reviews on this repo. Configure here.