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

Use websockets for Subtensor #2455

Merged
merged 7 commits into from
Nov 21, 2024
Merged

Conversation

thewhaleking
Copy link
Contributor

@thewhaleking thewhaleking commented Nov 21, 2024

This changes the way Subtensor connects to the websocket server. Previously, the websocket was initialized from within SubstrateInterface. However, this was using the stdlib websocket package. The PyPI websockets package has significantly better stability, and results in no broken pipes in our testing.

Furthermore, because we're bumping the websockets requirement version to 14.1+, we're transitioning the async websockets client in AsyncSubstrate to use this updated client.

…l. Updated AsyncSubstrate to use the updated async websocket client, bumped websockets version req to 14.1.
@thewhaleking thewhaleking changed the base branch from master to staging November 21, 2024 21:02
bittensor/core/subtensor.py Outdated Show resolved Hide resolved
bittensor/utils/async_substrate_interface.py Outdated Show resolved Hide resolved
bittensor/utils/async_substrate_interface.py Outdated Show resolved Hide resolved
@thewhaleking thewhaleking merged commit 1164fb5 into staging Nov 21, 2024
27 checks passed
@thewhaleking thewhaleking deleted the feat/thewhaleking/use-websockets branch November 21, 2024 23:07
@thewhaleking thewhaleking changed the title [WIP] use websockets for Subtensor Use websockets for Subtensor Nov 22, 2024
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