-
Notifications
You must be signed in to change notification settings - Fork 9
/
smesher.proto
60 lines (45 loc) · 2.65 KB
/
smesher.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
syntax = "proto3";
package spacemesh.v1;
option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1";
import "google/protobuf/empty.proto";
import "spacemesh/v1/smesher_types.proto";
// Readonly basic node data
service SmesherService {
/////// Smeshing (mining) management
// Returns true iff node is currently smeshing
rpc IsSmeshing(google.protobuf.Empty) returns (IsSmeshingResponse);
// Start smeshing
// Returns error if post data is incomplete or missing
rpc StartSmeshing(StartSmeshingRequest) returns (StartSmeshingResponse);
// Stop smeshing and optionally attempt to delete post init file(s)
// Returns success if request is accepted by node, error if it fails
rpc StopSmeshing(StopSmeshingRequest) returns (StopSmeshingResponse);
// Get the current smesher id generated by the node
rpc SmesherID(google.protobuf.Empty) returns (SmesherIDResponse);
// Get the current coinbase
rpc Coinbase(google.protobuf.Empty) returns (CoinbaseResponse);
// Set the coinbase
// Returns success if request succeeds, failure if it fails
rpc SetCoinbase(SetCoinbaseRequest) returns (SetCoinbaseResponse);
// Get the current min gas for including txs in blocks by this smesher
rpc MinGas(google.protobuf.Empty) returns (MinGasResponse);
// Set a min gas units for including txs in blocks by this smesher
// Returns success if request succeeds, failure if it fails
rpc SetMinGas(SetMinGasRequest) returns (SetMinGasResponse);
/////// Proofs of space data files management
// Returns post data status from the node
rpc PostStatus(google.protobuf.Empty) returns (PostStatusResponse);
// Returns a list of available post compute providers for creating post data
rpc PostComputeProviders(google.protobuf.Empty) returns (PostComputeProvidersResponse);
// Starts (or continues) a post init phase. Supports resuming a previously
// started init session, as well as changing post params (e.g., post data size)
// after initial setup.
// Returns success if request is accepted by node, failure if it fails
rpc CreatePostData(CreatePostDataRequest) returns (CreatePostDataResponse);
// Stop an ongoing post data init phase and optionally attempt to delete
// the post data file(s)
// Returns success if request is accepted by node, failure if it fails
rpc StopPostDataCreationSession(StopPostDataCreationSessionRequest) returns (StopPostDataCreationSessionResponse);
// Returns a stream of updates to post data file(s) during the init phase
rpc PostDataCreationProgressStream(google.protobuf.Empty) returns (stream PostDataCreationProgressStreamResponse);
}