Skip to content

Commit

Permalink
Mining protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jun 6, 2018
1 parent 2307249 commit 6113c52
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
35 changes: 35 additions & 0 deletions protolib/mining_pool.proto
@@ -0,0 +1,35 @@
syntax = "proto3";

option java_multiple_files = true;
option java_package = "snowblossom.mining.proto";
option java_outer_classname = "SnowBlossomMiningProto";

import "protolib/snowblossom.proto";

package snowblossom;

service MiningPoolService {
rpc GetWork ( GetWorkRequest ) returns (stream WorkUnit) {}
rpc SubmitWork ( WorkSubmitRequest ) returns ( SubmitReply ) {}
}

message GetWorkRequest {
string client_id = 1;
string pay_to_address = 2;
}

message WorkUnit {
bytes header_part = 1;
bytes nonce_start = 2;
int64 work_id = 3;
bytes target = 4;
}

message WorkSubmitRequest {
bytes nonce = 1;
int64 work_id = 2;
int32 snow_field = 3;
repeated SnowPowProof pow_proof = 4;
}


2 changes: 2 additions & 0 deletions protolib/snowblossom.proto
Expand Up @@ -153,6 +153,8 @@ service UserService {
rpc GetBlockHeader ( RequestBlockHeader ) returns ( BlockHeader ) {}
}



message PeerMessage {
oneof z {
Transaction tx = 1;
Expand Down

0 comments on commit 6113c52

Please sign in to comment.