Skip to content

bitensor version as int supports only minor,patch versions <10 #1982

@mjurbanski-reef

Description

@mjurbanski-reef

Describe the bug

https://github.com/opentensor/bittensor/blob/master/bittensor/__init__.py#L33C1-L37

If bittensor 7.10.1 gets released, it will get encoded as version 801, and break version comparisons.

While releasing 100 of patch releases maybe far fetched (but not impossible), the release of 10+ minor version is quite common (e.g. Python is currently at 3.13 ).

To Reproduce

Expected behavior

I would expect bittensor.__version_as_int__ to be always > than previous version, even if we have more than 10 releases.

A possible solution would be to use *100 multiplier - after all if we used *10 we would still require uint32.
This would be also backwards compatible change - > comparison between new released version and old one would still give the expected results.

Screenshots

No response

Environment

Additional context

subtensor seems to encode bittensor/subnet version as u32 int, so we have plenty of room there

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions