Skip to content

Commit

Permalink
Rename Obol DVT flag (#8077)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha authored Mar 14, 2024
1 parent aa13a39 commit 0b6ebe5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ public class ValidatorClientOptions {
ValidatorConfig.DEFAULT_VALIDATOR_CLIENT_USE_POST_VALIDATORS_ENDPOINT_ENABLED;

@Option(
names = {"--Xdvt-integration-enabled"},
names = {"--Xobol-dvt-integration-enabled"},
paramLabel = "<BOOLEAN>",
description =
"Use DVT endpoints to determine if a distributed validator has aggregation duties.",
arity = "0..1",
showDefaultValue = CommandLine.Help.Visibility.ALWAYS,
hidden = true,
fallbackValue = "true")
private boolean dvtSelectionsEndpointEnabled =
ValidatorConfig.DEFAULT_DVT_SELECTIONS_ENDPOINT_ENABLED;
private boolean obolDvtSelectionsEndpointEnabled =
ValidatorConfig.DEFAULT_OBOL_DVT_SELECTIONS_ENDPOINT_ENABLED;

public void configure(TekuConfiguration.Builder builder) {
configureBeaconNodeApiEndpoints();
Expand All @@ -99,7 +99,7 @@ public void configure(TekuConfiguration.Builder builder) {
.failoversSendSubnetSubscriptionsEnabled(failoversSendSubnetSubscriptionsEnabled)
.failoversPublishSignedDutiesEnabled(failoversPublishSignedDutiesEnabled)
.sentryNodeConfigurationFile(exclusiveParams.sentryConfigFile)
.dvtSelectionsEndpointEnabled(dvtSelectionsEndpointEnabled));
.obolDvtSelectionsEndpointEnabled(obolDvtSelectionsEndpointEnabled));
}

private void configureBeaconNodeApiEndpoints() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@ public void clientExecutorThreadsShouldThrowOverLimit() {
}

@Test
public void shouldSetUseDvtSelectionsEndpoint() {
final String[] args = {"vc", "--network", "minimal", "--Xdvt-integration-enabled"};
public void shouldSetUseObolDvtSelectionsEndpoint() {
final String[] args = {"vc", "--network", "minimal", "--Xobol-dvt-integration-enabled"};
final TekuConfiguration config = getTekuConfigurationFromArguments(args);

assertThat(config.validatorClient().getValidatorConfig().isDvtSelectionsEndpointEnabled())
.isTrue();
}

@Test
public void shouldNotUseDvtSelectionsEndpointByDefault() {
public void shouldNotUseObolDvtSelectionsEndpointByDefault() {
final String[] args = {"vc", "--network", "minimal"};
final TekuConfiguration config = getTekuConfigurationFromArguments(args);
assertThat(config.validatorClient().getValidatorConfig().isDvtSelectionsEndpointEnabled())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class ValidatorConfig {
public static final boolean DEFAULT_VALIDATOR_BLINDED_BLOCKS_ENABLED = false;
public static final int DEFAULT_VALIDATOR_REGISTRATION_SENDING_BATCH_SIZE = 100;
public static final UInt64 DEFAULT_BUILDER_REGISTRATION_GAS_LIMIT = UInt64.valueOf(30_000_000);
public static final boolean DEFAULT_DVT_SELECTIONS_ENDPOINT_ENABLED = false;
public static final boolean DEFAULT_OBOL_DVT_SELECTIONS_ENDPOINT_ENABLED = false;

private final List<String> validatorKeys;
private final List<String> validatorExternalSignerPublicKeySources;
Expand Down Expand Up @@ -406,7 +406,7 @@ public static final class Builder {
private int executorThreads = DEFAULT_VALIDATOR_EXECUTOR_THREADS;
private boolean isLocalSlashingProtectionSynchronizedModeEnabled =
DEFAULT_VALIDATOR_IS_LOCAL_SLASHING_PROTECTION_SYNCHRONIZED_ENABLED;
private boolean dvtSelectionsEndpointEnabled = DEFAULT_DVT_SELECTIONS_ENDPOINT_ENABLED;
private boolean dvtSelectionsEndpointEnabled = DEFAULT_OBOL_DVT_SELECTIONS_ENDPOINT_ENABLED;

private Builder() {}

Expand Down Expand Up @@ -647,7 +647,7 @@ public Builder isLocalSlashingProtectionSynchronizedModeEnabled(
return this;
}

public Builder dvtSelectionsEndpointEnabled(final boolean dvtSelectionsEndpointEnabled) {
public Builder obolDvtSelectionsEndpointEnabled(final boolean dvtSelectionsEndpointEnabled) {
this.dvtSelectionsEndpointEnabled = dvtSelectionsEndpointEnabled;
return this;
}
Expand Down

0 comments on commit 0b6ebe5

Please sign in to comment.