From 886800fa12d8877d2987345df911e02848bc5585 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Wed, 12 Jul 2023 18:11:22 +0200 Subject: [PATCH] removed engine (#180) --- build.rs | 4 -- engine/engine.proto | 95 --------------------------------------------- engine/keep.go | 1 - src/lib.rs | 5 --- 4 files changed, 105 deletions(-) delete mode 100644 engine/engine.proto delete mode 100644 engine/keep.go diff --git a/build.rs b/build.rs index b4ada4f..1ab5ff1 100644 --- a/build.rs +++ b/build.rs @@ -45,10 +45,6 @@ fn main() { protos.push("execution/execution.proto"); } - if cfg!(feature = "engine") { - protos.push("engine/engine.proto"); - } - if cfg!(feature = "web3") { protos.push("web3/common.proto"); protos.push("web3/debug.proto"); diff --git a/engine/engine.proto b/engine/engine.proto deleted file mode 100644 index 2cc3b36..0000000 --- a/engine/engine.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; - -import "types/types.proto"; -import "google/protobuf/empty.proto"; - -package engine; - -option go_package = "./engine;engine"; - -// ------------------------------------------------------------------------ -// Engine API RPC requests natively implemented in the Erigon node backend -// See https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md -service Engine { - // Validate and possibly execute the payload. - rpc EngineNewPayload(types.ExecutionPayload) returns(EnginePayloadStatus); - - // Update fork choice - rpc EngineForkChoiceUpdated(EngineForkChoiceUpdatedRequest) returns(EngineForkChoiceUpdatedResponse); - - // Fetch Execution Payload using its ID. - rpc EngineGetPayload(EngineGetPayloadRequest) returns(EngineGetPayloadResponse); - - rpc EngineGetPayloadBodiesByHashV1(EngineGetPayloadBodiesByHashV1Request) returns(EngineGetPayloadBodiesV1Response); - - rpc EngineGetPayloadBodiesByRangeV1(EngineGetPayloadBodiesByRangeV1Request) returns(EngineGetPayloadBodiesV1Response); - - // Fetch the blobs bundle using its ID. - rpc EngineGetBlobsBundleV1(EngineGetBlobsBundleRequest) returns(types.BlobsBundleV1); -} - -message EngineGetPayloadRequest { - uint64 payload_id = 1; -} - -message EngineGetBlobsBundleRequest { - uint64 payload_id = 1; -} - -enum EngineStatus { - VALID = 0; - INVALID = 1; - SYNCING = 2; - ACCEPTED = 3; - INVALID_BLOCK_HASH = 4; -} - -message EnginePayloadStatus { - EngineStatus status = 1; - types.H256 latest_valid_hash = 2; - string validation_error = 3; -} - -message EnginePayloadAttributes { - uint32 version = 1; // v1 - no withdrawals, v2 - with withdrawals - uint64 timestamp = 2; - types.H256 prev_randao = 3; - types.H160 suggested_fee_recipient = 4; - repeated types.Withdrawal withdrawals = 5; -} - -message EngineForkChoiceState { - types.H256 head_block_hash = 1; - types.H256 safe_block_hash = 2; - types.H256 finalized_block_hash = 3; -} - -message EngineForkChoiceUpdatedRequest { - EngineForkChoiceState forkchoice_state = 1; - EnginePayloadAttributes payload_attributes = 2; -} - -message EngineForkChoiceUpdatedResponse { - EnginePayloadStatus payload_status = 1; - uint64 payload_id = 2; -} - -message EngineGetPayloadResponse { - types.ExecutionPayload execution_payload = 1; - types.H256 block_value = 2; - types.BlobsBundleV1 blobs_bundle = 3; -} - -message EngineGetPayloadBodiesByHashV1Request { - repeated types.H256 hashes = 1; -} - -message EngineGetPayloadBodiesByRangeV1Request { - uint64 start = 1; - uint64 count = 2; -} - -message EngineGetPayloadBodiesV1Response { - repeated types.ExecutionPayloadBodyV1 bodies = 1; -} - diff --git a/engine/keep.go b/engine/keep.go deleted file mode 100644 index 00a22ef..0000000 --- a/engine/keep.go +++ /dev/null @@ -1 +0,0 @@ -package engine diff --git a/src/lib.rs b/src/lib.rs index afa842c..d5fbcd4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,11 +135,6 @@ pub mod remotekv { tonic::include_proto!("remote"); } -#[cfg(feature = "engine")] -pub mod remotekv { - tonic::include_proto!("engine"); -} - #[cfg(feature = "snapshotsync")] pub mod snapshotsync { tonic::include_proto!("downloader");