Skip to content

devnet deploy 4/1/2025 #1492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 63 commits into from
Apr 1, 2025
Merged

devnet deploy 4/1/2025 #1492

merged 63 commits into from
Apr 1, 2025

Conversation

@sam0x17 sam0x17 self-assigned this Apr 1, 2025
@github-actions github-actions bot added the run-bittensor-e2e-tests Runs Bittensor SDK and BTCLI tests label Apr 1, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR primarily updates the Subtensor pallets and related tests to use the unsigned fixed‐point type U96F32 in place of I96F32, along with several related type conversions and new features for migrations and runtime APIs. Key changes include:

  • Replacing I96F32 with U96F32 (and similar adjustments for other fixed-point types) in staking, coinbase, commitments, and helper modules.
  • Adding a new migration module (migrate_upgrade_revealed_commitments) and extending the runtime API with get_selective_metagraph.
  • Updating EVM test contracts and configurations to align with the aforementioned changes.

Reviewed Changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pallets/subtensor/src/staking/stake_utils.rs Conversion updates from I96F32 to U96F32 in staking utility functions.
pallets/subtensor/src/staking/remove_stake.rs Updated fixed-point types in unstake extrinsics.
pallets/subtensor/src/staking/move_stake.rs Updated fixed-point type conversion in move stake logic.
pallets/subtensor/src/staking/helpers.rs Adjusted helper functions to use U96F32.
pallets/subtensor/src/rpc_info/stake_info.rs Fixed-point type changes in RPC stake info methods.
pallets/subtensor/src/migrations/*.rs Addition of new migration module for revealed commitments upgrade.
pallets/subtensor/src/macros/events.rs New events added for CRV3 weights reveal and commit-reveal settings.
pallets/subtensor/src/lib.rs New storage added for TotalHotkeyAlphaLastEpoch.
pallets/subtensor/src/coinbase/* Consistent conversion updates in coinbase emission and block step logic.
pallets/subtensor/runtime-api/src/lib.rs Extended runtime API with selective metagraph functionality.
pallets/subtensor/rpc/src/lib.rs RPC implementation updated with selective metagraph support.
pallets/commitments/src/mock.rs & lib.rs Adjustments to constants and commitment reveal logic.
evm-tests/* EVM test contracts and config updated to reflect type changes.
Comments suppressed due to low confidence (3)

pallets/subtensor/src/staking/stake_utils.rs:82

  • The conversion from U96F32 results (used in prior calculations) to I96F32 here may introduce precision or range issues. Consider maintaining a consistent fixed-point type for moving price values or thoroughly document why the conversion to a signed type is necessary.
let new_moving: I96F32 = I96F32::saturating_from_num(current_price.saturating_add(current_moving));

pallets/commitments/src/lib.rs:590

  • [nitpick] Enforcing a maximum of 10 revealed entries by draining older items might lead to loss of potentially useful historical data. Confirm that this limit meets the application requirements or consider making the cap configurable.
if existing_reveals.len() > MAX_REVEALS {

pallets/subtensor/rpc/src/lib.rs:410

  • [nitpick] Ensure the error message for the get_selective_metagraph RPC call provides enough context for debugging while not exposing sensitive internal details.
Err(e) => Err(Error::RuntimeError(format!("Unable to get selective metagraph: {:?}", e)).into()),

@sam0x17 sam0x17 merged commit e81603e into devnet Apr 1, 2025
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-devnet run-bittensor-e2e-tests Runs Bittensor SDK and BTCLI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants