-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Improve tx manager hash packing #19738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
mattsse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, all of this looks very good
need a bit more time to review this in detail, but we can move forward with this
| fn try_request_via_peer_queue( | ||
| &mut self, | ||
| peers: &HashMap<PeerId, PeerMetadata<N>>, | ||
| search_durations: &mut TxFetcherSearchDurations, | ||
| ) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add some additional docs to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have updated
CodSpeed Performance ReportMerging #19738 will degrade performances by 29.02%Comparing Summary
Benchmarks breakdown
|
Short Summary on solving the issue #19705 :
Introduced per-peer pending queues with event-driven scheduling: announcements, request failures, and completions , now immediately trigger try_schedule_pending_fetches, eliminating reliance on poll-time budgets.
Factored the request-packing logic into a reusable RequestBuilder that enforces hash/byte dual limits (mirroring geth’s scheduleFetches) and added boundary unit tests.
Removed the legacy search_breadth_budget_* and related constants; per-peer scheduling is enabled by default and exposed through the CLI/config.
Enhanced observability with new metrics (peer queue size/hash count) and Prometheus panels so the new scheduler’s health is visible at a glance.
Geth inspiration:
State-machine layout with per-peer queues.
Request construction governed by both hash count and estimated payload size.
Immediate, event-driven scheduling plus richer instrumentation.
cc @mattsse @Rjected @klkvr @shekhirin