Browse Source

Validator and SignedValidator

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
8bb04d7ef7
1 changed files with 16 additions and 18 deletions
  1. +16
    -18
      types/types.proto

+ 16
- 18
types/types.proto View File

@ -47,7 +47,7 @@ message RequestSetOption {
} }
message RequestInitChain { message RequestInitChain {
repeated RequestValidator validators = 1 [(gogoproto.nullable)=false];
repeated Validator validators = 1 [(gogoproto.nullable)=false];
bytes genesis_bytes = 2; bytes genesis_bytes = 2;
} }
@ -61,9 +61,8 @@ message RequestQuery {
message RequestBeginBlock { message RequestBeginBlock {
bytes hash = 1; bytes hash = 1;
Header header = 2 [(gogoproto.nullable)=false]; Header header = 2 [(gogoproto.nullable)=false];
repeated RequestValidator present_validators = 3;
repeated RequestValidator absent_validators = 4;
repeated Evidence byzantine_validators = 5 [(gogoproto.nullable)=false];
repeated SigningValidator validators = 3;
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
} }
message RequestCheckTx { message RequestCheckTx {
@ -129,7 +128,7 @@ message ResponseSetOption {
} }
message ResponseInitChain { message ResponseInitChain {
repeated ResponseValidator validators = 1 [(gogoproto.nullable)=false];
repeated Validator validators = 1 [(gogoproto.nullable)=false];
} }
message ResponseQuery { message ResponseQuery {
@ -171,7 +170,7 @@ message ResponseDeliverTx {
} }
message ResponseEndBlock { message ResponseEndBlock {
repeated ResponseValidator validator_updates = 1 [(gogoproto.nullable)=false];
repeated Validator validator_updates = 1 [(gogoproto.nullable)=false];
ConsensusParams consensus_param_updates = 2; ConsensusParams consensus_param_updates = 2;
repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
} }
@ -231,21 +230,20 @@ message Header {
bytes app_hash = 7; bytes app_hash = 7;
// consensus // consensus
RequestValidator proposer = 8;
Validator proposer = 8;
} }
// Validator for use in responses
message ResponseValidator {
PubKey pub_key = 1;
int64 power = 2;
// Validator
message Validator {
bytes address = 1;
PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3;
} }
// Validator for use in requests
message RequestValidator {
bytes address = 1;
int32 index = 2;
PubKey pub_key = 3;
int64 power = 4;
// Validator with an extra bool
message SigningValidator {
Validator validator = 1;
bool signed_last_block = 2;
} }
message PubKey { message PubKey {
@ -255,7 +253,7 @@ message PubKey {
message Evidence { message Evidence {
string type = 1; string type = 1;
RequestValidator validator = 2;
Validator validator = 2;
int64 height = 3; int64 height = 3;
int64 time = 4; int64 time = 4;
int64 total_voting_power = 5; int64 total_voting_power = 5;


Loading…
Cancel
Save