Revise logging in BlobsByRoot requests#8296
Merged
Merged
Conversation
chong-he
commented
Oct 27, 2025
| request: BlobsByRootRequest, | ||
| ) -> Result<(), (RpcErrorResponse, &'static str)> { | ||
| let requested_roots: Vec<Hash256> = | ||
| request.blob_ids.iter().map(|id| id.block_root).collect(); |
Member
Author
There was a problem hiding this comment.
A note that the behaviour before #7756 is to always return the first block_root
A (possibly) desirable outcome from this is, we can deduce to know that if we are rejecting BlobsByRoot request after Fulu slots, for example, if returned = 0, then we can look for the block_root(s) and check if they are all Fulu, and if they are, then we know we don't return anything
jimmygchen
reviewed
Oct 27, 2025
| inbound_request_id: InboundRequestId, | ||
| request: BlobsByRootRequest, | ||
| ) -> Result<(), (RpcErrorResponse, &'static str)> { | ||
| let requested_roots: Vec<Hash256> = |
Member
There was a problem hiding this comment.
I think we can use HashSet here to deduplicate block roots?
10 tasks
This file contains hidden or 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
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.
Issue Addressed
#7756 introduces a logging issue, where the relevant log:
lighthouse/beacon_node/network/src/network_beacon_processor/rpc_methods.rs
Lines 380 to 385 in da5b231
obtains the
block_rootfromslots_by_block_root.keys(). If theblock_rootis empty (block not found in the data availability checker), then the log will not show any block root:DEBUG BlobsByRoot outgoing response processed peer_id: 16Uiu2HAmCBxs1ZFfsbAfhSA98rUUL8Q1egLPb6WpGdKZxX6HqQYX, block_root: [], returned: 4This PR revises to return the
block_rootin the request as a vector of block root