Skip to content

feat(p2p): Change sync-v2 main loop interval to one second#1184

Merged
msbrogli merged 1 commit intomasterfrom
feat/sync-v2-main-loop-interval
Nov 19, 2024
Merged

feat(p2p): Change sync-v2 main loop interval to one second#1184
msbrogli merged 1 commit intomasterfrom
feat/sync-v2-main-loop-interval

Conversation

@msbrogli
Copy link
Member

Motivation

The sync v2 main loop already have protection against multiple executions. But it just checks if it is running every 5 seconds per connection. We can safely reduce this interval to 1 second, speeding up the sync.

Acceptance Criteria

  1. Reduce the interval from 5s to 1s.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli requested a review from jansegre as a code owner November 13, 2024 21:03
@msbrogli msbrogli requested a review from glevco November 13, 2024 21:04
@msbrogli msbrogli self-assigned this Nov 13, 2024
jansegre
jansegre previously approved these changes Nov 13, 2024
glevco
glevco previously approved these changes Nov 13, 2024
@github-actions
Copy link

github-actions bot commented Nov 13, 2024

🐰 Bencher Report

Branchfeat/sync-v2-main-loop-interval
Testbedubuntu-22.04

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Lower Boundary
(Limit %)
sync-v2 (up to 20000 blocks)Latency
nanoseconds (ns)
📈 plot
🚨 alert (🔔)
🚷 threshold
89,421,510,483.48
(-11.58%)
91,019,433,369.52
(101.79%)
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Lower Boundary
nanoseconds (ns)
(Limit %)
Upper Boundary
nanoseconds (ns)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚨 view alert (🔔)
🚷 view threshold
89,421,510,483.48
(-11.58%)
91,019,433,369.52
(101.79%)
111,245,974,118.30
(80.38%)
🐰 View full continuous benchmarking report in Bencher

@msbrogli msbrogli force-pushed the feat/sync-v2-main-loop-interval branch 2 times, most recently from 8cef268 to ab1022c Compare November 18, 2024 20:21
@msbrogli msbrogli dismissed stale reviews from jansegre and glevco via 881fcc3 November 18, 2024 20:37
@msbrogli msbrogli force-pushed the feat/sync-v2-main-loop-interval branch from ab1022c to 881fcc3 Compare November 18, 2024 20:37
jansegre
jansegre previously approved these changes Nov 18, 2024
glevco
glevco previously approved these changes Nov 18, 2024
@msbrogli msbrogli dismissed stale reviews from glevco and jansegre via b0ac1f5 November 19, 2024 20:39
@msbrogli msbrogli force-pushed the feat/sync-v2-main-loop-interval branch 2 times, most recently from b0ac1f5 to 8a9fbb2 Compare November 19, 2024 20:39
glevco
glevco previously approved these changes Nov 19, 2024
@msbrogli msbrogli force-pushed the feat/sync-v2-main-loop-interval branch from b53a41d to d91513e Compare November 19, 2024 21:12
@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.93%. Comparing base (dc3c7ca) to head (d91513e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1184      +/-   ##
==========================================
+ Coverage   84.89%   84.93%   +0.04%     
==========================================
  Files         323      323              
  Lines       24984    24985       +1     
  Branches     3834     3834              
==========================================
+ Hits        21210    21222      +12     
+ Misses       3035     3028       -7     
+ Partials      739      735       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@msbrogli msbrogli merged commit d91513e into master Nov 19, 2024
@msbrogli msbrogli deleted the feat/sync-v2-main-loop-interval branch November 19, 2024 21:42
@jansegre jansegre mentioned this pull request Nov 21, 2024
2 tasks
@jansegre jansegre mentioned this pull request Dec 11, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants