diff --git a/dashboards/lodestar_execution_engine.json b/dashboards/lodestar_execution_engine.json index 58a89801b91a..698480f19355 100644 --- a/dashboards/lodestar_execution_engine.json +++ b/dashboards/lodestar_execution_engine.json @@ -1792,124 +1792,6 @@ "title": "forkchoiceUpdatedV2", "type": "timeseries" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "µs" - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "0.9999" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 59 - }, - "id": 487, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "rpc_duration_engine_exchangeTransitionConfigurationV1_success", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "exchangeTransitionConfigurationV1", - "type": "timeseries" - }, { "collapsed": false, "datasource": { diff --git a/packages/beacon-node/src/chain/chain.ts b/packages/beacon-node/src/chain/chain.ts index 349b7a95d4f7..ccb2c023c5fb 100644 --- a/packages/beacon-node/src/chain/chain.ts +++ b/packages/beacon-node/src/chain/chain.ts @@ -34,10 +34,8 @@ import {ForkSeq, SLOTS_PER_EPOCH} from "@lodestar/params"; import {GENESIS_EPOCH, ZERO_HASH} from "../constants/index.js"; import {IBeaconDb} from "../db/index.js"; import {Metrics} from "../metrics/index.js"; -import {bytesToData, numToQuantity} from "../eth1/provider/utils.js"; -import {wrapError} from "../util/wrapError.js"; import {IEth1ForBlockProduction} from "../eth1/index.js"; -import {IExecutionEngine, IExecutionBuilder, TransitionConfigurationV1} from "../execution/index.js"; +import {IExecutionEngine, IExecutionBuilder} from "../execution/index.js"; import {Clock, ClockEvent, IClock} from "../util/clock.js"; import {ensureDir, writeIfNotExist} from "../util/file.js"; import {isOptimisticBlock} from "../util/forkChoice.js"; @@ -143,9 +141,6 @@ export class BeaconChain implements IBeaconChain { protected readonly db: IBeaconDb; private readonly archiver: Archiver; private abortController = new AbortController(); - private successfulExchangeTransition = false; - private readonly exchangeTransitionConfigurationEverySlots: number; - private processShutdownCallback: ProcessShutdownCallback; constructor( @@ -187,11 +182,6 @@ export class BeaconChain implements IBeaconChain { this.eth1 = eth1; this.executionEngine = executionEngine; this.executionBuilder = executionBuilder; - // From https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#specification-3 - // > Consensus Layer client software SHOULD poll this endpoint every 60 seconds. - // Align to a multiple of SECONDS_PER_SLOT for nicer logs - this.exchangeTransitionConfigurationEverySlots = Math.floor(60 / this.config.SECONDS_PER_SLOT); - const signal = this.abortController.signal; const emitter = new ChainEventEmitter(); // by default, verify signatures on both main threads and worker threads @@ -778,13 +768,6 @@ export class BeaconChain implements IBeaconChain { this.seenAttestationDatas.onSlot(slot); this.reprocessController.onSlot(slot); - if (isFinite(this.config.BELLATRIX_FORK_EPOCH) && slot % this.exchangeTransitionConfigurationEverySlots === 0) { - this.exchangeTransitionConfiguration().catch((e) => { - // Should never throw - this.logger.error("Error on exchangeTransitionConfiguration", {}, e as Error); - }); - } - // Prune old blobSidecars for block production, those are only useful on their slot if (this.config.getForkSeq(slot) >= ForkSeq.deneb) { if (this.producedBlobSidecarsCache.size > 0) { @@ -857,52 +840,6 @@ export class BeaconChain implements IBeaconChain { } } - /** - * perform heart beat for EL lest it logs warning that CL is not connected - */ - private async exchangeTransitionConfiguration(): Promise { - const clConfig: TransitionConfigurationV1 = { - terminalTotalDifficulty: numToQuantity(this.config.TERMINAL_TOTAL_DIFFICULTY), - terminalBlockHash: bytesToData(this.config.TERMINAL_BLOCK_HASH), - /** terminalBlockNumber has to be set to zero for now as per specs */ - terminalBlockNumber: numToQuantity(0), - }; - - const elConfigRes = await wrapError(this.executionEngine.exchangeTransitionConfigurationV1(clConfig)); - - if (elConfigRes.err) { - // Note: Will throw an error if: - // - EL endpoint is offline, unreachable, port not exposed, etc - // - JWT secret is not properly configured - // - If there is a missmatch in configuration with Geth, see https://github.com/ethereum/go-ethereum/blob/0016eb7eeeb42568c8c20d0cb560ddfc9a938fad/eth/catalyst/api.go#L301 - this.successfulExchangeTransition = false; - - this.logger.warn("Could not validate transition configuration with execution client", {}, elConfigRes.err); - } else { - // Note: This code is useless when connected to Geth. If there's a configuration mismatch Geth returns an - // error instead of its own transition configuration, so we can't do this comparision. - const elConfig = elConfigRes.result; - const keysToCheck: (keyof TransitionConfigurationV1)[] = ["terminalTotalDifficulty", "terminalBlockHash"]; - const errors: string[] = []; - - for (const key of keysToCheck) { - if (elConfig[key] !== clConfig[key]) { - errors.push(`different ${key} (cl ${clConfig[key]} el ${elConfig[key]})`); - } - } - - if (errors.length > 0) { - this.logger.warn(`Transition configuration mismatch: ${errors.join(", ")}`); - } else { - // Only log once per successful call - if (!this.successfulExchangeTransition) { - this.logger.info("Validated transition configuration with execution client", clConfig); - this.successfulExchangeTransition = true; - } - } - } - } - async updateBeaconProposerData(epoch: Epoch, proposers: ProposerPreparationData[]): Promise { proposers.forEach((proposer) => { this.beaconProposerCache.add(epoch, proposer); diff --git a/packages/beacon-node/src/execution/engine/disabled.ts b/packages/beacon-node/src/execution/engine/disabled.ts index 45c4a135c2a8..6c6804e970c3 100644 --- a/packages/beacon-node/src/execution/engine/disabled.ts +++ b/packages/beacon-node/src/execution/engine/disabled.ts @@ -19,10 +19,6 @@ export class ExecutionEngineDisabled implements IExecutionEngine { throw Error("Execution engine disabled"); } - async exchangeTransitionConfigurationV1(): Promise { - throw Error("Execution engine disabled"); - } - getPayloadBodiesByHash(): Promise { throw Error("Execution engine disabled"); } diff --git a/packages/beacon-node/src/execution/engine/http.ts b/packages/beacon-node/src/execution/engine/http.ts index 35c54a96418e..3cf9f46297fe 100644 --- a/packages/beacon-node/src/execution/engine/http.ts +++ b/packages/beacon-node/src/execution/engine/http.ts @@ -13,7 +13,6 @@ import { IExecutionEngine, PayloadId, PayloadAttributes, - TransitionConfigurationV1, BlobsBundle, VersionedHashes, } from "./interface.js"; @@ -72,7 +71,6 @@ const QUEUE_MAX_LENGTH = EPOCHS_PER_BATCH * SLOTS_PER_EPOCH * 2; const notifyNewPayloadOpts: ReqOpts = {routeId: "notifyNewPayload"}; const forkchoiceUpdatedV1Opts: ReqOpts = {routeId: "forkchoiceUpdated"}; const getPayloadOpts: ReqOpts = {routeId: "getPayload"}; -const exchageTransitionConfigOpts: ReqOpts = {routeId: "exchangeTransitionConfiguration"}; /** * based on Ethereum JSON-RPC API and inherits the following properties of this standard: @@ -345,25 +343,6 @@ export class ExecutionEngineHttp implements IExecutionEngine { return parseExecutionPayload(fork, payloadResponse); } - /** - * `engine_exchangeTransitionConfigurationV1` - * - * An api method for EL<>CL transition config matching and heartbeat - */ - - async exchangeTransitionConfigurationV1( - transitionConfiguration: TransitionConfigurationV1 - ): Promise { - const method = "engine_exchangeTransitionConfigurationV1"; - return this.rpc.fetchWithRetries( - { - method, - params: [transitionConfiguration], - }, - exchageTransitionConfigOpts - ); - } - async prunePayloadIdCache(): Promise { this.payloadIdCache.prune(); } diff --git a/packages/beacon-node/src/execution/engine/interface.ts b/packages/beacon-node/src/execution/engine/interface.ts index c77c80a22e54..0b2d96229ced 100644 --- a/packages/beacon-node/src/execution/engine/interface.ts +++ b/packages/beacon-node/src/execution/engine/interface.ts @@ -129,10 +129,6 @@ export interface IExecutionEngine { payloadId: PayloadId ): Promise<{executionPayload: allForks.ExecutionPayload; blockValue: Wei; blobsBundle?: BlobsBundle}>; - exchangeTransitionConfigurationV1( - transitionConfiguration: TransitionConfigurationV1 - ): Promise; - getPayloadBodiesByHash(blockHash: DATA[]): Promise<(ExecutionPayloadBody | null)[]>; getPayloadBodiesByRange(start: number, count: number): Promise<(ExecutionPayloadBody | null)[]>; diff --git a/packages/beacon-node/src/execution/engine/mock.ts b/packages/beacon-node/src/execution/engine/mock.ts index 040cfa80798d..3e3d3d65f901 100644 --- a/packages/beacon-node/src/execution/engine/mock.ts +++ b/packages/beacon-node/src/execution/engine/mock.ts @@ -93,7 +93,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend { engine_getPayloadV1: this.getPayload.bind(this), engine_getPayloadV2: this.getPayload.bind(this), engine_getPayloadV3: this.getPayload.bind(this), - engine_exchangeTransitionConfigurationV1: this.exchangeTransitionConfigurationV1.bind(this), engine_getPayloadBodiesByHashV1: this.getPayloadBodiesByHash.bind(this), engine_getPayloadBodiesByRangeV1: this.getPayloadBodiesByRange.bind(this), }; @@ -388,13 +387,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend { return payload.executionPayload; } - private exchangeTransitionConfigurationV1( - transitionConfiguration: EngineApiRpcParamTypes["engine_exchangeTransitionConfigurationV1"][0] - ): EngineApiRpcReturnTypes["engine_exchangeTransitionConfigurationV1"] { - // echo same configuration from consensus, which will be considered valid - return transitionConfiguration; - } - private timestampToFork(timestamp: number): ForkExecution { if (timestamp > (this.opts.denebForkTimestamp ?? Infinity)) return ForkName.deneb; if (timestamp > (this.opts.capellaForkTimestamp ?? Infinity)) return ForkName.capella; diff --git a/packages/beacon-node/src/execution/engine/types.ts b/packages/beacon-node/src/execution/engine/types.ts index 55f9e07b737a..7295e8c37575 100644 --- a/packages/beacon-node/src/execution/engine/types.ts +++ b/packages/beacon-node/src/execution/engine/types.ts @@ -16,13 +16,7 @@ import { QUANTITY, quantityToBigint, } from "../../eth1/provider/utils.js"; -import { - ExecutePayloadStatus, - TransitionConfigurationV1, - BlobsBundle, - PayloadAttributes, - VersionedHashes, -} from "./interface.js"; +import {ExecutePayloadStatus, BlobsBundle, PayloadAttributes, VersionedHashes} from "./interface.js"; import {WithdrawalV1} from "./payloadIdCache.js"; /* eslint-disable @typescript-eslint/naming-convention */ @@ -53,10 +47,6 @@ export type EngineApiRpcParamTypes = { engine_getPayloadV1: [QUANTITY]; engine_getPayloadV2: [QUANTITY]; engine_getPayloadV3: [QUANTITY]; - /** - * 1. Object - Instance of TransitionConfigurationV1 - */ - engine_exchangeTransitionConfigurationV1: [TransitionConfigurationV1]; /** * 1. Array of DATA - Array of block_hash field values of the ExecutionPayload structure @@ -98,10 +88,6 @@ export type EngineApiRpcReturnTypes = { engine_getPayloadV1: ExecutionPayloadRpc; engine_getPayloadV2: ExecutionPayloadResponse; engine_getPayloadV3: ExecutionPayloadResponse; - /** - * Object - Instance of TransitionConfigurationV1 - */ - engine_exchangeTransitionConfigurationV1: TransitionConfigurationV1; engine_getPayloadBodiesByHashV1: (ExecutionPayloadBodyRpc | null)[];