From 8bb04d7ef7d03165e397fc89db7a8b9662e6b4a1 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 23 May 2018 22:20:24 -0400 Subject: [PATCH] Validator and SignedValidator --- types/types.proto | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/types/types.proto b/types/types.proto index 20101305b..2cea82d0d 100644 --- a/types/types.proto +++ b/types/types.proto @@ -47,7 +47,7 @@ message RequestSetOption { } message RequestInitChain { - repeated RequestValidator validators = 1 [(gogoproto.nullable)=false]; + repeated Validator validators = 1 [(gogoproto.nullable)=false]; bytes genesis_bytes = 2; } @@ -61,9 +61,8 @@ message RequestQuery { message RequestBeginBlock { bytes hash = 1; 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 { @@ -129,7 +128,7 @@ message ResponseSetOption { } message ResponseInitChain { - repeated ResponseValidator validators = 1 [(gogoproto.nullable)=false]; + repeated Validator validators = 1 [(gogoproto.nullable)=false]; } message ResponseQuery { @@ -171,7 +170,7 @@ message ResponseDeliverTx { } message ResponseEndBlock { - repeated ResponseValidator validator_updates = 1 [(gogoproto.nullable)=false]; + repeated Validator validator_updates = 1 [(gogoproto.nullable)=false]; ConsensusParams consensus_param_updates = 2; repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; } @@ -231,21 +230,20 @@ message Header { bytes app_hash = 7; // 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 { @@ -255,7 +253,7 @@ message PubKey { message Evidence { string type = 1; - RequestValidator validator = 2; + Validator validator = 2; int64 height = 3; int64 time = 4; int64 total_voting_power = 5;