-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polygon/sync,p2p: chain tip block fetch improvements (#12224)
relates to #12182 improves p2p block fetching performance at tip by: - fetching blocks corresponding to new block hashes event using a new method FetchBlocksBackwardsByHash instead of by number because when fetching by number the peer responds with the canonical block which in some cases may not be the same block as the hash in the new block hashes event causing us to miss adding a block to our canonical chain builder - adds an option to override default fetcher configs related to p2p request retries, timeout, etc - at tip we want 1 sec timeout (instead of 5) when calling FetchBlockByHash and 0 retries (there will be more block events in the queue after it) to maximise performance - adds some additional helpful logging for debugging purposes After PR things look much better <img width="1111" alt="Screenshot 2024-10-08 at 09 43 59" src="https://github.com/user-attachments/assets/be36fc95-a902-4615-9243-c10f92c903fe">
- Loading branch information
Showing
12 changed files
with
1,078 additions
and
284 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.