From e61fbac2b9281b9bd9ea606dcdb4cb93a736a624 Mon Sep 17 00:00:00 2001 From: Enrico Del Fante Date: Mon, 30 Sep 2024 14:43:37 +0200 Subject: [PATCH] hide param --- CHANGELOG.md | 2 +- .../main/java/tech/pegasys/teku/cli/options/P2POptions.java | 3 ++- .../java/tech/pegasys/teku/cli/options/P2POptionsTest.java | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f00bb633755..df8de0f05c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ - Implemented [PostAggregateAndProofsV2](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/publishAggregateAndProofsV2) (adding support for Electra) - Added support for [Ephemery Testnet](https://github.com/ephemery.dev) `--network=ephemery` - Updated bootnodes for Holesky network -- Disabled flood publish behaviour on all p2p subnets. New `--p2p-flood-publish-enabled` parameter can be used to re-enable it, restoring previous behaviour. +- Disabled flood publish behaviour on all p2p subnets. `--Xp2p-flood-publish-enabled` experimental parameter can be used to re-enable it, restoring previous behaviour. - Add a fix for [CVE-2024-7254](https://avd.aquasec.com/nvd/2024/cve-2024-7254/) - Updated LUKSO configuration with Deneb fork scheduled for epoch 123075 (November 20, 2024, 16:20:00 UTC) - Support for `IDONTWANT` libp2p protocol messages diff --git a/teku/src/main/java/tech/pegasys/teku/cli/options/P2POptions.java b/teku/src/main/java/tech/pegasys/teku/cli/options/P2POptions.java index d08cfd6ecc5..1eb119ff67a 100644 --- a/teku/src/main/java/tech/pegasys/teku/cli/options/P2POptions.java +++ b/teku/src/main/java/tech/pegasys/teku/cli/options/P2POptions.java @@ -370,11 +370,12 @@ The network interface(s) on which the node listens for P2P communication. // More about flood publishing // https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#flood-publishing @Option( - names = {"--p2p-flood-publish-enabled"}, + names = {"--Xp2p-flood-publish-enabled"}, paramLabel = "", showDefaultValue = Visibility.ALWAYS, description = "Enables gossip 'floodPublish' feature", arity = "0..1", + hidden = true, fallbackValue = "true") private boolean floodPublishEnabled = GossipConfig.DEFAULT_FLOOD_PUBLISH_ENABLED; diff --git a/teku/src/test/java/tech/pegasys/teku/cli/options/P2POptionsTest.java b/teku/src/test/java/tech/pegasys/teku/cli/options/P2POptionsTest.java index 0afbc3add4e..474e4377725 100644 --- a/teku/src/test/java/tech/pegasys/teku/cli/options/P2POptionsTest.java +++ b/teku/src/test/java/tech/pegasys/teku/cli/options/P2POptionsTest.java @@ -349,21 +349,21 @@ public void floodPublishEnabled_defaultIsSetCorrectly() { @Test public void floodPublishEnabled_shouldNotRequireAValue() { final TekuConfiguration config = - getTekuConfigurationFromArguments("--p2p-flood-publish-enabled"); + getTekuConfigurationFromArguments("--Xp2p-flood-publish-enabled"); assertThat(config.network().getGossipConfig().isFloodPublishEnabled()).isTrue(); } @Test public void floodPublishEnabled_true() { final TekuConfiguration config = - getTekuConfigurationFromArguments("--p2p-flood-publish-enabled=true"); + getTekuConfigurationFromArguments("--Xp2p-flood-publish-enabled=true"); assertThat(config.network().getGossipConfig().isFloodPublishEnabled()).isTrue(); } @Test public void floodPublishEnabled_false() { final TekuConfiguration config = - getTekuConfigurationFromArguments("--p2p-flood-publish-enabled=false"); + getTekuConfigurationFromArguments("--Xp2p-flood-publish-enabled=false"); assertThat(config.network().getGossipConfig().isFloodPublishEnabled()).isFalse(); }