mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 18:42:19 +00:00
141 lines
3.4 KiB
Protocol Buffer
141 lines
3.4 KiB
Protocol Buffer
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
|
|
// Request fields are optional - it's ok to request block only by hash or only by number
|
|
rpc Block(BlockRequest) returns (BlockReply);
|
|
// High-level method - can find block number by txn hash
|
|
// it doesn't provide consistency
|
|
rpc TxnLookup(TxnLookupRequest) returns (TxnLookupReply);
|
|
// NodeInfo collects and returns NodeInfo from all running celery instances.
|
|
rpc NodeInfo(NodesInfoRequest) returns(NodesInfoReply);
|
|
}
|
|
|
|
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 {
|
|
uint64 timestamp = 1;
|
|
types.H256 random = 2;
|
|
types.H160 feeRecipient = 3;
|
|
}
|
|
|
|
message EngineForkChoiceUpdated {
|
|
types.H256 headBlockHash = 1;
|
|
types.H256 safeBlockHash = 2;
|
|
types.H256 finalizedBlockHash = 3;
|
|
}
|
|
|
|
message EngineForkChoiceUpdatedRequest {
|
|
EngineForkChoiceUpdated forkchoice = 1;
|
|
EnginePreparePayload prepare = 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;
|
|
}
|
|
|
|
message TxnLookupRequest {
|
|
types.H256 txnHash = 1;
|
|
}
|
|
|
|
message TxnLookupReply {
|
|
uint64 blockNumber = 1;
|
|
}
|
|
|
|
message NodesInfoRequest {
|
|
uint32 limit = 1;
|
|
}
|
|
|
|
message NodesInfoReply {
|
|
repeated types.NodeInfoReply nodesInfo = 1;
|
|
}
|