-
Notifications
You must be signed in to change notification settings - Fork 46
/
codec.proto
41 lines (34 loc) · 1.1 KB
/
codec.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
syntax = "proto3";
package weave;
import "gogoproto/gogo.proto";
// Metadata is expected to be the first argument of every message or model. It
// contains all essential attributes.
// Each protobuf message should be declared with the first attribute being
//
// weave.Metadata metadata = 1;
message Metadata {
uint32 schema = 1;
}
// ValidatorUpdates represents latest validator state, currently used to validate SetValidatorMsg transactions.
message ValidatorUpdates {
repeated weave.ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
}
// ValidatorUpdate represents an update to validator set.
message ValidatorUpdate {
PubKey pub_key = 1 [(gogoproto.nullable) = false];
int64 power = 2;
}
// PubKey represents a validator public key.
message PubKey {
string type = 1;
bytes data = 2;
}
// The Fraction type represents a floating point number without the precision
// issues that native floating point type has.
message Fraction {
option (gogoproto.goproto_stringer) = false;
// The top number in a fraction.
uint32 numerator = 1;
// The bottom number
uint32 denominator = 2;
}