syntax = "proto3"; import "google/protobuf/empty.proto"; import "types/types.proto"; package remote; option go_package = "./remote;remote"; service ETHBACKEND { rpc Etherbase(EtherbaseRequest) returns (EtherbaseReply); rpc NetVersion(NetVersionRequest) returns (NetVersionReply); rpc NetPeerCount(NetPeerCountRequest) returns (NetPeerCountReply); // "The Merge" RPC Requests to be netively implemented in the Erigon Node Backend // Fetch Execution Payload using its id. rpc EngineGetPayloadV1(EngineGetPayloadRequest) returns (types.ExecutionPayload); // Execute the payload. rpc EngineExecutePayloadV1(types.ExecutionPayload) returns (EngineExecutePayloadReply); // Update fork choice rpc EngineForkChoiceUpdatedV1(EngineForkChoiceUpdatedRequest) returns (EngineForkChoiceUpdatedReply); // Version returns the service version number rpc Version(google.protobuf.Empty) returns (types.VersionReply); // ProtocolVersion returns the Ethereum protocol version number (e.g. 66 for ETH66). rpc ProtocolVersion(ProtocolVersionRequest) returns (ProtocolVersionReply); // ClientVersion returns the Ethereum client version string using node name convention (e.g. TurboGeth/v2021.03.2-alpha/Linux). rpc ClientVersion(ClientVersionRequest) returns (ClientVersionReply); rpc Subscribe(SubscribeRequest) returns (stream SubscribeReply); // High-level method - can read block from db, snapshots or apply any other logic // it doesn't provide consistency rpc Block(BlockRequest) returns (BlockReply); } enum Event { HEADER = 0; PENDING_LOGS = 1; PENDING_BLOCK = 2; } message EtherbaseRequest {} message EtherbaseReply { types.H160 address = 1; } message NetVersionRequest {} message NetVersionReply { uint64 id = 1; } message NetPeerCountRequest {} message NetPeerCountReply { uint64 count = 1; } message EngineGetPayloadRequest { uint64 payloadId = 1; } message EngineExecutePayloadReply { string status = 1; types.H256 latestValidHash = 2; } message EnginePreparePayload { types.H256 parentHash = 1; uint64 timestamp = 2; types.H256 random = 3; types.H160 feeRecipient = 4; } message EngineForkChoiceUpdated { types.H256 headBlockHash = 1; types.H256 safeBlockHash = 2; types.H256 finalizedBlockHash = 3; } message EngineForkChoiceUpdatedRequest { EnginePreparePayload headBlockHash = 1; EngineForkChoiceUpdated safeBlockHash = 2; } message EngineForkChoiceUpdatedReply { string status = 1; uint64 payloadId = 2; } message ProtocolVersionRequest {} message ProtocolVersionReply { uint64 id = 1; } message ClientVersionRequest {} message ClientVersionReply { string nodeName = 1; } message SubscribeRequest { Event type = 1; } message SubscribeReply { Event type = 1; bytes data = 2; // serialized data } message BlockRequest { uint64 blockHeight = 2; types.H256 blockHash = 3; } message BlockReply { bytes blockRlp = 1; bytes senders = 2; }