Skip to content

Conversation

thewhaleking
Copy link
Collaborator

@thewhaleking thewhaleking commented Aug 1, 2025

Features:

  • True Runtime independence in AsyncSubstrateInterface:
    • ensures no need to reload types from a shared object that may interfere with concurrency
    • increases memory usage slightly, but drops CPU usage dramatically by not needing to reload the type registry when retrieving from cache
  • RuntimeCache improved to automatically add additional mappings
  • Uses a single dispatcher queue for concurrent sending/receiving which eliminates the need for coroutines to manage their own state in regard to connection management.
  • Futures from the Websocket now get assigned their own exceptions
  • Overall cleaner logic flow with regard to rpc requests
  • The Websocket object now handles reconnections/timeouts
  • Separation of normal ping-pong calls and longer-running subscriptions

@thewhaleking thewhaleking changed the title [WIP] concurrency improvements Concurrency improvements Aug 1, 2025
@thewhaleking thewhaleking requested a review from a team August 1, 2025 14:15
@thewhaleking thewhaleking added run-bittensor-sdk-tests Runs Bittensor SDK tests. run-bittensor-cli-tests Runs BTCLI tests. labels Aug 1, 2025
@thewhaleking thewhaleking marked this pull request as ready for review August 1, 2025 14:16
@thewhaleking thewhaleking marked this pull request as draft August 1, 2025 16:44
@thewhaleking thewhaleking marked this pull request as ready for review August 4, 2025 15:33
Copy link
Contributor

@basfroman basfroman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like so many tests :D

@thewhaleking thewhaleking merged commit 9924c52 into staging Aug 4, 2025
42 checks passed
@thewhaleking thewhaleking deleted the fix/thewhaleking/concurrency-improvements branch August 4, 2025 19:15
This was referenced Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants