Skip to content

Commit

Permalink
Remove no longer applicable engine version enum (#7311)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jun 28, 2023
1 parent f7fdf76 commit 0b5ef8a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 45 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ For information on changes in released versions of Teku, see the [releases page]

### Breaking Changes

- The Development option `--Xprogressive-balances-mode` has been removed and will no longer be recognised as a command line option.
- Network configs updated following Consensus Specs changes. If you run custom network, you will need to add [lines with network parameters](https://github.com/Consensys/teku/blob/f80e1de99cdbf50c905682241e24e19291a0881d/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml#L102-L139) to your custom config including Deneb constants if supported. If you are using a remote validator `auto` network feature, you will need to update both Beacon Node and Validator Client.
- The Development options `--Xprogressive-balances-mode` and `--Xee-version` have been removed and will no longer be recognised as command line options.
- Network configs updated following Consensus Specs changes. If you run custom network, you will need to add [lines with network parameters](https://github.com/Consensys/teku/blob/f80e1de99cdbf50c905682241e24e19291a0881d/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml#L102-L139) to your custom config including Deneb constants if supported. If you are using a remote validator `auto` network feature, you will need to update both Beacon Node and Validator Client.

### Additions and Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

package tech.pegasys.teku.ethereum.executionlayer;

import static com.google.common.base.Preconditions.checkNotNull;
import static tech.pegasys.teku.spec.config.Constants.MAXIMUM_CONCURRENT_EB_REQUESTS;
import static tech.pegasys.teku.spec.config.Constants.MAXIMUM_CONCURRENT_EE_REQUESTS;

Expand All @@ -38,7 +37,6 @@
import tech.pegasys.teku.ethereum.executionclient.web3j.Web3JClient;
import tech.pegasys.teku.ethereum.executionclient.web3j.Web3JExecutionEngineClient;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.exceptions.InvalidConfigurationException;
import tech.pegasys.teku.infrastructure.logging.EventLogger;
import tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory;
import tech.pegasys.teku.infrastructure.ssz.SszList;
Expand Down Expand Up @@ -118,15 +116,9 @@ public static ExecutionLayerManagerImpl create(
}

public static ExecutionEngineClient createEngineClient(
final Version version,
final Web3JClient web3JClient,
final TimeProvider timeProvider,
final MetricsSystem metricsSystem) {
checkNotNull(version);
LOG.info("Execution Engine version: {}", version);
if (version != Version.KILNV2) {
throw new InvalidConfigurationException("Unsupported execution engine version: " + version);
}
final ExecutionEngineClient engineClient = new Web3JExecutionEngineClient(web3JClient);
final ExecutionEngineClient metricEngineClient =
new MetricRecordingExecutionEngineClient(engineClient, timeProvider, metricsSystem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,4 @@ SafeFuture<BuilderPayload> builderGetPayload(
*/
SafeFuture<HeaderWithFallbackData> builderGetHeader(
ExecutionPayloadContext executionPayloadContext, BeaconState state);

enum Version {
KILNV2;

public static final Version DEFAULT_VERSION = KILNV2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import tech.pegasys.teku.infrastructure.exceptions.InvalidConfigurationException;
import tech.pegasys.teku.spec.Spec;
import tech.pegasys.teku.spec.SpecMilestone;
import tech.pegasys.teku.spec.executionlayer.ExecutionLayerChannel.Version;

public class ExecutionLayerConfiguration {
private static final Logger LOG = LogManager.getLogger();
Expand All @@ -43,7 +42,6 @@ public class ExecutionLayerConfiguration {

private final Spec spec;
private final Optional<String> engineEndpoint;
private final Version engineVersion;
private final Optional<String> engineJwtSecretFile;
private final Optional<String> builderEndpoint;
private final boolean isBuilderCircuitBreakerEnabled;
Expand All @@ -57,7 +55,6 @@ public class ExecutionLayerConfiguration {
private ExecutionLayerConfiguration(
final Spec spec,
final Optional<String> engineEndpoint,
final Version engineVersion,
final Optional<String> engineJwtSecretFile,
final Optional<String> builderEndpoint,
final boolean isBuilderCircuitBreakerEnabled,
Expand All @@ -69,7 +66,6 @@ private ExecutionLayerConfiguration(
final boolean exchangeCapabilitiesEnabled) {
this.spec = spec;
this.engineEndpoint = engineEndpoint;
this.engineVersion = engineVersion;
this.engineJwtSecretFile = engineJwtSecretFile;
this.builderEndpoint = builderEndpoint;
this.isBuilderCircuitBreakerEnabled = isBuilderCircuitBreakerEnabled;
Expand Down Expand Up @@ -105,10 +101,6 @@ public Optional<String> getEngineJwtSecretFile() {
return engineJwtSecretFile;
}

public Version getEngineVersion() {
return engineVersion;
}

public Optional<String> getBuilderEndpoint() {
return builderEndpoint;
}
Expand Down Expand Up @@ -144,7 +136,6 @@ public boolean getBuilderSetUserAgentHeader() {
public static class Builder {
private Spec spec;
private Optional<String> engineEndpoint = Optional.empty();
private Version engineVersion = Version.DEFAULT_VERSION;
private Optional<String> engineJwtSecretFile = Optional.empty();
private Optional<String> builderEndpoint = Optional.empty();
private boolean isBuilderCircuitBreakerEnabled = DEFAULT_BUILDER_CIRCUIT_BREAKER_ENABLED;
Expand Down Expand Up @@ -182,7 +173,6 @@ public ExecutionLayerConfiguration build() {
return new ExecutionLayerConfiguration(
spec,
engineEndpoint,
engineVersion,
engineJwtSecretFile,
builderEndpoint,
isBuilderCircuitBreakerEnabled,
Expand All @@ -199,11 +189,6 @@ public Builder engineEndpoint(final String engineEndpoint) {
return this;
}

public Builder engineVersion(final Version version) {
this.engineVersion = version;
return this;
}

public Builder specProvider(final Spec spec) {
this.spec = spec;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ private static ExecutionLayerManager createRealExecutionLayerManager(

final ExecutionEngineClient executionEngineClient =
ExecutionLayerManagerImpl.createEngineClient(
config.getEngineVersion(),
engineWeb3jClientProvider.getWeb3JClient(),
timeProvider,
metricsSystem);
engineWeb3jClientProvider.getWeb3JClient(), timeProvider, metricsSystem);

final EngineApiCapabilitiesProvider localEngineApiCapabilitiesProvider =
new LocalEngineApiCapabilitiesProvider(config.getSpec(), executionEngineClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import picocli.CommandLine.Help.Visibility;
import picocli.CommandLine.Mixin;
import picocli.CommandLine.Option;
import tech.pegasys.teku.spec.executionlayer.ExecutionLayerChannel.Version;

public class ExecutionLayerOptions {

Expand All @@ -39,14 +38,6 @@ public class ExecutionLayerOptions {
arity = "1")
private String executionEngineEndpoint = null;

@Option(
names = {"--Xee-version"},
paramLabel = "<EXECUTION_ENGINE_VERSION>",
description = "Execution Engine API version. " + "Valid values: ${COMPLETION-CANDIDATES}",
arity = "1",
hidden = true)
private Version executionEngineVersion = Version.DEFAULT_VERSION;

@Option(
names = {"--ee-jwt-secret-file"},
paramLabel = "<FILENAME>",
Expand Down Expand Up @@ -139,7 +130,6 @@ public void configure(final Builder builder) {
builder.executionLayer(
b ->
b.engineEndpoint(executionEngineEndpoint)
.engineVersion(executionEngineVersion)
.engineJwtSecretFile(engineJwtSecretFile)
.builderEndpoint(builderEndpoint)
.isBuilderCircuitBreakerEnabled(builderCircuitBreakerEnabled)
Expand Down

0 comments on commit 0b5ef8a

Please sign in to comment.