-
Notifications
You must be signed in to change notification settings - Fork 844
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
Drop messages that exceeds local message size limit #7507
Drop messages that exceeds local message size limit #7507
Conversation
return new NewBlockMessage(out.encoded()); | ||
final Bytes data = out.encoded(); | ||
if (data.size() > maxMessageSize) { | ||
throw new IllegalArgumentException("Block message is larger than allowed message size"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to include the sizes in the message
Block message size 500Mb is larger than allowed message size 200Mb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amended to reflect the size, let's stick with the original size in bytes, rounding in terms of MB might result in error messages of the following -> Block message size 10Mb is larger than allowed message size 10Mb
} catch (final IllegalArgumentException e) { | ||
LOG.error("Failed to create block", e); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the implications of catching this here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@macfarla Original send
in EthPeers catches the error (when message size > limit) instead of throwing it up. Would it better to throw the error? I wasn't too sure on the original intention when they caught the error instead of throwing it.
e606b3d
to
c790598
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, please have a look.
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/messages/NewBlockMessage.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Rodion Lim <[email protected]>
250ac98
to
bdbf748
Compare
@pinges, do the tests re-run on their own? Are the failures due to the code changes made in this PR or these are intermittent errors that will be resolved on a re-run? |
PR description
This PR is raised to add the following behaviour whenever sending messages across the network:
Fixed Issue(s)
fixes #5455
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests