Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/8.5.2 #2584

Merged
merged 33 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6c9d6a5
Updates tests for btwallet 3.0.0
ibraheem-opentensor Dec 14, 2024
6818651
fix get_delegates result decoding
roman-opentensor Dec 17, 2024
7cede0c
Feat/use tx pool for set weights (#2534)
camfairchild Dec 17, 2024
6b7eac4
fix tests
roman-opentensor Dec 17, 2024
39bef5c
Merge branch 'staging' into fix-get-delegates-result-decoding
roman-opentensor Dec 17, 2024
935c81e
Merge pull request #2551 from opentensor/fix-get-delegates-result-dec…
roman-opentensor Dec 18, 2024
f33e45a
add connection limit error handler
roman-opentensor Dec 20, 2024
bd368df
add test
roman-opentensor Dec 20, 2024
ae89f09
Merge pull request #2553 from opentensor/feat/roman/hadle-the-maximun…
roman-opentensor Dec 20, 2024
4008488
Backmerge master to staging post 851 (#2557)
ibraheem-opentensor Dec 22, 2024
296f76f
improve handler
roman-opentensor Dec 23, 2024
f4d5ed6
Merge pull request #2558 from opentensor/feat/roman/improve-invalid-s…
roman-opentensor Dec 23, 2024
a8a6a0c
add async commit reveal impl
roman-opentensor Dec 24, 2024
0eec78f
add new logic to async_subtensor
roman-opentensor Dec 24, 2024
db32b21
add unit tests
roman-opentensor Dec 24, 2024
832aff3
ruff
roman-opentensor Dec 24, 2024
3497cd6
add uid check before processing
roman-opentensor Dec 24, 2024
71b0c28
fix test
roman-opentensor Dec 24, 2024
560bf29
Merge pull request #2560 from opentensor/feat/roman/add-async-commit_…
roman-opentensor Dec 24, 2024
7c32248
Merge branch 'staging' into tests/update-tests-btwallet3
roman-opentensor Jan 8, 2025
b3c0ab7
Use apt-get instead of apt for scripts (#2571)
camfairchild Jan 9, 2025
5a22780
fix _do_stake incorrect arguments error in staking.py
Assh-codes Jan 11, 2025
66cd437
Merge branch 'staging' into patch-2
thewhaleking Jan 13, 2025
b0ff5c2
Merge pull request #2574 from Assh-codes/patch-2
thewhaleking Jan 13, 2025
138dde5
Merge branch 'staging' into tests/update-tests-btwallet3
roman-opentensor Jan 14, 2025
508be9e
Updates subtensor branch for e2e
ibraheem-opentensor Jan 16, 2025
cd91cd8
tests fix
roman-opentensor Jan 17, 2025
ab07ec4
Bumps cr3 ffi
ibraheem-opentensor Jan 17, 2025
86f9b4d
Merge pull request #2540 from opentensor/tests/update-tests-btwallet3
ibraheem-opentensor Jan 17, 2025
92008e1
Merge branch 'staging' into bumps/ffi-crv3
ibraheem-opentensor Jan 17, 2025
10da20b
Merge pull request #2583 from opentensor/bumps/ffi-crv3
ibraheem-opentensor Jan 17, 2025
894035b
Bumps version and changelog
ibraheem-opentensor Jan 17, 2025
ac50f0a
Updates changelog
ibraheem-opentensor Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add connection limit error handler
  • Loading branch information
roman-opentensor committed Dec 20, 2024
commit f33e45a40e2e06b6b7e88af50c93b8b6cbf86b08
19 changes: 14 additions & 5 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
from scalecodec.type_registry import load_type_registry_preset
from scalecodec.types import ScaleType
from substrateinterface.base import QueryMapResult, SubstrateInterface
from websockets.exceptions import InvalidStatus
from websockets.sync import client as ws_client

from bittensor.core import settings
@@ -233,6 +234,7 @@ def _get_substrate(self, force: bool = False):
open_timeout=self._connection_timeout,
max_size=2**32,
)

self.substrate = SubstrateInterface(
ss58_format=settings.SS58_FORMAT,
use_remote_preset=True,
@@ -244,19 +246,26 @@ def _get_substrate(self, force: bool = False):
f"Connected to {self.network} network and {self.chain_endpoint}."
)

except (ConnectionRefusedError, ssl.SSLError) as error:
logging.error(
f"<red>Could not connect to</red> <blue>{self.network}</blue> <red>network with</red> <blue>{self.chain_endpoint}</blue> <red>chain endpoint.</red>",
except ConnectionRefusedError as error:
logging.critical(
f"[red]Could not connect to[/red] [blue]{self.network}[/blue] [red]network with[/red] [blue]{self.chain_endpoint}[/blue] [red]chain endpoint.[/red]",
)
raise ConnectionRefusedError(error.args)
except ssl.SSLError as e:

except ssl.SSLError as error:
logging.critical(
"SSL error occurred. To resolve this issue, run the following command in your terminal:"
)
logging.critical("[blue]sudo python -m bittensor certifi[/blue]")
raise RuntimeError(
"SSL configuration issue, please follow the instructions above."
) from e
) from error

except InvalidStatus as error:
logging.critical(
f"[red]You have reached the limit of simultaneous connections to the server.[/red]"
)
raise InvalidStatus(error.response) from error

@staticmethod
def config() -> "Config":