Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Release/2.0.0#78

Merged
basfroman merged 8 commits into
mainfrom
release/2.0.0
Jun 18, 2026
Merged

Release/2.0.0#78
basfroman merged 8 commits into
mainfrom
release/2.0.0

Conversation

@basfroman

@basfroman basfroman commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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_commit is removed in favor of get_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 of netuid plus modulo-based (block + netuid + 1) / (tempo + 1) math. Python, PyO3, and C FFI (cr_generate_commit_v2 in bindings.h) all follow the new signature; cr_generate_commit is gone.

Core logic: New epoch_schedule module simulates block_step / run_coinbase (including mempool COMMIT_INCLUSION_BLOCK_OFFSET and reveal-before-coinbase ordering) via predict_first_reveal_block, then maps the reveal block to a Drand round as before. Shared constants move to constants.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 from Cargo.toml).

Reviewed by Cursor Bugbot for commit 0dff71e. Bugbot is set up for automated code reviews on this repo. Configure here.

@basfroman basfroman requested a review from a team June 18, 2026 17:09
@basfroman basfroman self-assigned this Jun 18, 2026
@basfroman basfroman merged commit d7baf97 into main Jun 18, 2026
98 of 103 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants