Skip to content

Commit

Permalink
Update protos and regenerate swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
iKapitonau committed Jan 15, 2025
1 parent 6e58e75 commit 4d320f7
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 69 deletions.
2 changes: 1 addition & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Secret Network",
"description": "A REST interface for queries and transactions",
"version": "v1.15"
"version": "v1.16"
},
"apis": [
{
Expand Down
4 changes: 2 additions & 2 deletions client/docs/static/openapi/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/docs/static/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Secret Network
description: A REST interface for queries and transactions
version: v1.15
version: v1.16
paths:
"/cosmos/auth/v1beta1/account_info/{address}":
get:
Expand Down
2 changes: 1 addition & 1 deletion client/docs/static/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ swagger: '2.0'
info:
title: Secret Network
description: A REST interface for queries and transactions
version: v1.15
version: v1.16
paths:
/cosmos/auth/v1beta1/account_info/{address}:
get:
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion third_party/proto/cosmos/bank/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ message Module {

// authority defines the custom module authority. If not set, defaults to the governance module.
string authority = 2;
}

// restrictions_order specifies the order of send restrictions and should be
// a list of module names which provide a send restriction instance. If no
// order is provided, then restrictions will be applied in alphabetical order
// of module names.
repeated string restrictions_order = 3;
}
4 changes: 2 additions & 2 deletions third_party/proto/cosmos/staking/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ message QueryRedelegationsRequest {
string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// src_validator_addr defines the validator address to redelegate from.
string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];

// dst_validator_addr defines the validator address to redelegate to.
string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];

// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 4;
Expand Down
3 changes: 1 addition & 2 deletions third_party/proto/tendermint/blocksync/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ message BlockResponse {
}

// StatusRequest requests the status of a peer.
message StatusRequest {
}
message StatusRequest {}

// StatusResponse is a peer response to inform their status.
message StatusResponse {
Expand Down
9 changes: 4 additions & 5 deletions third_party/proto/tendermint/consensus/wal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ message MsgInfo {

// TimeoutInfo internally generated messages which may update the state
message TimeoutInfo {
google.protobuf.Duration duration = 1
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
int64 height = 2;
int32 round = 3;
uint32 step = 4;
google.protobuf.Duration duration = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
int64 height = 2;
int32 round = 3;
uint32 step = 4;
}

// EndHeight marks the end of the given height inside WAL.
Expand Down
14 changes: 5 additions & 9 deletions third_party/proto/tendermint/state/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ message LegacyABCIResponses {

// ResponseBeginBlock is kept for backwards compatibility for versions prior to v0.38
message ResponseBeginBlock {
repeated tendermint.abci.Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
repeated tendermint.abci.Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}

// ResponseEndBlock is kept for backwards compatibility for versions prior to v0.38
message ResponseEndBlock {
repeated tendermint.abci.ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
tendermint.types.ConsensusParams consensus_param_updates = 2;
repeated tendermint.abci.Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}

// ValidatorsInfo represents the latest validator set, or the last height it changed
Expand Down Expand Up @@ -66,11 +64,9 @@ message State {
int64 initial_height = 14;

// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
int64 last_block_height = 3;
tendermint.types.BlockID last_block_id = 4
[(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"];
google.protobuf.Timestamp last_block_time = 5
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
int64 last_block_height = 3;
tendermint.types.BlockID last_block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"];
google.protobuf.Timestamp last_block_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];

// LastValidators is used to validate block.LastCommit.
// Validators are persisted to the database separately every time they change,
Expand Down
12 changes: 6 additions & 6 deletions third_party/proto/tendermint/types/canonical.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ message CanonicalPartSetHeader {
}

message CanonicalProposal {
SignedMsgType type = 1; // type alias for byte
sfixed64 height = 2; // canonicalization requires fixed size encoding here
sfixed64 round = 3; // canonicalization requires fixed size encoding here
SignedMsgType type = 1; // type alias for byte
sfixed64 height = 2; // canonicalization requires fixed size encoding here
sfixed64 round = 3; // canonicalization requires fixed size encoding here
int64 pol_round = 4 [(gogoproto.customname) = "POLRound"];
CanonicalBlockID block_id = 5 [(gogoproto.customname) = "BlockID"];
google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 7 [(gogoproto.customname) = "ChainID"];
}

message CanonicalVote {
SignedMsgType type = 1; // type alias for byte
sfixed64 height = 2; // canonicalization requires fixed size encoding here
sfixed64 round = 3; // canonicalization requires fixed size encoding here
SignedMsgType type = 1; // type alias for byte
sfixed64 height = 2; // canonicalization requires fixed size encoding here
sfixed64 round = 3; // canonicalization requires fixed size encoding here
CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"];
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 6 [(gogoproto.customname) = "ChainID"];
Expand Down
2 changes: 1 addition & 1 deletion third_party/proto/tendermint/types/evidence.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ message LightClientAttackEvidence {
int64 common_height = 2;
repeated tendermint.types.Validator byzantine_validators = 3;
int64 total_voting_power = 4;
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}

message EvidenceList {
Expand Down
5 changes: 2 additions & 3 deletions third_party/proto/tendermint/types/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ message BlockParams {
// Note: must be greater or equal to -1
int64 max_gas = 2;

reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792
reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792
}

// EvidenceParams determine how we handle evidence of malfeasance.
Expand All @@ -43,8 +43,7 @@ message EvidenceParams {
// It should correspond with an app's "unbonding period" or other similar
// mechanism for handling [Nothing-At-Stake
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
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];

// This sets the maximum size of total evidence in bytes that can be committed in a single block.
// and should fall comfortably under the max block bytes.
Expand Down
52 changes: 23 additions & 29 deletions third_party/proto/tendermint/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ message Header {
BlockID last_block_id = 5 [(gogoproto.nullable) = false];

// hashes of block data
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions

// hashes from the app output from the prev block
bytes validators_hash = 8; // validators for the current block
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 validators_hash = 8; // validators for the current block
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

// consensus info
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block

// encrypted random
EncryptedRandom encrypted_random = 15; // a random number encrypted by the proposer to be used in contracts
Expand All @@ -76,7 +76,7 @@ message Header {
// Data contains the set of transactions included in the block
message EncryptedRandom {
bytes random = 1;
bytes proof = 2;
bytes proof = 2;
}

// Data contains the set of transactions included in the block
Expand All @@ -93,12 +93,10 @@ message Vote {
SignedMsgType type = 1;
int64 height = 2;
int32 round = 3;
BlockID block_id = 4
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
google.protobuf.Timestamp timestamp = 5
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes validator_address = 6;
int32 validator_index = 7;
// Vote signature by the validator if they participated in consensus for the
// associated block.
bytes signature = 8;
Expand All @@ -123,16 +121,14 @@ message Commit {
message CommitSig {
tendermint.types.BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
}

message ExtendedCommit {
int64 height = 1;
int32 round = 2;
BlockID block_id = 3
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
int64 height = 1;
int32 round = 2;
BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false];
}

Expand All @@ -142,9 +138,8 @@ message ExtendedCommit {
message ExtendedCommitSig {
tendermint.types.BlockIDFlag block_id_flag = 1;
bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 4;
// Vote extension data
bytes extension = 5;
// Vote extension signature
Expand All @@ -157,9 +152,8 @@ message Proposal {
int32 round = 3;
int32 pol_round = 4;
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
google.protobuf.Timestamp timestamp = 6
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 7;
google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
bytes signature = 7;
}

message SignedHeader {
Expand Down
10 changes: 5 additions & 5 deletions third_party/proto/tendermint/types/validator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ enum BlockIDFlag {
option (gogoproto.goproto_enum_stringer) = true;
option (gogoproto.goproto_enum_prefix) = false;

BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received
BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil
BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received
BLOCK_ID_FLAG_COMMIT = 2
[(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil
}


message ValidatorSet {
repeated Validator validators = 1;
Validator proposer = 2;
Expand Down

0 comments on commit 4d320f7

Please sign in to comment.