Skip to content

Remove senate dead code#3297

Closed
Mahdi3Bani wants to merge 1 commit intoopentensor:stagingfrom
Mahdi3Bani:remove-senate-dead-code
Closed

Remove senate dead code#3297
Mahdi3Bani wants to merge 1 commit intoopentensor:stagingfrom
Mahdi3Bani:remove-senate-dead-code

Conversation

@Mahdi3Bani
Copy link

The senate/Triumvirate pallet was removed from the subtensor runtime, but the Python SDK still contained orphaned code querying it.

  • Remove get_vote_data() from sync and async subtensor clients
  • Delete ProposalVoteData dataclass and its module
  • Remove get_vote_data from Chain API wrapper
  • Remove all public exports of ProposalVoteData
  • Remove unit tests for the dead method
  • Remove commented-out senate e2e tests and dead imports
  • Remove orphaned propose/vote test helpers

Fixes #3282

Requirements for Adding, Changing, or Removing a Feature

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
  • The pull request must update the test suite to exercise the updated functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution.

Description of the Change

The Senate/Triumvirate pallet was removed from the subtensor runtime, but the Python SDK still contained orphaned code with TODO comments acknowledging the deprecation (e.g., # TODO: is this all deprecated? Didn't subtensor senate stuff get removed?). This PR completes the cleanup by removing all dead Senate/Triumvirate code across 9 files (499 lines deleted). Deprecated proxy enum values (Triumvirate, Senate, Governance, RootWeights) were intentionally kept as they may still be needed for deserializing existing on-chain proxy data.

Alternate Designs

N/A — This is straightforward dead code removal. The only design decision was whether to also remove the deprecated proxy enum values in proxy.py. These were kept to avoid breaking deserialization of existing on-chain proxy records.

Possible Drawbacks

None. The Triumvirate pallet no longer exists on-chain, so get_vote_data() already silently returned None or errored. No working functionality is affected.

Verification Process

  • Searched the entire codebase for any remaining references to ProposalVoteData, get_vote_data, and proposal_vote_data — zero matches remain
  • Verified all removed test helpers (propose, async_propose, vote, async_vote) were only used in the commented-out senate tests
  • Verified the ProposalVoteData import was not used anywhere outside the deleted code paths

Release Notes

Removed deprecated Senate/Triumvirate dead code from the SDK (get_vote_data, ProposalVoteData, and related test code).

Branch Acknowledgement

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

The senate/Triumvirate pallet was removed from the subtensor runtime,
but the Python SDK still contained orphaned code querying it.

- Remove get_vote_data() from sync and async subtensor clients
- Delete ProposalVoteData dataclass and its module
- Remove get_vote_data from Chain API wrapper
- Remove all public exports of ProposalVoteData
- Remove unit tests for the dead method
- Remove commented-out senate e2e tests and dead imports
- Remove orphaned propose/vote test helpers

Fixes opentensor#3282
@Mahdi3Bani Mahdi3Bani force-pushed the remove-senate-dead-code branch from bfe6136 to ecd8157 Compare March 25, 2026 09:46
@thewhaleking
Copy link
Contributor

See: #3283 (comment)

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