Skip to content

chore: remove deprecated senate/Triumvirate dead code#3283

Open
cyclone-pro wants to merge 1 commit intoopentensor:stagingfrom
cyclone-pro:cleanup/remove-senate-dead-code
Open

chore: remove deprecated senate/Triumvirate dead code#3283
cyclone-pro wants to merge 1 commit intoopentensor:stagingfrom
cyclone-pro:cleanup/remove-senate-dead-code

Conversation

@cyclone-pro
Copy link

Bug

No existing issue — senate/Triumvirate pallet was silently removed from the subtensor
runtime. The orphaned code remained with TODO comments questioning its status:

# TODO: is this all deprecated? Didn't subtensor senate stuff get removed?

Description of the Change

Removes all dead code related to the senate/Triumvirate voting system that was left
behind after the pallet was dropped from the subtensor runtime.

Files removed or cleaned up:

  • bittensor/core/chain_data/proposal_vote_data.py — deleted entirely
  • bittensor/core/subtensor.py — removed get_vote_data() method and import
  • bittensor/core/async_subtensor.py — removed async get_vote_data() and import
  • bittensor/core/chain_data/__init__.py — removed ProposalVoteData export
  • bittensor/utils/easy_imports.py — removed ProposalVoteData from public API
  • bittensor/extras/subtensor_api/chain.py — removed get_vote_data binding
  • tests/unit_tests/test_async_subtensor.py — removed 3 senate-related unit tests
  • tests/e2e_tests/test_delegate.py — removed dead import (e2e senate tests were
    already commented out)

Evidence that senate was removed from the runtime:

  • Proxy enum entries (Senate, Triumvirate, Governance) were already marked
    # deprecated proxy types in chain_data/proxy.py
  • All e2e tests for senate voting in test_delegate.py were already commented out
  • No senate extrinsics or commands exist anywhere in the codebase
  • No mentions of senate in CHANGELOG for v10.x
  • The method queried the Triumvirate pallet's Voting storage — a pallet that no
    longer exists on the active chain

Alternate Designs

Considered adding a DeprecationWarning to get_vote_data() instead of deleting it.
Chose full deletion because the underlying pallet no longer exists on-chain — any call
to this method was already silently returning None or raising a substrate error.
Keeping it would give users false confidence that the API is functional.

Possible Drawbacks

Any external code calling subtensor.get_vote_data() will get an AttributeError
after upgrading. However, since the Triumvirate pallet is gone from the runtime, those
calls were already broken at the chain level. The behavioral change is: fail loudly at
import/call time instead of silently returning None.

Verification Process

  1. Searched the full codebase for all references to ProposalVoteData, get_vote_data,
    and Triumvirate — confirmed none remain in production code.
  2. Ran the full async subtensor unit test suite:
    pytest tests/unit_tests/test_async_subtensor.py -v

Result: 216 passed, 0 failed, 1 warning (the warning is pre-existing and unrelated).

Release Notes

Removed the defunct senate/Triumvirate voting API (get_vote_data, ProposalVoteData)
that was no longer functional after the senate pallet was removed from the subtensor runtime.

Branch Acknowledgement

[x] I am acknowledging that I am opening this branch against staging

@cyclone-pro cyclone-pro force-pushed the cleanup/remove-senate-dead-code branch from 719fa59 to dd4c77d Compare March 13, 2026 01:34
@cyclone-pro cyclone-pro marked this pull request as draft March 13, 2026 01:35
@cyclone-pro cyclone-pro marked this pull request as ready for review March 13, 2026 01:36
@cyclone-pro cyclone-pro marked this pull request as draft March 13, 2026 01:36
@cyclone-pro cyclone-pro reopened this Mar 13, 2026
@cyclone-pro cyclone-pro marked this pull request as ready for review March 13, 2026 01:39
@cyclone-pro
Copy link
Author

CC: @basfroman - would appreciate a review when you get a chance.
This removes the orphaned senate/Triumvirate code that was left
after the pallet was dropped from subtensor runtime.

Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

I'm not going to approve or request changes, I'll leave that decision up to @basfroman, but with that being said, I err on the side of not removing dead code in Bittensor until it's "stone dead", because dead things in this ecosystem tend to crop back up with some regularity.

@thewhaleking thewhaleking requested a review from basfroman March 16, 2026 17:09
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.

2 participants