mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
Remove mining methods from ethbackend.proto (#1954)
This commit is contained in:
parent
b2d00c97d8
commit
215fd86ad2
@ -7,7 +7,6 @@ fn config() -> prost_build::Config {
|
|||||||
|
|
||||||
fn make_protos(protos: &[&str]) {
|
fn make_protos(protos: &[&str]) {
|
||||||
tonic_build::configure()
|
tonic_build::configure()
|
||||||
.format(false)
|
|
||||||
.compile_with_config(config(), &protos, &["."])
|
.compile_with_config(config(), &protos, &["."])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
@ -18,34 +18,6 @@ service ETHBACKEND {
|
|||||||
rpc ClientVersion(ClientVersionRequest) returns (ClientVersionReply);
|
rpc ClientVersion(ClientVersionRequest) returns (ClientVersionReply);
|
||||||
|
|
||||||
rpc Subscribe(SubscribeRequest) returns (stream SubscribeReply);
|
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 {
|
enum Event {
|
||||||
@ -79,42 +51,3 @@ message SubscribeReply {
|
|||||||
bytes data = 2; // serialized data
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@ message SubmitHashRateReply {
|
|||||||
bool ok = 1;
|
bool ok = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetHashRateRequest {}
|
message HashRateRequest {}
|
||||||
message GetHashRateReply {
|
message HashRateReply {
|
||||||
uint64 hashRate = 1;
|
uint64 hashRate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,8 +95,8 @@ service Mining {
|
|||||||
// between nodes.
|
// between nodes.
|
||||||
rpc SubmitHashRate(SubmitHashRateRequest) returns (SubmitHashRateReply);
|
rpc SubmitHashRate(SubmitHashRateRequest) returns (SubmitHashRateReply);
|
||||||
|
|
||||||
// GetHashRate returns the current hashrate for local CPU miner and remote miner.
|
// HashRate returns the current hashrate for local CPU miner and remote miner.
|
||||||
rpc GetHashRate(GetHashRateRequest) returns (GetHashRateReply);
|
rpc HashRate(HashRateRequest) returns (HashRateReply);
|
||||||
|
|
||||||
// Mining returns an indication if this node is currently mining and it's mining configuration
|
// Mining returns an indication if this node is currently mining and it's mining configuration
|
||||||
rpc Mining(MiningRequest) returns (MiningReply);
|
rpc Mining(MiningRequest) returns (MiningReply);
|
||||||
|
Loading…
Reference in New Issue
Block a user