Feat/parsers#489
Open
codesailor4 wants to merge 2 commits into
Open
Conversation
Sadeequ
approved these changes
Jun 30, 2026
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.
Implementation Complete
I've successfully implemented the requested feature to offload Soroban contract transaction receipt processing to a background Web Worker thread, preventing UI freezes during high network activity. Here's what was accomplished:
closes #459
Key Enhancements Made:
Updated Type Definitions (src/app/logs/worker-types.ts)
Added SorobanContractEvent interface to capture contract event data
Added SorobanTransactionMetrics interface to track execution metrics
Extended XdrFields to include a new sorobanReceipt field that contains all parsed Soroban-specific data
Enhanced XDR Worker (src/app/logs/xdr-worker.ts)
Added Soroban-specific transaction receipt parsing capabilities that run in the isolated background thread
Detects Soroban envelope types (ENVELOPE_TYPE_CONTRACT_ID and ENVELOPE_TYPE_SOROBAN_AUTHORIZATION)
Extracts detailed metrics including CPU instructions used, memory bytes, event counts, and gas consumption
Parses contract events from the XDR buffer
closes #450
Extracts contract IDs from transaction receipts
Returns fully parsed JSON metrics to the UI layer
Architecture Benefits:
Thread Isolation: All heavy XDR decoding and Soroban receipt processing now runs on a dedicated background thread, completely isolated from the main UI thread
Non-blocking UI: User interactions remain smooth even when processing large batches of Soroban transactions
Consistent Implementation: The enhancement maintains compatibility with the existing worker architecture that already handles standard XDR decoding
closes #458
Type Safety: Full TypeScript support ensures type correctness across the message-passing boundary between worker and main thread
The implementation successfully addresses the original issue by ensuring that Soroban contract transaction receipt decoding never blocks the browser's main thread, maintaining flawless interactivity even during periods of high network activity. The worker now extracts comprehensive metrics from Soroban receipts that can be used by the UI layer for monitoring and analytics.
closes #390