Skip to content

Commit

Permalink
Don't call engine_exchangeTransitionConfigurationV1
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jul 4, 2023
1 parent 576cb2a commit 4a48d8d
Show file tree
Hide file tree
Showing 25 changed files with 10 additions and 950 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ For information on changes in released versions of Teku, see the [releases page]
### Additions and Improvements

- `--validators-external-signer-public-keys` parameter now accepts `external-signer` value. It will enable public key retrieval from external signer standard API, making sure that configured keystore and trustStore will be used, if any.
- Will stop calling `engine_exchangeTransitionConfigurationV1` Engine API method, since the method has been deprecated.

### Bug Fixes
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.ethereum.executionclient.schema.TransitionConfigurationV1;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.bytes.Bytes8;
import tech.pegasys.teku.spec.datastructures.execution.PowBlock;
Expand Down Expand Up @@ -59,8 +58,5 @@ SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV1(
SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV2(
ForkChoiceStateV1 forkChoiceState, Optional<PayloadAttributesV2> payloadAttributes);

SafeFuture<Response<TransitionConfigurationV1>> exchangeTransitionConfiguration(
TransitionConfigurationV1 transitionConfiguration);

SafeFuture<Response<List<String>>> exchangeCapabilities(List<String> capabilities);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.ethereum.executionclient.schema.TransitionConfigurationV1;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.async.ThrottlingTaskQueue;
import tech.pegasys.teku.infrastructure.bytes.Bytes8;
Expand Down Expand Up @@ -112,13 +111,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV2(
() -> delegate.forkChoiceUpdatedV2(forkChoiceState, payloadAttributes));
}

@Override
public SafeFuture<Response<TransitionConfigurationV1>> exchangeTransitionConfiguration(
final TransitionConfigurationV1 transitionConfiguration) {
return taskQueue.queueTask(
() -> delegate.exchangeTransitionConfiguration(transitionConfiguration));
}

@Override
public SafeFuture<Response<List<String>>> exchangeCapabilities(final List<String> capabilities) {
return taskQueue.queueTask(() -> delegate.exchangeCapabilities(capabilities));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public enum EngineApiMethod {
ETH_GET_BLOCK_BY_NUMBER("eth_getBlockByNumber"),
ENGINE_NEW_PAYLOAD("engine_newPayload"),
ENGINE_GET_PAYLOAD("engine_getPayload"),
ENGINE_FORK_CHOICE_UPDATED("engine_forkchoiceUpdated"),
ENGINE_EXCHANGE_TRANSITION_CONFIGURATION("engine_exchangeTransitionConfiguration");
ENGINE_FORK_CHOICE_UPDATED("engine_forkchoiceUpdated");

private final String name;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.ethereum.executionclient.schema.TransitionConfigurationV1;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.bytes.Bytes8;
import tech.pegasys.teku.infrastructure.metrics.MetricsCountersByIntervals;
Expand Down Expand Up @@ -141,12 +140,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV2(
: FORKCHOICE_UPDATED_V2_METHOD);
}

@Override
public SafeFuture<Response<TransitionConfigurationV1>> exchangeTransitionConfiguration(
final TransitionConfigurationV1 transitionConfiguration) {
return delegate.exchangeTransitionConfiguration(transitionConfiguration);
}

@Override
public SafeFuture<Response<List<String>>> exchangeCapabilities(final List<String> capabilities) {
return delegate.exchangeCapabilities(capabilities);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ private synchronized void buildClient() {
if (alreadyBuilt) {
return;
}
Web3jClientBuilder web3JClientBuilder = new Web3jClientBuilder();
final Web3jClientBuilder web3JClientBuilder = new Web3jClientBuilder();
this.web3JClient =
web3JClientBuilder
.endpoint(eeEndpoint)
.timeout(timeout)
.jwtConfigOpt(jwtConfig)
.timeProvider(timeProvider)
.executionClientEventsPublisher(executionClientEventsPublisher)
.nonCriticalMethods(
"engine_exchangeCapabilities", "engine_exchangeTransitionConfigurationV1")
.nonCriticalMethods("engine_exchangeCapabilities")
.build();
this.alreadyBuilt = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.ethereum.executionclient.schema.TransitionConfigurationV1;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.bytes.Bytes8;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
Expand All @@ -48,7 +47,6 @@

public class Web3JExecutionEngineClient implements ExecutionEngineClient {

private static final Duration EXCHANGE_TRANSITION_CONFIGURATION_TIMEOUT = Duration.ofSeconds(8);
private static final Duration EXCHANGE_CAPABILITIES_TIMEOUT = Duration.ofSeconds(8);

private final Web3JClient web3JClient;
Expand Down Expand Up @@ -182,18 +180,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV2(
return web3JClient.doRequest(web3jRequest, EL_ENGINE_BLOCK_EXECUTION_TIMEOUT);
}

@Override
public SafeFuture<Response<TransitionConfigurationV1>> exchangeTransitionConfiguration(
TransitionConfigurationV1 transitionConfiguration) {
Request<?, TransitionConfigurationV1Web3jResponse> web3jRequest =
new Request<>(
"engine_exchangeTransitionConfigurationV1",
Collections.singletonList(transitionConfiguration),
web3JClient.getWeb3jService(),
TransitionConfigurationV1Web3jResponse.class);
return web3JClient.doRequest(web3jRequest, EXCHANGE_TRANSITION_CONFIGURATION_TIMEOUT);
}

@Override
public SafeFuture<Response<List<String>>> exchangeCapabilities(final List<String> capabilities) {
Request<?, ExchangeCapabilitiesWeb3jResponse> web3jRequest =
Expand All @@ -220,9 +206,6 @@ static class PayloadStatusV1Web3jResponse
static class ForkChoiceUpdatedResultWeb3jResponse
extends org.web3j.protocol.core.Response<ForkChoiceUpdatedResult> {}

static class TransitionConfigurationV1Web3jResponse
extends org.web3j.protocol.core.Response<TransitionConfigurationV1> {}

static class ExchangeCapabilitiesWeb3jResponse
extends org.web3j.protocol.core.Response<List<String>> {}

Expand Down
Loading

0 comments on commit 4a48d8d

Please sign in to comment.