Conversation
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.
This pull request introduces significant optimizations and configurability improvements to the transaction propagation pipeline, with a focus on reducing end-to-end latency and improving throughput under high load. The most important changes include making the broadcast worker pool and parallel chunking configurable, adding an in-memory prefilter to skip stale callback work, and documenting the impact of these changes. These updates collectively reduce the mean RECEIVED → ACCEPTED_BY_NETWORK latency by 88% and minimize wasted store reads.
Pipeline Configuration Improvements
config/config.go,services/propagation/propagator.go: Promoted the broadcast worker pool size (BroadcastWorkers) and maximum parallel chunk count (MaxParallelChunks) from constants to configuration options, with sensible defaults and documentation. This allows tuning for different deployment sizes and workloads. [1] [2] [3] [4] [5] [6] [7] [8]Performance Optimizations
services/api_server/handlers.go: Added an in-memory tracker prefilter to the callback handler, which skips updating the store for callback txids whose status is already at or past the callback target. This eliminates unnecessary store operations for ~91% of SEEN_ON_NETWORK callbacks at 100 TPS, significantly reducing hot-path load. [1] [2] [3]services/api_server/handlers_test.go: Added a test to verify that the tracker prefilter correctly skips stale callback txids and only applies updates for fresh or unknown statuses. [1] [2]Documentation
docs/100tps-propagation-results.md: Added a comprehensive document detailing the optimization results, pipeline breakdown, and the effect of each shipped change on latency and throughput, including visualizations and metric explanations.These changes collectively make the transaction propagation pipeline faster, more efficient, and easier to tune for various deployment scenarios.