Guides/EVM/Precompiles

Voting power

Reference for the deployed VotingPowerPrecompile.

View as Markdown
PropertyValue
Rust implementationVotingPowerPrecompile
Solidity interfaceIVotingPower
Address0x000000000000000000000000000000000000080d
StatusDeployed

All functions are view.

Functions

getVotingPower(uint16,bytes32)
isVotingPowerTrackingEnabled(uint16)
getVotingPowerDisableAtBlock(uint16)
getVotingPowerEmaAlpha(uint16)
getTotalVotingPower(uint16)

getTotalVotingPower reads a maintained per-subnet aggregate. A one-time runtime migration initializes the aggregate from existing validator entries; normal epoch updates, removals, swaps, and tracking disablement keep it in sync without a precompile-side map scan.

Added operations

FunctionSource extrinsic
enableVotingPowerTrackingSubtensorModule.enable_voting_power_tracking
disableVotingPowerTrackingSubtensorModule.disable_voting_power_tracking

Both calls accept a signed subnet owner as well as Root. The precompile exposes only the signed path and preserves the pallet's owner checks. The Root-only EMA configuration call is not exposed.

Source: votingPower.sol