Skip to content

eth/executionclient: halve batch size on websocket read limit #2247

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

Closed
wants to merge 1 commit into from

Conversation

nkryuchkov
Copy link
Contributor

Increasing DefaultHistoricalLogsBatchSize from 200 to 1000 in #2204 caused syncing from a new database to fail due to the websocket: read limit exceeded error.

The PR adds the mentioned error to the list of errors when subdivision applies

@kchojn Do you think it's worth reducing the DefaultHistoricalLogsBatchSize to something in the middle?

Copy link

codecov bot commented May 31, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 49.7%. Comparing base (bd5a043) to head (7ccbc59).

Files with missing lines Patch % Lines
eth/executionclient/errors.go 25.0% 2 Missing and 1 partial ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@kchojn kchojn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, we should restore the previous limit (200), if this one was tested and reliable and caused less chance of errors.
This solution seems to be just a workaround for the underlying issue. The proper fix would be to make the ws read limit configurable on the client side: ethereum/go-ethereum#27801

e.g.:

rpcClient, err := rpc.DialOptions(ctx, ec.nodeAddr, 
    rpc.WithWebsocketMessageSizeLimit(10 * 1024 * 1024), 
)

ec.client = ethclient.NewClient(rpcClient)

let me know what do you think

@nkryuchkov
Copy link
Contributor Author

nkryuchkov commented May 31, 2025

In my opinion, we should restore the previous limit (200), if this one was tested and reliable and caused less chance of errors.

This solution seems to be just a workaround for the underlying issue. The proper fix would be to make the ws read limit configurable on the client side: ethereum/go-ethereum#27801

e.g.:

rpcClient, err := rpc.DialOptions(ctx, ec.nodeAddr, 

    rpc.WithWebsocketMessageSizeLimit(10 * 1024 * 1024), 

)



ec.client = ethclient.NewClient(rpcClient)

let me know what do you think

@kchojn sounds good, let's just change the value then and close this PR until we develop a reliable solution

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

Successfully merging this pull request may close these issues.

2 participants