Bittensor 10.0 supports multiple independent incentive mechanisms within a single subnet. Each mechanism has its own weight matrices, bond pools, and emission distributions.
mechid (Mechanism ID): An integer used to identify the mechanism. The first mechanism is 0, the second is 1, etc.- Default Behavior: All SDK methods default to
mechid=0. Existing single-mechanism subnets remain backward compatible and require no changes.
Setting Weights for a Specific Mechanism
Validators must specify the mechid when setting weights to ensure they target the correct mechanism:
# Set weights for a specific mechanism (mechid)
response = subtensor.set_weights(
wallet,
netuid=1,
uids=[0, 1, 2],
weights=[0.5, 0.3, 0.2],
mechid=0 # Mechanism ID (default: 0)
)
# For subnets with multiple mechanisms, set weights for each:
mechanism1_response = subtensor.set_weights(wallet, netuid=1, uids, weights1, mechid=0)
mechanism2_response = subtensor.set_weights(wallet, netuid=1, uids, weights2, mechid=1)
Querying Mechanism-Specific Data
All metagraph queries now accept a mechid parameter to retrieve data for a specific mechanism:
# Get metagraph for specific mechanism
metagraph = subtensor.metagraph(netuid=1, mechid=0)
# Get weights for specific mechanism
weights = subtensor.weights(netuid=1, mechid=0)
# Get bonds for specific mechanism
bonds = subtensor.bonds(netuid=1, mechid=0)
# Get timelocked weight commits for a mechanism
commits = subtensor.get_timelocked_weight_commits(netuid=1, mechid=0)