Browse Source

Request/ResponseValidator, update Header

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
459ee59e46
1 changed files with 30 additions and 21 deletions
  1. +30
    -21
      types/types.proto

+ 30
- 21
types/types.proto View File

@ -47,7 +47,7 @@ message RequestSetOption {
}
message RequestInitChain {
repeated Validator validators = 1 [(gogoproto.nullable)=false];
repeated RequestValidator validators = 1 [(gogoproto.nullable)=false];
bytes genesis_bytes = 2;
}
@ -61,8 +61,9 @@ message RequestQuery {
message RequestBeginBlock {
bytes hash = 1;
Header header = 2 [(gogoproto.nullable)=false];
repeated bytes absent_validators = 3;
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
repeated RequestValidator present_validators = 3;
repeated RequestValidator absent_validators = 4;
repeated Evidence byzantine_validators = 5 [(gogoproto.nullable)=false];
}
message RequestCheckTx {
@ -128,7 +129,7 @@ message ResponseSetOption {
}
message ResponseInitChain {
repeated Validator validators = 1 [(gogoproto.nullable)=false];
repeated ResponseValidator validators = 1 [(gogoproto.nullable)=false];
}
message ResponseQuery {
@ -170,7 +171,7 @@ message ResponseDeliverTx {
}
message ResponseEndBlock {
repeated Validator validator_updates = 1 [(gogoproto.nullable)=false];
repeated ResponseValidator validator_updates = 1 [(gogoproto.nullable)=false];
ConsensusParams consensus_param_updates = 2;
repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
}
@ -214,36 +215,44 @@ message BlockGossip {
//----------------------------------------
// Blockchain Types
// just the minimum the app might need
message Header {
// basics
string chain_id = 1 [(gogoproto.customname)="ChainID"];
int64 height = 2;
int64 time = 3;
// txs
int32 num_txs = 4;
BlockID last_block_id = 5 [(gogoproto.customname)="LastBlockID", (gogoproto.nullable)=false];
bytes last_commit_hash = 6;
bytes data_hash = 7;
bytes validators_hash = 8;
bytes app_hash = 9;
int64 total_txs = 5;
// hashes
bytes last_block_hash = 6;
bytes app_hash = 7;
}
message BlockID {
bytes hash = 1;
PartSetHeader parts = 2 [(gogoproto.nullable)=false];
// Validator for use in responses
message ResponseValidator {
PubKey pub_key = 1;
int64 power = 2;
}
message PartSetHeader {
int32 total = 1;
bytes hash = 2;
// Validator for use in requests
message RequestValidator {
bytes address = 1;
int32 index = 2;
PubKey pub_key = 3;
int64 power = 4;
}
message Validator {
bytes pub_key = 1;
int64 power = 2;
message PubKey {
string type = 1;
bytes data = 2;
}
message Evidence {
bytes type = 1;
bytes pub_key = 2;
string type = 1;
RequestValidator validator = 2;
int64 height = 3;
int64 time = 4;
}


Loading…
Cancel
Save