Skip to content

fix(sync-v2): Fix streamer sending more blocks than expected#839

Merged
msbrogli merged 1 commit intomasterfrom
fix/sync-v2-exceeding-max-blocks
Oct 27, 2023
Merged

fix(sync-v2): Fix streamer sending more blocks than expected#839
msbrogli merged 1 commit intomasterfrom
fix/sync-v2-exceeding-max-blocks

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Oct 27, 2023

Motivation

Sync-v2 streamer was sending more blocks than expected. Then, the peer was closing the connection causing tests to randomly fail. I haven't confirmed yet but I think this edge case happens when a reorg occurs during the sync.

Acceptance Criteria

  1. Send the expected number of blocks to receive when requesting a streaming of blocks.
  2. Fix streamer to follow the limit requested by the other peer.

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 self-assigned this Oct 27, 2023
@msbrogli msbrogli requested a review from jansegre as a code owner October 27, 2023 05:17
@msbrogli msbrogli force-pushed the refactor/sync-v2-agent branch from fa66c90 to 897e743 Compare October 27, 2023 05:20
@msbrogli msbrogli force-pushed the fix/sync-v2-exceeding-max-blocks branch from cf82fe1 to 4c9500e Compare October 27, 2023 05:21
@msbrogli msbrogli force-pushed the refactor/sync-v2-agent branch 3 times, most recently from ab90d2e to 4e38833 Compare October 27, 2023 06:05
@msbrogli msbrogli force-pushed the fix/sync-v2-exceeding-max-blocks branch from 4c9500e to c5be132 Compare October 27, 2023 06:06
@msbrogli msbrogli force-pushed the refactor/sync-v2-agent branch from 4e38833 to d65b21f Compare October 27, 2023 06:19
@msbrogli msbrogli force-pushed the fix/sync-v2-exceeding-max-blocks branch from c5be132 to 4642771 Compare October 27, 2023 06:24
@msbrogli msbrogli changed the base branch from refactor/sync-v2-agent to master October 27, 2023 06:24
@msbrogli msbrogli force-pushed the fix/sync-v2-exceeding-max-blocks branch from 4642771 to a27e9a4 Compare October 27, 2023 06:27
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0a78bb9) 84.55% compared to head (a27e9a4) 84.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #839      +/-   ##
==========================================
+ Coverage   84.55%   84.57%   +0.01%     
==========================================
  Files         270      270              
  Lines       22290    22291       +1     
  Branches     3406     3406              
==========================================
+ Hits        18848    18853       +5     
+ Misses       2769     2768       -1     
+ Partials      673      670       -3     
Files Coverage Δ
hathor/p2p/sync_v2/agent.py 74.45% <85.71%> (+0.32%) ⬆️

... and 4 files with indirect coverage changes

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

@msbrogli msbrogli merged commit a27e9a4 into master Oct 27, 2023
@msbrogli msbrogli deleted the fix/sync-v2-exceeding-max-blocks branch October 27, 2023 15:55
@jansegre jansegre mentioned this pull request Nov 13, 2023
2 tasks
This was referenced Dec 20, 2023
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.

2 participants