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

Sync issue #8870

Open
tbenr opened this issue Dec 2, 2024 · 0 comments
Open

Sync issue #8870

tbenr opened this issue Dec 2, 2024 · 0 comments

Comments

@tbenr
Copy link
Contributor

tbenr commented Dec 2, 2024

Context

When we requests new blocks\blobs we run:

public void requestMoreBlocks(final Runnable callback) {
...
    SafeFuture.allOfFailFast(blocksRequest, blobSidecarsRequest)
        .thenRunAsync(
            () -> onRequestComplete(blockRequestHandler, maybeBlobSidecarRequestHandler),
...
}            

Down the line, blocksRequest and blobSidecarsRequest call:

private <I extends RpcRequest, O extends SszData> SafeFuture<Void> sendEth2Request(

Problem

When we are rate limited or by the node we are requesting data from, the node will disconnect us by sending a GoodbyeMessage.

In that scenario we close all connections and we and up calling RpcHandler::onRemoteWriteClosed which will call Eth2OutgoingRequestHandler::readComplete.
So we will end up considering all inflight requests to the peer as completed and run onRequestComplete as nothing happened.

In that method we do an early validation of blocks and blobs. The first validation is a simple one and unlikely to fail even if we are dealing with incomplete block response. The blobSidecar validation (validateNewBlobSidecars) easely fails if we receive less blobs than expected. This could happen if the rate limit happens on the blobsByRange portion of the batch, while blocksByRange is not rate limited.

When this validation fails, we consider the peer as behaving badly and we apply a big penalty.

Possible solution

sendEth2Request could start giving more feedback instead of returning SafeFuture<Void> to be able to discriminate between an actual completed request and a request that has been interrupted along the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant