Repository navigation
Implement sequence-race detection and XDR decoding optimization - #42
Merged
BigDella merged 1 commit intoSep 24, 2026
Conversation
Parcel-Protocol#32, Parcel-Protocol#33) Issue Parcel-Protocol#33: Detect and warn about sequence-number races - Add timestamps/ledger info to every sequence-number display - Implement refresh action in sequence-inspector with state tracking - Add consistent advisory copy across all features displaying sequences - Features updated: sequence-inspector, xdr-inspector, preconditions-explainer, fee-bump-inspector - Add comprehensive docs explaining staleness risk and user best practices Issue Parcel-Protocol#32: Profile and optimize XDR decoding performance - Create benchmark suite for 100-operation transaction decoding - Add performance test with 16ms frame-budget target - Implement optimized decoding with Web Worker support for large payloads - Add fallback-to-sync for worker initialization failure and timeouts - Threshold-based approach: sync for <2KB envelopes, worker for larger - Add detailed performance documentation with architecture notes Acceptance criteria met: - [x] Documented benchmark exists for 100-op and large-ScVal fixtures - [x] Throttle-exceeded: decoding moves off-thread with proper fallback - [x] Small transactions not penalized by worker overhead - [x] Errors from off-thread decoding surface same way - [x] Every sequence display labeled with ledger/time retrieved - [x] Manual refresh available for decoding-preview features - [x] Advisory copy consistent across slices - [x] Docs explain why freshness cannot be guaranteed
|
@sanmipaul Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Comprehensive implementation of issues #32 (XDR decoding performance) and #33 (sequence-number race detection).
Issue #33: Detect and warn about sequence-number races
Problem: Read-only tools reporting sequence numbers can show stale values if the account submits another transaction in between.
Solution:
Features updated:
Issue #32: Profile and optimize XDR decoding performance
Problem: Large transactions (100+ operations) could block the main thread during decoding.
Solution:
Implementation:
xdrInspector.optimized.ts- Smart routing between sync/worker pathsxdrInspector.worker.ts- Web Worker for off-main-thread decodingxdrInspector.benchmark.ts- Performance test suite with frame-budget validationAcceptance Criteria (Both Issues)
Issue #32:
Issue #33:
Test Plan
npm run test -- xdrInspector.benchmarkto verify performance targetsDocumentation
Added two new docs:
docs/SEQUENCE_FRESHNESS.md- Complete guide to sequence staleness and user best practicesdocs/XDR_DECODING_PERFORMANCE.md- Architecture and optimization strategycloses #27
closes #29
closes #32
closes #33