Skip to content

Commit dd7698a

Browse files
authored
debug: proposals stream (#162)
1 parent 3b2eee8 commit dd7698a

4 files changed

Lines changed: 514 additions & 35 deletions

File tree

proto/spacemesh/v1/debug.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ service DebugService {
1717
// This includes each account's address, nonce and balance but excludes projection of account state.
1818
rpc Accounts (google.protobuf.Empty) returns (AccountsResponse);
1919

20+
// ProposalsStream streams all proposals that are confirmed by hare.
21+
rpc ProposalsStream(google.protobuf.Empty) returns (stream Proposal);
2022
}

proto/spacemesh/v1/debug_types.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,39 @@ package spacemesh.v1;
33
option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1";
44

55
import "spacemesh/v1/global_state_types.proto";
6+
import "spacemesh/v1/types.proto";
67

78
message AccountsResponse {
89
repeated Account account_wrapper = 1;
910
}
1011

1112
message NetworkInfoResponse {
1213
string id = 1;
14+
}
15+
16+
message EpochData {
17+
bytes beacon = 1;
18+
}
19+
20+
message Eligibility {
21+
uint32 j = 1;
22+
bytes signature = 2;
23+
}
24+
25+
message Proposal {
26+
bytes id = 1;
27+
SimpleInt epoch = 2;
28+
LayerNumber layer = 3;
29+
SmesherId smesher = 4;
30+
oneof epoch_data {
31+
bytes reference = 5;
32+
EpochData data = 6;
33+
}
34+
bytes ballot = 7;
35+
repeated Eligibility eligibilities = 8;
36+
enum Status {
37+
Created = 0;
38+
Included = 1;
39+
}
40+
Status status = 9;
1341
}

release/go/spacemesh/v1/debug.pb.go

Lines changed: 84 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)