proto: minor linting to proto files (#4386)

* proto: minor linting

minor linting after working with the proto files in the sdk.

there is no logic change just spacing fixes

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* hardcore linting
This commit is contained in:
Marko
2020-02-11 15:07:05 +01:00
committed by GitHub
parent c494070b31
commit 9a9e8c5bb3
5 changed files with 168 additions and 168 deletions

View File

@@ -46,8 +46,7 @@ message RequestEcho {
string message = 1;
}
message RequestFlush {
}
message RequestFlush {}
message RequestInfo {
string version = 1;
@@ -62,10 +61,10 @@ message RequestSetOption {
}
message RequestInitChain {
google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 2;
ConsensusParams consensus_params = 3;
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable)=false];
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
bytes app_state_bytes = 5;
}
@@ -78,9 +77,9 @@ message RequestQuery {
message RequestBeginBlock {
bytes hash = 1;
Header header = 2 [(gogoproto.nullable)=false];
LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false];
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
Header header = 2 [(gogoproto.nullable) = false];
LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false];
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false];
}
enum CheckTxType {
@@ -101,8 +100,7 @@ message RequestEndBlock {
int64 height = 1;
}
message RequestCommit {
}
message RequestCommit {}
//----------------------------------------
// Response types
@@ -133,8 +131,7 @@ message ResponseEcho {
string message = 1;
}
message ResponseFlush {
}
message ResponseFlush {}
message ResponseInfo {
string data = 1;
@@ -156,7 +153,7 @@ message ResponseSetOption {
message ResponseInitChain {
ConsensusParams consensus_params = 1;
repeated ValidatorUpdate validators = 2 [(gogoproto.nullable)=false];
repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false];
}
message ResponseQuery {
@@ -173,7 +170,8 @@ message ResponseQuery {
}
message ResponseBeginBlock {
repeated Event events = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCheckTx {
@@ -183,7 +181,8 @@ message ResponseCheckTx {
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
}
@@ -194,14 +193,16 @@ message ResponseDeliverTx {
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
}
message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable)=false];
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
ConsensusParams consensus_param_updates = 2;
repeated Event events = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCommit {
@@ -231,7 +232,8 @@ message BlockParams {
message EvidenceParams {
// Note: must be greater than 0
int64 max_age_num_blocks = 1;
google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable)=false, (gogoproto.stdduration)=true];
google.protobuf.Duration max_age_duration = 2
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
}
// ValidatorParams contains limits on validators.
@@ -241,12 +243,13 @@ message ValidatorParams {
message LastCommitInfo {
int32 round = 1;
repeated VoteInfo votes = 2 [(gogoproto.nullable)=false];
repeated VoteInfo votes = 2 [(gogoproto.nullable) = false];
}
message Event {
string type = 1;
repeated tendermint.libs.kv.Pair attributes = 2 [(gogoproto.nullable)=false, (gogoproto.jsontag)="attributes,omitempty"];
repeated tendermint.libs.kv.Pair attributes = 2
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
}
//----------------------------------------
@@ -254,13 +257,13 @@ message Event {
message Header {
// basic block info
Version version = 1 [(gogoproto.nullable)=false];
string chain_id = 2 [(gogoproto.customname)="ChainID"];
Version version = 1 [(gogoproto.nullable) = false];
string chain_id = 2 [(gogoproto.customname) = "ChainID"];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// prev block info
BlockID last_block_id = 5 [(gogoproto.nullable)=false];
BlockID last_block_id = 5 [(gogoproto.nullable) = false];
// hashes of block data
bytes last_commit_hash = 6; // commit from validators from the last block
@@ -271,7 +274,7 @@ message Header {
bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12;// root hash of all results from the txs from the previous block
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
// consensus info
bytes evidence_hash = 13; // evidence included in the block
@@ -283,10 +286,9 @@ message Version {
uint64 App = 2;
}
message BlockID {
bytes hash = 1;
PartSetHeader parts_header = 2 [(gogoproto.nullable)=false];
PartSetHeader parts_header = 2 [(gogoproto.nullable) = false];
}
message PartSetHeader {
@@ -297,19 +299,19 @@ message PartSetHeader {
// Validator
message Validator {
bytes address = 1;
//PubKey pub_key = 2 [(gogoproto.nullable)=false];
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3;
}
// ValidatorUpdate
message ValidatorUpdate {
PubKey pub_key = 1 [(gogoproto.nullable)=false];
PubKey pub_key = 1 [(gogoproto.nullable) = false];
int64 power = 2;
}
// VoteInfo
message VoteInfo {
Validator validator = 1 [(gogoproto.nullable)=false];
Validator validator = 1 [(gogoproto.nullable) = false];
bool signed_last_block = 2;
}
@@ -320,9 +322,9 @@ message PubKey {
message Evidence {
string type = 1;
Validator validator = 2 [(gogoproto.nullable)=false];
Validator validator = 2 [(gogoproto.nullable) = false];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
int64 total_voting_power = 5;
}
@@ -330,7 +332,7 @@ message Evidence {
// Service Definition
service ABCIApplication {
rpc Echo(RequestEcho) returns (ResponseEcho) ;
rpc Echo(RequestEcho) returns (ResponseEcho);
rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo);
rpc SetOption(RequestSetOption) returns (ResponseSetOption);

View File

@@ -27,5 +27,5 @@ message ProofOp {
// Proof is Merkle proof defined by the list of ProofOps
message Proof {
repeated ProofOp ops = 1 [(gogoproto.nullable)=false];
repeated ProofOp ops = 1 [(gogoproto.nullable) = false];
}

View File

@@ -16,13 +16,13 @@ option (gogoproto.testgen_all) = true;
//----------------------------------------
// Abstract types
// Define these here for compatibility but use tmlibs/common.KVPair.
// Define these here for compatibility but use tmlibs/kv.Pair.
message Pair {
bytes key = 1;
bytes value = 2;
}
// Define these here for compatibility but use tmlibs/common.KI64Pair.
// Define these here for compatibility but use tmlibs/kv.KI64Pair.
message KI64Pair {
bytes key = 1;
int64 value = 2;

View File

@@ -19,8 +19,7 @@ option (gogoproto.testgen_all) = true;
//----------------------------------------
// Request types
message RequestPing {
}
message RequestPing {}
message RequestBroadcastTx {
bytes tx = 1;
@@ -29,10 +28,9 @@ message RequestBroadcastTx {
//----------------------------------------
// Response types
message ResponsePing{
}
message ResponsePing {}
message ResponseBroadcastTx{
message ResponseBroadcastTx {
tendermint.abci.types.ResponseCheckTx check_tx = 1;
tendermint.abci.types.ResponseDeliverTx deliver_tx = 2;
}
@@ -41,6 +39,6 @@ message ResponseBroadcastTx{
// Service Definition
service BroadcastAPI {
rpc Ping(RequestPing) returns (ResponsePing) ;
rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx) ;
rpc Ping(RequestPing) returns (ResponsePing);
rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx);
}