Skip to content

Can't get timestamp for old blocks #112

Closed
@noaonoszko

Description

@noaonoszko

Describe the bug

I get

SubstrateRequestException: Client error: Execution failed: Other: Exported method Metadata_metadata_at_version is not found

when calling Subtensor.get_timestamp with blocks older than around a year.

To Reproduce

This gives the error message mentioned above:

import bittensor as bt
subtensor = bt.subtensor("archive")
subtensor.get_timestamp(block=3010611)

It works as expected with block 3020611 and newer. Haven't pinned down earliest block that works though.

Expected behavior

I expect to get a result from the method call, for example:

In [62]: import bittensor as bt
    ...: subtensor = bt.subtensor("archive")
    ...: subtensor.get_timestamp(block=3020611)
Out[62]: datetime.datetime(2024, 5, 23, 17, 58, 36, 2000, tzinfo=datetime.timezone.utc)

Screenshots

No response

Environment

macOS 15.3.2, bittensor 9.4.0

Additional context

No response

Metadata

Metadata

Assignees

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