Skip to content

Commit

Permalink
Remove engine_forkChoiceUpdateV4 (Consensys#8925)
Browse files Browse the repository at this point in the history
* remove engine_forkChoiceUpdateV4
  • Loading branch information
mehdi-aouadi authored Dec 16, 2024
1 parent 3d6becf commit 2148be9
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 633 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV1;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV4;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
Expand Down Expand Up @@ -77,9 +76,6 @@ SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV2(
SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV3(
ForkChoiceStateV1 forkChoiceState, Optional<PayloadAttributesV3> payloadAttributes);

SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV4(
ForkChoiceStateV1 forkChoiceState, Optional<PayloadAttributesV4> payloadAttributes);

SafeFuture<Response<List<String>>> exchangeCapabilities(List<String> capabilities);

SafeFuture<Response<List<ClientVersionV1>>> getClientVersionV1(ClientVersionV1 clientVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV1;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV4;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
Expand Down Expand Up @@ -145,14 +144,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV3(
() -> delegate.forkChoiceUpdatedV3(forkChoiceState, payloadAttributes));
}

@Override
public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV4(
final ForkChoiceStateV1 forkChoiceState,
final Optional<PayloadAttributesV4> payloadAttributes) {
return taskQueue.queueTask(
() -> delegate.forkChoiceUpdatedV4(forkChoiceState, payloadAttributes));
}

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV1;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV4;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
Expand All @@ -60,11 +59,8 @@ public class MetricRecordingExecutionEngineClient extends MetricRecordingAbstrac
public static final String FORKCHOICE_UPDATED_WITH_ATTRIBUTES_V2_METHOD =
"forkchoice_updated_with_attributesV2";
public static final String FORKCHOICE_UPDATED_V3_METHOD = "forkchoice_updatedV3";
public static final String FORKCHOICE_UPDATED_V4_METHOD = "forkchoice_updatedV4";
public static final String FORKCHOICE_UPDATED_WITH_ATTRIBUTES_V3_METHOD =
"forkchoice_updated_with_attributesV3";
public static final String FORKCHOICE_UPDATED_WITH_ATTRIBUTES_V4_METHOD =
"forkchoice_updated_with_attributesV4";
public static final String GET_PAYLOAD_V3_METHOD = "get_payloadV3";
public static final String GET_PAYLOAD_V4_METHOD = "get_payloadV4";
public static final String NEW_PAYLOAD_V3_METHOD = "new_payloadV3";
Expand Down Expand Up @@ -189,17 +185,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV3(
: FORKCHOICE_UPDATED_V3_METHOD);
}

@Override
public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV4(
final ForkChoiceStateV1 forkChoiceState,
final Optional<PayloadAttributesV4> payloadAttributes) {
return countRequest(
() -> delegate.forkChoiceUpdatedV4(forkChoiceState, payloadAttributes),
payloadAttributes.isPresent()
? FORKCHOICE_UPDATED_WITH_ATTRIBUTES_V4_METHOD
: FORKCHOICE_UPDATED_V4_METHOD);
}

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV1;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV2;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV4;
import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1;
import tech.pegasys.teku.ethereum.executionclient.schema.Response;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
Expand Down Expand Up @@ -239,19 +238,6 @@ public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV3(
return web3JClient.doRequest(web3jRequest, EL_ENGINE_BLOCK_EXECUTION_TIMEOUT);
}

@Override
public SafeFuture<Response<ForkChoiceUpdatedResult>> forkChoiceUpdatedV4(
final ForkChoiceStateV1 forkChoiceState,
final Optional<PayloadAttributesV4> payloadAttributes) {
final Request<?, ForkChoiceUpdatedResultWeb3jResponse> web3jRequest =
new Request<>(
"engine_forkchoiceUpdatedV4",
list(forkChoiceState, payloadAttributes.orElse(null)),
web3JClient.getWeb3jService(),
ForkChoiceUpdatedResultWeb3jResponse.class);
return web3JClient.doRequest(web3jRequest, EL_ENGINE_BLOCK_EXECUTION_TIMEOUT);
}

@Override
public SafeFuture<Response<List<String>>> exchangeCapabilities(final List<String> capabilities) {
final Request<?, ExchangeCapabilitiesWeb3jResponse> web3jRequest =
Expand Down
Loading

0 comments on commit 2148be9

Please sign in to comment.