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

Fix codec size for large blocks #423

Merged
merged 8 commits into from
Dec 19, 2023
Merged

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Dec 11, 2023

Why this should be merged

Initializing the codec as such:

https://github.com/ava-labs/coreth/blame/abde8d63c32d75b8e966e41eabea0051a2ffa50d/plugin/evm/message/codec.go#L24-L25

does not result in the codec's max slice marshal capacity increasing (see https://github.com/ava-labs/avalanchego/blob/master/codec/linearcodec/codec.go#L55-L65)

Fixes ava-labs/avalanchego#2454

Also this reduces the log level for retrying failed messages from peers to Debug so invalid responses cannot cause syncing clients to log @ info.

How this works

Calls NewCustomMaxLength.

How this was tested

Fixes the UT to encode a large block

@darioush darioush marked this pull request as ready for review December 11, 2023 18:25
marun
marun previously approved these changes Dec 11, 2023
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

changes LGTM just left few questions

sync/client/client.go Show resolved Hide resolved
@StephenButtolph StephenButtolph merged commit 862a565 into master Dec 19, 2023
8 checks passed
@StephenButtolph StephenButtolph deleted the codec-size-large-blocks-fix branch December 19, 2023 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

failed to marshal BlockResponse, dropping request (…) max slice length exceeded
6 participants