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

catchup: Provide more information to client when requested block not available #5819

Merged
merged 6 commits into from Nov 8, 2023

Conversation

cce
Copy link
Contributor

@cce cce commented Nov 6, 2023

Summary

When a node requests a block that is outside the range that a node contains, it returns a 404 (for HTTP catchup) or an {ErrorKey: blockNotAvailableErrMsg} value (for websockets catchup). This provides more information to the client so it can more effectively request and poll for new blocks.

Test Plan

Updated TestUGetBlockWs and TestUGetBlockHTTP.

@cce cce added the Enhancement label Nov 6, 2023
@cce cce force-pushed the blockNotAvailableErrMsg-latest branch from 4b8f748 to 28bb8fb Compare November 6, 2023 16:20
@cce cce marked this pull request as ready for review November 6, 2023 16:21
@cce cce force-pushed the blockNotAvailableErrMsg-latest branch from 28bb8fb to 2b32cee Compare November 6, 2023 16:22
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #5819 (623d4f1) into master (c4e94fe) will increase coverage by 0.01%.
Report is 17 commits behind head on master.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #5819      +/-   ##
==========================================
+ Coverage   55.57%   55.59%   +0.01%     
==========================================
  Files         475      475              
  Lines       66838    66850      +12     
==========================================
+ Hits        37147    37163      +16     
  Misses      27172    27172              
+ Partials     2519     2515       -4     
Files Coverage Δ
catchup/universalFetcher.go 95.26% <100.00%> (-0.37%) ⬇️
rpcs/blockService.go 73.33% <28.57%> (-1.01%) ⬇️

... and 7 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

algorandskiy
algorandskiy previously approved these changes Nov 6, 2023
catchup/universalFetcher.go Outdated Show resolved Hide resolved
@algorandskiy algorandskiy merged commit 7ebb9f4 into algorand:master Nov 8, 2023
18 checks passed
@cce cce deleted the blockNotAvailableErrMsg-latest branch November 8, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants