Skip to content
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

fix(download): body download range #1065

Merged
merged 7 commits into from
Jan 27, 2023
Merged

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Jan 27, 2023

Fix the logic around reset of the download range and terminating conditions for query_headers function:

  • Download range end was not taken into account when downloading blocks. (because it's exclusive, duh)
  • Last request_range in set_download_range was not actually added to the queue
  • The request ranges had a faulty logic where the start of the range was initialized and the end wasn't resulting in erroneous ranges (e.g. 123..0)
  • StageError::Download is now considered fatal

@rkrasiuk rkrasiuk added C-bug An unexpected or incorrect behavior A-networking Related to networking in general labels Jan 27, 2023
@rkrasiuk rkrasiuk requested a review from mattsse January 27, 2023 14:05
@rkrasiuk rkrasiuk requested a review from onbjerg as a code owner January 27, 2023 14:05
@codecov-commenter
Copy link

Codecov Report

Merging #1065 (79b7dc3) into main (4a5a1db) will increase coverage by 0.07%.
The diff coverage is 71.42%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
+ Coverage   75.13%   75.21%   +0.07%     
==========================================
  Files         313      313              
  Lines       34305    34299       -6     
==========================================
+ Hits        25776    25797      +21     
+ Misses       8529     8502      -27     
Flag Coverage Δ
unit-tests 75.21% <71.42%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/stages/src/error.rs 57.14% <ø> (ø)
crates/net/downloaders/src/bodies/concurrent.rs 88.01% <71.42%> (+1.14%) ⬆️
crates/stages/src/stages/bodies.rs 92.74% <0.00%> (-0.22%) ⬇️
crates/net/network/src/peers/manager.rs 83.39% <0.00%> (-0.19%) ⬇️
crates/net/network/src/manager.rs 48.20% <0.00%> (+0.19%) ⬆️
crates/transaction-pool/src/pool/txpool.rs 59.32% <0.00%> (+0.50%) ⬆️
crates/net/eth-wire/src/capability.rs 63.10% <0.00%> (+0.97%) ⬆️
crates/net/network/src/listener.rs 83.72% <0.00%> (+2.32%) ⬆️
crates/transaction-pool/src/test_utils/mock.rs 59.70% <0.00%> (+6.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rkrasiuk rkrasiuk merged commit 8cfe240 into main Jan 27, 2023
@rkrasiuk rkrasiuk deleted the rkrasiuk/fix-bodies-download-range branch January 27, 2023 14:55
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 5, 2023
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 5, 2023
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants