-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add floodPublish
CLI flag
#8610
base: master
Are you sure you want to change the base?
Conversation
74b3c69
to
1a15d12
Compare
@@ -284,6 +288,11 @@ public Builder peerRequestLimit(final Integer peerRequestLimit) { | |||
return this; | |||
} | |||
|
|||
public Builder isFloodPublishEnabled(final Boolean floodPublishEnabled) { | |||
isFloodPublishEnabled = floodPublishEnabled; |
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.
I would add explicit this.
to be in line with the rest of code
@@ -42,6 +43,7 @@ public class P2PConfig { | |||
public static final int DEFAULT_BATCH_VERIFY_QUEUE_CAPACITY = 15_000; | |||
public static final int DEFAULT_BATCH_VERIFY_MAX_BATCH_SIZE = 250; | |||
public static final boolean DEFAULT_BATCH_VERIFY_STRICT_THREAD_LIMIT_ENABLED = false; | |||
public static final boolean DEFAULT_FLOOD_PUBLISH_ENABLED = true; |
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.
Doesn't it duplicate the same constant in GossipConfig
?
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.
LGTM, but I would let someone from Teku team approve this PR as well
Just some nits from my side
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.
Thanks! looks nice!
I'd fix the hidden
property and add a test in P2POptionsTest
. There we check that the parameter actually affects the configuration.
paramLabel = "<BOOLEAN>", | ||
showDefaultValue = Visibility.ALWAYS, | ||
description = "Enables gossip 'floodPublish' feature", | ||
hidden = true, |
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.
unit tests detected this is declared hidden even if it is not a --X
config. You should remove this.
@tbenr ready for the test review |
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.
LGTM! Thanks!
PR Description
Add
--p2p-flood-publish-enabled
CLI flag to enable/disable flood publishing.Fixed Issue(s)
fixes #8559
Documentation
doc-change-required
label to this PR if updates are required.Changelog