-
Notifications
You must be signed in to change notification settings - Fork 204
/
requestData.proto
33 lines (28 loc) · 1.14 KB
/
requestData.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
syntax = "proto3";
package proto;
option go_package = "dataRetriever";
option (gogoproto.stable_marshaler_all) = true;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
// RequestDataType represents the data type for the requested data
enum RequestDataType {
// Invalid
InvalidType = 0;
// HashType indicates that the request data object is of type hash
HashType = 1;
// HashArrayType that the request data object contains a serialised array of hashes
HashArrayType = 2;
// NonceType indicates that the request data object is of type nonce (uint64)
NonceType = 3;
// EpochType indicates that the request data object is of type epoch
EpochType = 4;
// ChunkType indicates that the request data object is of type chunk
ChunkType = 5;
}
// RequestData holds the requested data
// This struct will be serialized and sent to the other peers
message RequestData {
RequestDataType Type = 1 [(gogoproto.jsontag) = "type"];
bytes Value = 2 [(gogoproto.jsontag) = "value"];
uint32 Epoch = 3 [(gogoproto.jsontag) = "epoch"];
uint32 ChunkIndex = 4 [(gogoproto.jsontag) = "chunkIndex"];
}