feat: add asyncio-native AsyncLedgerClient (gRPC, no thread wrapping) - #443
Merged
Conversation
Extract the I/O-free logic of LedgerClient (parsers, fee math, stub wiring, poll timings) into a shared LedgerClientBase and add AsyncLedgerClient, which runs the same generated protobuf stubs over a grpc.aio channel. The sync client is a pure refactor - no API or behavior changes. - cosmpy/aerial/client/base.py: shared I/O-free base for both clients - cosmpy/aerial/client/aio.py: AsyncLedgerClient + async tx helpers (prepare_and_broadcast_basic_transaction, simulate_tx, get_paginated); gRPC endpoints only, REST URLs raise with a clear message - gas.py: AsyncGasStrategy and AsyncSimulationGasStrategy; async client also accepts I/O-free sync strategies (e.g. OfflineMessageTableStrategy) - tx_helpers.py: AsyncSubmittedTx with awaitable wait_to_complete() - tests: async client unit tests over mocked aio stubs
|
Visit the preview URL for this PR (updated for commit 1af8238): https://fetch-docs-preview--pr443-feat-async-client-eiza1cm6.web.app (expires Wed, 29 Jul 2026 09:40:12 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f2de39fd4e81249941960b74fbab0a62d90d69f8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the I/O-free logic of LedgerClient (parsers, fee math, stub wiring, poll timings) into a shared LedgerClientBase and add AsyncLedgerClient, which runs the same generated protobuf stubs over a grpc.aio channel. The sync client is a pure refactor - no API or behavior changes.
Proposed Changes
[describe the changes here...]
Linked Issues
[if applicable, add links to issues resolved by this PR]
Types of changes
What type of change does this pull request make (put an
xin the boxes that apply)?Checklist
Put an
xin the boxes that apply:If applicable
Further comments
[if this is a relatively large or complex change, kick off a discussion by explaining why you chose the solution you did, what alternatives you considered, etc...]