Add BlocksBy* protocols with specific block_root #7096
Closed
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
@AgeManning pointed to me that we can have experimental ReqResp protocols in Lighthouse :) so here we go
Implements
a new ReqResp protocol to make have better attributability of malicious sync peers when range syncing. See the spec PR for more details
Proposed Changes
Since the spec is not agreed upon yet, this PR implements a new namespaces "feature" protocol suffixed by the spec PR number:
BlocksByRangeV2_3845
,BlobsByRangeV1_3845
,DataColumnsByRangeV1_3845
. Note that we may have a newBlocksByRangeV3
protocol in the future before the 3845 feature is merged, thus havingBlocksByRangeV2_3845
andBlocksByRangeV3_3845
.These new protocol can exist in Lighthouse nodes only who will use them between themselves. They can also be deprecated in the future without coordination if the feature is merged or abandoned.
Requester changes
On a syncing chain of type Head that with peers with a Status message (head_root, head_slot), include
head_root
in the request.Server changes
BlocksByRange
requests #7058 + Split block root lookups between fork choice and store on BBR response #7066 to have fork-choice accessThen instead of querying the fork-choice for blocks with the head root, query by the request block_root.