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

Improve BlocksByRangeMessage validation #9085

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Feb 5, 2025

Apply what we already did for BlobSidecars

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.

Copy link
Contributor

@mehdi-aouadi mehdi-aouadi left a comment

Choose a reason for hiding this comment

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

LGTM
I'd suggest adding a test though

@tbenr
Copy link
Contributor Author

tbenr commented Feb 5, 2025

@mehdi-aouadi
I realized I wasn't addressing the actual problem we saw on devnet

2025-02-03 17:38:19.009 ERROR - Unhandled error while processing request /eth2/beacon_chain/req/beacon_blocks_by_range/2/ssz_snappy
java.lang.ArithmeticException: uint64 overflow
at tech.pegasys.teku.infrastructure.unsigned.UInt64.plus(UInt64.java:142) ~[teku-infrastructure-unsigned-develop.jar:UNKNOWN+g96c73da]
at tech.pegasys.teku.infrastructure.unsigned.UInt64.plus(UInt64.java:137) ~[teku-infrastructure-unsigned-develop.jar:UNKNOWN+g96c73da]
at tech.pegasys.teku.spec.datastructures.networking.libp2p.rpc.BeaconBlocksByRangeRequestMessage.getMaxSlot(BeaconBlocksByRangeRequestMessage.java:70) ~[teku-ethereum-spec-develop.jar:UNKNOWN+g96c73da]
at tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.BeaconBlocksByRangeMessageHandler.validateRequest(BeaconBlocksByRangeMessageHandler.java:84) ~[teku-networking-eth2-develop.jar:UNKNOWN+g96c73da]
at tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.BeaconBlocksByRangeMessageHandler.validateRequest(BeaconBlocksByRangeMessageHandler.java:51) ~[teku-networking-eth2-develop.jar:UNKNOWN+g96c73da]

addressed now, and added 2 tests

@mehdi-aouadi mehdi-aouadi self-requested a review February 5, 2025 16:29
Copy link
Contributor

@mehdi-aouadi mehdi-aouadi left a comment

Choose a reason for hiding this comment

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

LGTM

@tbenr tbenr enabled auto-merge (squash) February 5, 2025 16:29
@tbenr tbenr merged commit 6748b5d into master Feb 5, 2025
18 checks passed
@tbenr tbenr deleted the improve-BlocksByRangeMessage-validation branch February 5, 2025 16:44
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