Skip to content

Conversation

@DanielDerefaka
Copy link

Summary

  • Standardizes mechanism identifier naming across the codebase
  • Renames sub_id parameter to mecid in public API functions to match the MechId type
  • Renames get_netuid_and_subid function to get_netuid_and_mecid
  • Updates internal variable names from sub_id_* to mecid_*
  • Updates comments to use mecid terminology

Changes

Files modified:

  • pallets/subtensor/src/subnets/mechanism.rs - Core naming changes
  • pallets/subtensor/src/epoch/run_epoch.rs - Updated function calls
  • pallets/subtensor/src/subnets/weights.rs - Updated function calls
  • pallets/subtensor/src/migrations/migrate_crv3_commits_add_block.rs - Updated function calls
  • pallets/subtensor/src/tests/mechanism.rs - Updated test calls

Test plan

  • Verified cargo check --lib passes
  • Verified cargo check --tests passes
  • All changes are internal naming refactors with no behavioral changes

Fixes #2101

Addresses inconsistent naming of mechanism identifiers across the codebase.
Changes:
- Rename `sub_id` parameter to `mecid` in public API functions
- Rename `get_netuid_and_subid` to `get_netuid_and_mecid`
- Update variable names from `sub_id_*` to `mecid_*` in mechanism.rs
- Update comments to use `mecid` terminology instead of `sub_id`
- Rename `sub_weight`/`sub_emission` to `mech_weight`/`mech_emission`

This aligns internal implementation with the public-facing API which
already uses `mecid` and `MechId` consistently.

Fixes opentensor#2101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MechId naming inconsistency

1 participant