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

Add floodPublish CLI flag #8610

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KatyaRyazantseva
Copy link
Contributor

PR Description

Add --p2p-flood-publish-enabled CLI flag to enable/disable flood publishing.

Fixed Issue(s)

fixes #8559

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.

@@ -284,6 +288,11 @@ public Builder peerRequestLimit(final Integer peerRequestLimit) {
return this;
}

public Builder isFloodPublishEnabled(final Boolean floodPublishEnabled) {
isFloodPublishEnabled = floodPublishEnabled;
Copy link
Contributor

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;
Copy link
Contributor

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 ?

Copy link
Contributor

@Nashatyrev Nashatyrev left a 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

@KatyaRyazantseva KatyaRyazantseva marked this pull request as ready for review September 18, 2024 11:23
Copy link
Contributor

@tbenr tbenr left a 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,
Copy link
Contributor

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.

@KatyaRyazantseva
Copy link
Contributor Author

@tbenr ready for the test review

@tbenr tbenr added the doc-change-required Indicates an issue or PR that requires doc to be updated label Sep 20, 2024
Copy link
Contributor

@tbenr tbenr left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-change-required Indicates an issue or PR that requires doc to be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make floodPublish under CLI flag control
3 participants