Decouple rust module#312
Draft
danielbui12 wants to merge 3 commits into
Draft
Conversation
- Add crates/utils/storage-indexers with BlockStream (finalized blocks) and EventStream (typed runtime events with block context), both implementing futures::Stream with a single connect() entrypoint - Decode events through the generated storage-subxt bindings (api::Event) instead of hand-rolled scale_value parsing - EventFilter: pre-decode pallet gate (per-pallet consts and constructors, storage_pallets()) plus an optional predicate over decoded events - Reconnect resilience: ReconnectingRpcClient transport plus in-loop re-subscription with capped exponential backoff; blocks finalized during an outage are not backfilled (documented) - Wire the new crate into workspace members and [workspace.dependencies]
…ndings - Hoist reconnect backoff out of the subscription match: reset only when a block is delivered, and delay all non-delivery paths (transient errors, subscription end, re-subscribe failure) so a flapping connection escalates 1s-30s instead of hot-looping - Escape node-supplied pallet/event names in decode-failure logs to prevent log injection - Widen BlockEvent.block_number to u64, removing the lossy cast - Name channel capacities as consts and shrink the event buffer to 256 - Derive Debug on both streams, add a manual Debug for EventFilter, and document BlockEvent fields
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.
No description provided.