Skip to content

Commit 0e2f934

Browse files
committed
[WIP] moving to async-substrate-interface
1 parent c4f99f5 commit 0e2f934

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

bittensor/core/async_subtensor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import numpy as np
1010
import scalecodec
1111
from async_substrate_interface import AsyncSubstrateInterface
12+
async_substrate_interface.substrate_addons import RetrySubstrate
1213
from bittensor_commit_reveal import get_encrypted_commitment
1314
from bittensor_wallet.utils import SS58_FORMAT
1415
from numpy.typing import NDArray
@@ -79,7 +80,7 @@
7980
)
8081
from bittensor.core.metagraph import AsyncMetagraph
8182
from bittensor.core.settings import version_as_int, TYPE_REGISTRY
82-
from bittensor.core.types import ParamWithTypes, SubtensorMixin, RetrySubstrate
83+
from bittensor.core.types import ParamWithTypes, SubtensorMixin
8384
from bittensor.utils import (
8485
Certificate,
8586
decode_hex_identity_dict,

bittensor/core/subtensor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import scalecodec
88
from async_substrate_interface.errors import SubstrateRequestException
99
from async_substrate_interface.sync_substrate import SubstrateInterface
10+
from async_substrate_interface.substrate_addons import RetrySubstrate
1011
from async_substrate_interface.types import ScaleObj
1112
from bittensor_commit_reveal import get_encrypted_commitment
1213
from numpy.typing import NDArray
@@ -81,7 +82,7 @@
8182
SS58_FORMAT,
8283
TYPE_REGISTRY,
8384
)
84-
from bittensor.core.types import ParamWithTypes, SubtensorMixin, RetrySubstrate
85+
from bittensor.core.types import ParamWithTypes, SubtensorMixin
8586
from bittensor.utils import (
8687
Certificate,
8788
decode_hex_identity_dict,

bittensor/core/types.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
import asyncio
21
from abc import ABC
32
import argparse
4-
from functools import partial
5-
from itertools import cycle
6-
from typing import TypedDict, Optional, Union, Type
3+
from typing import TypedDict, Optional
74

8-
from async_substrate_interface.sync_substrate import SubstrateInterface
9-
from async_substrate_interface.async_substrate import AsyncSubstrateInterface
10-
from async_substrate_interface.errors import MaxRetriesExceeded
115

126
from bittensor.utils import networking, Certificate
137
from bittensor.utils.btlogging import logging

0 commit comments

Comments
 (0)