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

Rename Obol DVT flag #8077

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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