-
Notifications
You must be signed in to change notification settings - Fork 304
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 BlocksByRange RPC requests when count is 0 #8341
Merged
StefanBratanov
merged 12 commits into
Consensys:master
from
StefanBratanov:rpc_requests_improvement
May 29, 2024
Merged
Fix BlocksByRange RPC requests when count is 0 #8341
StefanBratanov
merged 12 commits into
Consensys:master
from
StefanBratanov:rpc_requests_improvement
May 29, 2024
Conversation
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
gfukushima
reviewed
May 29, 2024
.../pegasys/teku/networking/eth2/rpc/beaconchain/methods/BeaconBlocksByRangeMessageHandler.java
Show resolved
Hide resolved
gfukushima
reviewed
May 29, 2024
...egasys/teku/spec/datastructures/networking/libp2p/rpc/BeaconBlocksByRangeRequestMessage.java
Show resolved
Hide resolved
StefanBratanov
force-pushed
the
rpc_requests_improvement
branch
from
May 29, 2024 08:25
4f597ca
to
2d0c4f7
Compare
StefanBratanov
changed the title
Reject ByRange RPC requests when count is 0
Handle ByRange RPC requests when count is 0
May 29, 2024
StefanBratanov
changed the title
Handle ByRange RPC requests when count is 0
Fix BeaconBlocksByRange RPC requests when count is 0
May 29, 2024
@gfukushima after some discussion with Enrico and Mehdi, we decided to change the logic to be able to handle such requests, just letting you know |
StefanBratanov
force-pushed
the
rpc_requests_improvement
branch
from
May 29, 2024 09:46
c8054b0
to
1c5d436
Compare
StefanBratanov
changed the title
Fix BeaconBlocksByRange RPC requests when count is 0
Fix BlocksByRange RPC requests when count is 0
May 29, 2024
storage/src/main/java/tech/pegasys/teku/storage/server/CombinedStorageChannelSplitter.java
Outdated
Show resolved
Hide resolved
mehdi-aouadi
approved these changes
May 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
We had an error processing RPC blocks by range request when count is set to 0
We technically should be able to handle such requests even if they are deemed useless. We have requests limiting so we are not prone to DOS attacks.
Had to also fix
BlobSidecarsByRange
sincemaxSlot
was not calculated correctly forcount == 0
Added tests for both blocks and blob sidecars to ensure they both work.
Did some other small refactors along the way.
Fixed Issue(s)
N/A
Documentation
doc-change-required
label to this PR if updates are required.Changelog