erigon-pulse/interfaces/remote/ethbackend.proto
ledgerwatch e3f3dd3c9b
Integration tests 1 (#1793)
* Initial commit

* Add sentry gRPC interface

* p2psentry directory

* Update README.md

* Update README.md

* Update README.md

* Add go package

* Correct syntax

* add external downloader interface (#2)

* Add txpool (#3)

* Add private API (#4)

* Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>

* Separate upload messages into its own stream (#6)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>

* Only send changed accounts to listeners (#7)

* Txpool interface doc (#9)

* Add architecture diagram source and picture (#10)

* Typed hashes (#11)

* Typed hashes

* Fix PeerId

* 64-bit tx nonce

* Add proper golang packages, max_block into p2p sentry Status (#12)

* Add proper golang packages, max_block into p2p sentry Status

* Change EtherReply to address

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>

* Add Rust infrastructure (#13)

* DB stats methods removed by https://github.com/ledgerwatch/turbo-geth/pull/1665

* more p2p methods (#15)

* add mining methods (#16)

* First draft of Consensus gRPC interface (#14)

* Update Rust build

* Fix interfaces in architecture diagram (#17)

* Fix KV interface provider

* Fix Consensus interface provider

* drop java attributes (#18)

* tx pool remove unused import (#19)

* ethbackend: add protocol version and client version (#20)

* Add missing ethbackend I/F (#21)

* Add interface versioning mechanism (#23)

Add versioning in KV interface

Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>

* spec of tx pool method (#24)

* spec of tx pool method (#25)

* Update version.proto

* Refactor interface versioning

* Refactor interface versioning

* Testing interface

* Remove tree

* Fix

* Build testing protos

* Fix

* Fix

* Update to the newer interfaces

* Add ProtocolVersion and ClientVersion stubs

* Hook up ProtocolVersion and ClientVersion

* Remove service

* Add compatibility checks for RPC daemon

* Fix typos

* Properly update DB schema version

* Fix test

* Add test for KV compatibility|

* Info messages about compability for RPC daemon

* DB schema version to be one key

* Update release intructions

Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: b00ris <b00ris@mail.ru>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: canepat <tullio.canepa@gmail.com>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-24 16:46:29 +01:00

125 lines
3.4 KiB
Protocol Buffer

syntax = "proto3";
import "types/types.proto";
package remote;
option go_package = "./remote;remote";
service ETHBACKEND {
rpc Add(TxRequest) returns (AddReply);
rpc Etherbase(EtherbaseRequest) returns (EtherbaseReply);
rpc NetVersion(NetVersionRequest) returns (NetVersionReply);
// 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);
// GetWork returns a work package for external miner.
//
// The work package consists of 3 strings:
// result[0] - 32 bytes hex encoded current block header pow-hash
// result[1] - 32 bytes hex encoded seed hash used for DAG
// result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
// result[3] - hex encoded block number
rpc GetWork(GetWorkRequest) returns (GetWorkReply);
// SubmitWork can be used by external miner to submit their POW solution.
// It returns an indication if the work was accepted.
// Note either an invalid solution, a stale work a non-existent work will return false.
rpc SubmitWork(SubmitWorkRequest) returns (SubmitWorkReply);
// SubmitHashRate can be used for remote miners to submit their hash rate.
// This enables the node to report the combined hash rate of all miners
// which submit work through this node.
//
// It accepts the miner hash rate and an identifier which must be unique
// between nodes.
rpc SubmitHashRate(SubmitHashRateRequest) returns (SubmitHashRateReply);
// GetHashRate returns the current hashrate for local CPU miner and remote miner.
rpc GetHashRate(GetHashRateRequest) returns (GetHashRateReply);
// Mining returns an indication if this node is currently mining and it's mining configuration
rpc Mining(MiningRequest) returns (MiningReply);
}
enum Event {
HEADER = 0;
PENDING_LOGS = 1;
PENDING_BLOCK = 2;
}
message TxRequest { bytes signedtx = 1; }
message AddReply { types.H256 hash = 1; }
message EtherbaseRequest {}
message EtherbaseReply { types.H160 address = 1; }
message NetVersionRequest {}
message NetVersionReply { uint64 id = 1; }
message ProtocolVersionRequest {}
message ProtocolVersionReply { uint64 id = 1; }
message ClientVersionRequest {}
message ClientVersionReply { string nodeName = 1; }
message SubscribeRequest {}
message SubscribeReply {
Event type = 1; // type (only header at that moment)
bytes data = 2; // serialized data
}
message GetWorkRequest {}
message GetWorkReply {
string headerHash = 1; // 32 bytes hex encoded current block header pow-hash
string seedHash = 2; // 32 bytes hex encoded seed hash used for DAG
string target = 3; // 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
string blockNumber = 4; // hex encoded block number
}
message SubmitWorkRequest {
bytes blockNonce = 1;
bytes powHash = 2;
bytes digest = 3;
}
message SubmitWorkReply {
bool ok = 1;
}
message SubmitHashRateRequest {
uint64 rate = 1;
bytes id = 2;
}
message SubmitHashRateReply {
bool ok = 1;
}
message GetHashRateRequest {}
message GetHashRateReply {
uint64 hashRate = 1;
}
message MiningRequest {}
message MiningReply {
bool enabled = 1;
bool running = 2;
}