Skip to content

Conversation

@lucassaldanha
Copy link
Member

@lucassaldanha lucassaldanha commented Oct 6, 2025

PR Description

Adjust the length of the list of DataColumnsByRootIdentifier to match the definition in the spec.

Spec reference: https://github.com/ethereum/consensus-specs/pull/4284/files

I believe this was missed after ethereum/consensus-specs#4284 was merged.

Also, we are removing the current validation on DataColumnSidecarsByRootMessageHandler.validateRequest(), given this will be done as part of decoding the request on Eth2IncomingRequestHandler (when it decodes the ByteBuf into the ssz container it will enforce the sizes).

Fixed Issue(s)

N/A

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Switch request list max size to getMaxRequestBlocksDeneb and remove explicit handler validation, relying on SSZ decoding; update tests accordingly.

  • Spec/datastructures:
    • DataColumnSidecarsByRootRequestMessageSchema: set list max length from SpecConfigFulu.getMaxRequestBlocksDeneb.
  • Networking/RPC:
    • DataColumnSidecarsByRootMessageHandler: remove validateRequest size check and related SpecConfigFulu usage; minor javadoc/metric string tidy.
  • Tests:
    • Update schema test to compare schema.getMaxLength() to getMaxRequestBlocksDeneb.
    • Remove handler test asserting max request size validation; keep remaining behavior tests unchanged.

Written by Cursor Bugbot for commit beab547. This will update automatically on new commits. Configure here.

@lucassaldanha lucassaldanha requested a review from zilm13 October 6, 2025 23:08
Copy link
Contributor

@gfukushima gfukushima left a comment

Choose a reason for hiding this comment

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

lgtm

@lucassaldanha
Copy link
Member Author

@zilm13 I'd like your input on this one. I just noticed that although we didn't have the hard limit on the schema, we did have an explicit RPC validation for the length on DataColumnSidecarsByRootMessageHandlervalidateRequest(..).

I am wondering if you have any insights on why we did it this way, instead of having it as part of the request schema as we usually do.

@lucassaldanha lucassaldanha added the DO NOT MERGE Not ready to merge label Oct 7, 2025
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM
Looks like we missed it on changes, thank you for finding!

}

@Override
public Optional<RpcException> validateRequest(
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing this because this will be done as part of decoding the request on Eth2IncomingRequestHandler (when it decodes the ByteBuf into the ssz container, it will enforce the sizes)

final String protocolId, final DataColumnSidecarsByRootRequestMessage request) {
final int maxRequestIdentifiers = specConfigFulu.getMaxRequestBlocksDeneb();
if (request.size() > maxRequestIdentifiers) {
requestCounter.labels("count_too_big").inc();
Copy link
Member Author

Choose a reason for hiding this comment

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

We do lose this counter on count_too_big. Do we even care @zilm13 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Metrics is not a big loss, but we don't penalize peer in any manner, don't count request happened, just disconnect and that's all. In case of real DoS it could be disadvantage

@lucassaldanha lucassaldanha removed the DO NOT MERGE Not ready to merge label Oct 9, 2025
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

@lucassaldanha lucassaldanha enabled auto-merge (squash) October 10, 2025 00:12
@lucassaldanha lucassaldanha merged commit 8efe310 into Consensys:master Oct 10, 2025
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2025
@lucassaldanha lucassaldanha deleted the fix-by-root-validation branch October 10, 2025 01:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants