-
Notifications
You must be signed in to change notification settings - Fork 375
[WIP] Fallback Chains #2829
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
[WIP] Fallback Chains #2829
Conversation
…ith Async. Not perfect with sync.
from dataclasses import dataclass
@dataclass()
class RetrySubstrateArgs:
main_endpoint: str # initial endpoint
fallback_chains: list[str] # endpoints for reconnection
retry_attempts: int # amount of connections before fail (if 0 then infinite)
safety_substrate: Optional["RetrySubstrateArgs"] = None` for if safety_substrate and is_instance(safety_substrate, RetrySubstrateArgs):
self.substrate = RetrySubstrate(..., safety_substrate: "RetrySubstrateArgs" = safety_substrate)
else:
self.substrate = SubstrateInterface(...) Since the use of Let's move logic |
Will move majority of that logic to opentensor/async-substrate-interface#100 |
Moved the entire thing to opentensor/async-substrate-interface#100 |
Resolves #2533
Requires opentensor/async-substrate-interface#96
Currently Proof of concept for fallback networks. Not tested or working with Async. Not perfect with sync.