Skip to content

Commit

Permalink
[Merge] unhide --Xvalidators-proposer-* (#5153)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr authored Mar 10, 2022
1 parent ec6f0f4 commit a5f15f4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class ExecutionEngineOptions {
names = {"--ee-endpoint"},
paramLabel = "<NETWORK>",
description = "URL for Execution Engine node.",
arity = "1",
hidden = true)
arity = "1")
private String executionEngineEndpoint = null;

@Option(
Expand All @@ -51,7 +50,6 @@ public class ExecutionEngineOptions {
private List<String> mevUrls = new ArrayList<>();

@Option(
hidden = true,
names = {"--ee-jwt-secret-file"},
paramLabel = "<FILENAME>",
description =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,35 @@

package tech.pegasys.teku.cli.options;

import picocli.CommandLine.Help.Visibility;
import picocli.CommandLine.Option;
import tech.pegasys.teku.config.TekuConfiguration;
import tech.pegasys.teku.validator.api.ValidatorConfig;

public class ValidatorProposerOptions {
@Option(
names = {"--Xvalidators-proposer-default-fee-recipient"},
names = {"--validators-proposer-default-fee-recipient"},
paramLabel = "<ADDRESS>",
description =
"Default fee recipient sent to the execution engine, which could use it as fee recipient when producing a new execution block.",
arity = "0..1",
hidden = true)
arity = "0..1")
private String proposerDefaultFeeRecipient = null;

@Option(
names = {"--Xvalidators-proposer-config"},
names = {"--validators-proposer-config"},
paramLabel = "<STRING>",
description = "remote URL or local file path to load proposer configuration from",
arity = "0..1",
hidden = true)
arity = "0..1")
private String proposerConfig = null;

@Option(
names = {"--Xvalidators-proposer-config-refresh-enabled"},
names = {"--validators-proposer-config-refresh-enabled"},
paramLabel = "<BOOLEAN>",
showDefaultValue = Visibility.ALWAYS,
description =
"Enable the proposer configuration reload on every proposer preparation (once per epoch)",
arity = "0..1",
fallbackValue = "true",
hidden = true)
fallbackValue = "true")
private boolean proposerConfigRefreshEnabled =
ValidatorConfig.DEFAULT_VALIDATOR_PROPOSER_CONFIG_REFRESH_ENABLED;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void shouldReportEmptyIfFeeRecipientNotSpecified() {
@Test
public void shouldReportAddressIfFeeRecipientSpecified() {
final String[] args = {
"--Xvalidators-proposer-default-fee-recipient", "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
"--validators-proposer-default-fee-recipient", "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
};
final TekuConfiguration config = getTekuConfigurationFromArguments(args);
assertThat(config.validatorClient().getValidatorConfig().getProposerDefaultFeeRecipient())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private void validateProposerDefaultFeeRecipientOrProposerConfigSource() {
&& proposerConfigSource.isEmpty()
&& !(validatorKeys.isEmpty() && validatorExternalSignerPublicKeySources.isEmpty())) {
throw new InvalidConfigurationException(
"Invalid configuration. --Xvalidators-proposer-default-fee-recipient or --Xvalidators-proposer-config must be specified when Bellatrix milestone is active");
"Invalid configuration. --validators-proposer-default-fee-recipient or --validators-proposer-config must be specified when Bellatrix milestone is active");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@ void verifyProposerConfigOrProposerDefaultFeeRecipientThrow(final Runnable task)
Assertions.assertThatExceptionOfType(InvalidConfigurationException.class)
.isThrownBy(task::run)
.withMessageContaining(
"Invalid configuration. --Xvalidators-proposer-default-fee-recipient or --Xvalidators-proposer-config must be specified when Bellatrix milestone is active");
"Invalid configuration. --validators-proposer-default-fee-recipient or --validators-proposer-config must be specified when Bellatrix milestone is active");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private Bytes20 getDefaultFeeRecipient(Optional<ProposerConfig> maybeProposerCon
.orElseThrow(
() ->
new InvalidConfigurationException(
"Invalid configuration. --Xvalidators-proposer-default-fee-recipient must be specified when Bellatrix milestone is active"));
"Invalid configuration. --validators-proposer-default-fee-recipient must be specified when Bellatrix milestone is active"));
}

@Override
Expand Down

0 comments on commit a5f15f4

Please sign in to comment.