fix: fix proto files created as super-user (#13801)

* chore: bump proto-builder

* updates

* fix root issue

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Julien Robert 2022-11-09 11:37:07 +01:00 committed by GitHub
parent 50e8961bb8
commit 76be73022a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 174 additions and 109 deletions

View File

@ -406,38 +406,30 @@ devdoc-update:
### Protobuf ###
###############################################################################
protoVer=0.11.0
protoVer=0.11.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer)
containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer)
containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.9.0
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
proto-all: proto-format proto-lint proto-gen
proto-gen:
@echo "Generating Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
sh ./scripts/protocgen.sh; fi
@$(protoImage) sh ./scripts/protocgen.sh
proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
sh ./scripts/protoc-swagger-gen.sh; fi
@$(protoImage) sh ./scripts/protoc-swagger-gen.sh
proto-format:
@echo "Formatting Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
find ./ -name "*.proto" -exec clang-format -i {} \; ; fi
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
proto-lint:
@$(DOCKER_BUF) lint --error-format=json
@$(protoImage) buf lint --error-format=json
proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.37.0-alpha.2/proto/tendermint
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.37.0-rc1/proto/tendermint
TM_CRYPTO_TYPES = proto/tendermint/crypto
TM_ABCI_TYPES = proto/tendermint/abci
@ -472,6 +464,8 @@ proto-update-deps:
@mkdir -p $(TM_P2P)
@curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto
$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
###############################################################################

View File

@ -6328,9 +6328,9 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d,
0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74,
0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61,
0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f,
0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d,
0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f,
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65,
@ -6343,9 +6343,9 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{
0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x16,
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74,
0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01,
0x2a, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74,
0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,

View File

@ -2919,7 +2919,7 @@ func (x *DominoOp) GetOutput() string {
}
// ProofOp defines an operation used for calculating Merkle root
// The data could be arbitrary format, providing necessary data
// The data could be arbitrary format, providing nessecary data
// for example neighbouring node hash
type ProofOp struct {
state protoimpl.MessageState

View File

@ -2,11 +2,9 @@
# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools"
# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh
FROM bufbuild/buf:1.7.0 as BUILDER
FROM bufbuild/buf:1.9.0 as BUILDER
FROM golang:1.19-alpine
RUN apk add --no-cache \
nodejs \
npm \
@ -14,6 +12,13 @@ RUN apk add --no-cache \
make \
clang-extra-tools
RUN npm install -g swagger-combine
ARG UNAME=protobuild
ARG UID=1000
RUN adduser -u $UID -s /bin/sh $UNAME -D
USER $UNAME
ENV GOLANG_PROTOBUF_VERSION=1.28.1 \
GRPC_GATEWAY_VERSION=1.16.0
@ -28,6 +33,4 @@ RUN git clone https://github.com/cosmos/gogoproto.git; \
go mod download; \
make install
RUN npm install -g swagger-combine
COPY --from=BUILDER /usr/local/bin /usr/local/bin
COPY --from=BUILDER /usr/local/bin /usr/local/bin

View File

@ -8,8 +8,8 @@ deps:
- remote: buf.build
owner: cosmos
repository: gogo-proto
commit: 6652e3443c3b4504bb3bf82e73a7e409
commit: 34d970b699f84aa382f3c29773a60836
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 62f35d8aed1149c291d606d958a7ce32
commit: 783e4b5374fa488ab068d08af9658438

View File

@ -137,8 +137,11 @@ message QueryAllBalancesRequest {
// method.
message QueryAllBalancesResponse {
// balances is the balances of all the coins.
repeated cosmos.base.v1beta1.Coin balances = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
@ -165,8 +168,11 @@ message QuerySpendableBalancesRequest {
// Since: cosmos-sdk 0.46
message QuerySpendableBalancesResponse {
// balances is the spendable balances of all the coins.
repeated cosmos.base.v1beta1.Coin balances = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
@ -188,8 +194,11 @@ message QueryTotalSupplyRequest {
// method
message QueryTotalSupplyResponse {
// supply is the supply of the coins
repeated cosmos.base.v1beta1.Coin supply = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
repeated cosmos.base.v1beta1.Coin supply = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// pagination defines the pagination in the response.
//

View File

@ -25,7 +25,8 @@ message Header {
.tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
string chain_id = 2 [(gogoproto.customname) = "ChainID"];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp time = 4
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
// prev block info
.tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

View File

@ -18,9 +18,9 @@ message Coin {
string denom = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "Int",
(gogoproto.nullable) = false,
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

View File

@ -33,8 +33,11 @@ message ValidatorOutstandingRewardsRecord {
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// outstanding_rewards represents the outstanding rewards of a validator.
repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}
// ValidatorAccumulatedCommissionRecord is used for import / export via genesis
@ -120,26 +123,33 @@ message GenesisState {
FeePool fee_pool = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the delegator withdraw infos at genesis.
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the previous proposer at genesis.
string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// fee_pool defines the outstanding rewards of all validators at genesis.
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the accumulated commisions of all validators at genesis.
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the historical rewards of all validators at genesis.
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the current rewards of all validators at genesis.
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the delegator starting infos at genesis.
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// fee_pool defines the validator slash events at genesis.
repeated ValidatorSlashEventRecord validator_slash_events = 10 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated ValidatorSlashEventRecord validator_slash_events = 10
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

View File

@ -92,8 +92,11 @@ message QueryValidatorDistributionInfoResponse {
// operator_address defines the validator operator address.
string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// self_bond_rewards defines the self delegations rewards.
repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
// commission defines the commission the validator received.
repeated cosmos.base.v1beta1.DecCoin commission = 3
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
@ -168,8 +171,11 @@ message QueryDelegationRewardsRequest {
// Query/DelegationRewards RPC method.
message QueryDelegationRewardsResponse {
// rewards defines the rewards accrued by a delegation.
repeated cosmos.base.v1beta1.DecCoin rewards = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}
// QueryDelegationTotalRewardsRequest is the request type for the
@ -187,8 +193,11 @@ message QueryDelegationTotalRewardsResponse {
// rewards defines all the rewards accrued by a delegator.
repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// total defines the sum of all the rewards.
repeated cosmos.base.v1beta1.DecCoin total = 2
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
repeated cosmos.base.v1beta1.DecCoin total = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}
// QueryDelegatorValidatorsRequest is the request type for the
@ -239,6 +248,9 @@ message QueryCommunityPoolRequest {}
// RPC method.
message QueryCommunityPoolResponse {
// pool defines community pool's coins.
repeated cosmos.base.v1beta1.DecCoin pool = 1
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated cosmos.base.v1beta1.DecCoin pool = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

View File

@ -25,7 +25,8 @@ service Query {
message QueryEvidenceRequest {
// evidence_hash defines the hash of the requested evidence.
// Deprecated: Use hash, a HEX encoded string, instead.
bytes evidence_hash = 1 [deprecated = true, (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
bytes evidence_hash = 1
[deprecated = true, (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
// hash defines the evidence hash of the requested evidence.
//

View File

@ -13,11 +13,14 @@ message GenesisState {
// starting_proposal_id is the ID of the starting proposal.
uint64 starting_proposal_id = 1;
// deposits defines all the deposits present at genesis.
repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated Deposit deposits = 2
[(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// votes defines all the votes present at genesis.
repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated Vote votes = 3
[(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// proposals defines all the proposals present at genesis.
repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated Proposal proposals = 4
[(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// params defines all the parameters of related to deposit.
DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// params defines all the parameters of related to voting.

View File

@ -15,7 +15,8 @@ message Module {
// max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec
// to execute the proposal.
google.protobuf.Duration max_execution_period = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
google.protobuf.Duration max_execution_period = 1
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// max_metadata_len defines the max length of the metadata bytes field for various entities within the group module.
// Defaults to 255 if not explicitly set.

View File

@ -26,7 +26,8 @@ message Member {
string metadata = 3;
// added_at is a timestamp specifying when a member was added.
google.protobuf.Timestamp added_at = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp added_at = 4
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
}
// MemberRequest represents a group member to be used in Msg server requests.
@ -52,7 +53,7 @@ message MemberRequest {
// given by `windows`.
message ThresholdDecisionPolicy {
option (cosmos_proto.implements_interface) = "DecisionPolicy";
option (amino.name) = "cosmos-sdk/ThresholdDecisionPolicy";
option (amino.name) = "cosmos-sdk/ThresholdDecisionPolicy";
// threshold is the minimum weighted sum of `YES` votes that must be met or
// exceeded for a proposal to succeed.
@ -70,7 +71,7 @@ message ThresholdDecisionPolicy {
// given by `windows`.
message PercentageDecisionPolicy {
option (cosmos_proto.implements_interface) = "DecisionPolicy";
option (amino.name) = "cosmos-sdk/PercentageDecisionPolicy";
option (amino.name) = "cosmos-sdk/PercentageDecisionPolicy";
// percentage is the minimum percentage the weighted sum of `YES` votes must
// meet for a proposal to succeed.
@ -84,7 +85,8 @@ message PercentageDecisionPolicy {
message DecisionPolicyWindows {
// voting_period is the duration from submission of a proposal to the end of voting period
// Within this times votes can be submitted with MsgVote.
google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
google.protobuf.Duration voting_period = 1
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// min_execution_period is the minimum duration after the proposal submission
// where members can start sending MsgExec. This means that the window for
@ -97,7 +99,8 @@ message DecisionPolicyWindows {
// `voting_period + max_execution_period`, or else the above execution window
// is empty, meaning that all proposals created with this decision policy
// won't be able to be executed.
google.protobuf.Duration min_execution_period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
google.protobuf.Duration min_execution_period = 2
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// VoteOption enumerates the valid vote options for a given proposal.
@ -143,7 +146,8 @@ message GroupInfo {
string total_weight = 5;
// created_at is a timestamp specifying when a group was created.
google.protobuf.Timestamp created_at = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp created_at = 6
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
}
// GroupMember represents the relationship between a group and a member.
@ -181,7 +185,8 @@ message GroupPolicyInfo {
google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"];
// created_at is a timestamp specifying when a group policy was created.
google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp created_at = 7
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
}
// Proposal defines a group proposal. Any member of a group can submit a proposal
@ -204,7 +209,8 @@ message Proposal {
repeated string proposers = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// submit_time is a timestamp specifying when a proposal was submitted.
google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp submit_time = 5
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
// group_version tracks the version of the group at proposal submission.
// This field is here for informational purposes only.
@ -230,7 +236,8 @@ message Proposal {
// tally is successful before the voting period ends), tallying will be done
// at this point, and the `final_tally_result`and `status` fields will be
// accordingly updated.
google.protobuf.Timestamp voting_period_end = 10 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp voting_period_end = 10
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
// executor_result is the final result of the proposal execution. Initial value is NotRun.
ProposalExecutorResult executor_result = 11;
@ -316,5 +323,6 @@ message Vote {
string metadata = 4;
// submit_time is the timestamp when the vote was submitted.
google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
google.protobuf.Timestamp submit_time = 5
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
}

View File

@ -42,7 +42,11 @@ message QueryInflationRequest {}
// method.
message QueryInflationResponse {
// inflation is the current minting inflation value.
bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
bytes inflation = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}
// QueryAnnualProvisionsRequest is the request type for the
@ -53,6 +57,9 @@ message QueryAnnualProvisionsRequest {}
// Query/AnnualProvisions RPC method.
message QueryAnnualProvisionsResponse {
// annual_provisions is the current minting annual provisions value.
bytes annual_provisions = 1
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
bytes annual_provisions = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

View File

@ -60,6 +60,7 @@ message QuerySigningInfosRequest {
// method
message QuerySigningInfosResponse {
// info is the signing info of all validators
repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

View File

@ -24,7 +24,8 @@ message ValidatorSigningInfo {
// `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`.
int64 index_offset = 3;
// Timestamp until which the validator is jailed due to liveness downtime.
google.protobuf.Timestamp jailed_until = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
google.protobuf.Timestamp jailed_until = 4
[(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// Whether or not a validator has been tombstoned (killed out of validator set). It is set
// once the validator commits an equivocation or for any other configured misbehiavor.
bool tombstoned = 5;
@ -38,11 +39,21 @@ message Params {
option (amino.name) = "cosmos-sdk/x/slashing/Params";
int64 signed_blocks_window = 1;
bytes min_signed_per_window = 2
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
google.protobuf.Duration downtime_jail_duration = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];
bytes slash_fraction_double_sign = 4
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
bytes slash_fraction_downtime = 5
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
bytes min_signed_per_window = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
google.protobuf.Duration downtime_jail_duration = 3
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];
bytes slash_fraction_double_sign = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
bytes slash_fraction_downtime = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

View File

@ -15,8 +15,11 @@ message GenesisState {
// last_total_power tracks the total amounts of bonded tokens recorded during
// the previous end block.
bytes last_total_power = 2
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
bytes last_total_power = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// last_validator_powers is a special index that provides a historical list
// of the last-block's bonded validators.

View File

@ -45,14 +45,14 @@ service Query {
returns (QueryValidatorUnbondingDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/"
"{validator_addr}/unbonding_delegations";
"{validator_addr}/unbonding_delegations";
}
// Delegation queries delegate info for given validator delegator pair.
rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
"{delegator_addr}";
"{delegator_addr}";
}
// UnbondingDelegation queries unbonding info for given validator delegator
@ -60,7 +60,7 @@ service Query {
rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
"{delegator_addr}/unbonding_delegation";
"{delegator_addr}/unbonding_delegation";
}
// DelegatorDelegations queries all delegations of a given delegator address.
@ -81,7 +81,7 @@ service Query {
returns (QueryDelegatorUnbondingDelegationsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/"
"{delegator_addr}/unbonding_delegations";
"{delegator_addr}/unbonding_delegations";
}
// Redelegations queries redelegations of given address.
@ -108,7 +108,7 @@ service Query {
rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/"
"{validator_addr}";
"{validator_addr}";
}
// HistoricalInfo queries the historical info for given height.
@ -304,7 +304,8 @@ message QueryRedelegationsRequest {
// QueryRedelegationsResponse is response type for the Query/Redelegations RPC
// method.
message QueryRedelegationsResponse {
repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated RedelegationResponse redelegation_responses = 1
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;

View File

@ -27,7 +27,7 @@ message DominoOp {
}
// ProofOp defines an operation used for calculating Merkle root
// The data could be arbitrary format, providing necessary data
// The data could be arbitrary format, providing nessecary data
// for example neighbouring node hash
message ProofOp {
string type = 1;

View File

@ -732,7 +732,7 @@ func init() {
func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) }
var fileDescriptor_e0b00a618705eca7 = []byte{
// 1013 bytes of a gzipped FileDescriptorProto
// 1012 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1a, 0x47,
0x14, 0xf6, 0x2e, 0x60, 0xc8, 0xc3, 0x4e, 0xc8, 0xd8, 0xb5, 0x09, 0x71, 0x31, 0xd9, 0xd4, 0x3f,
0x62, 0xc9, 0xbb, 0x0a, 0x4d, 0xa5, 0xaa, 0xaa, 0x54, 0x99, 0x1f, 0xa1, 0x34, 0x4d, 0x88, 0x06,
@ -784,19 +784,19 @@ var fileDescriptor_e0b00a618705eca7 = []byte{
0x53, 0xd0, 0x26, 0xac, 0xcd, 0x9c, 0x56, 0x9f, 0x3f, 0xc9, 0x27, 0x54, 0x97, 0xe7, 0xcc, 0xc1,
0x91, 0x38, 0x09, 0x65, 0x7f, 0x8d, 0x40, 0xb4, 0xea, 0x3d, 0x9e, 0xe8, 0x0c, 0x62, 0xa3, 0xa6,
0x43, 0x5a, 0x40, 0xb9, 0x66, 0x7a, 0x3d, 0x75, 0xf7, 0x8d, 0x18, 0x79, 0x35, 0x77, 0x7f, 0xfa,
0xf3, 0xdf, 0xdf, 0xd4, 0x8c, 0x76, 0xdb, 0x08, 0x78, 0xb5, 0x25, 0xf8, 0x33, 0xe5, 0x00, 0x9d,
0x40, 0x44, 0x74, 0x10, 0xda, 0x0e, 0xf0, 0xea, 0xef, 0xbf, 0x54, 0x66, 0x31, 0x40, 0xc6, 0xdc,
0x11, 0x31, 0xb7, 0xd1, 0x87, 0x46, 0xd0, 0x93, 0xcd, 0x8c, 0x33, 0xb7, 0x67, 0xcf, 0xd1, 0x0f,
0x10, 0xf7, 0x0d, 0x47, 0xb4, 0xf3, 0xa6, 0x99, 0x3a, 0x09, 0xbf, 0x7b, 0x15, 0x4c, 0x92, 0xb8,
0x23, 0x48, 0xdc, 0xd6, 0x36, 0x82, 0x49, 0xb8, 0x39, 0x7f, 0x0f, 0x71, 0xdf, 0x83, 0x17, 0x48,
0x60, 0xfe, 0xb1, 0x0f, 0x24, 0x10, 0xf0, 0x6e, 0x6a, 0x69, 0x41, 0x20, 0x89, 0x16, 0x10, 0x40,
0xbf, 0x2b, 0x70, 0x63, 0xa6, 0x75, 0xd1, 0xbd, 0x60, 0xdf, 0x01, 0x93, 0x25, 0x75, 0xf0, 0x36,
0x50, 0x49, 0xe5, 0x50, 0x50, 0xd9, 0x43, 0x3b, 0x0b, 0x0a, 0x22, 0x3a, 0xd4, 0x38, 0xf3, 0x66,
0xd3, 0x79, 0xee, 0x8b, 0x3f, 0x2e, 0xd2, 0xca, 0xab, 0x8b, 0xb4, 0xf2, 0xcf, 0x45, 0x5a, 0xf9,
0xe5, 0x32, 0xbd, 0xf4, 0xea, 0x32, 0xbd, 0xf4, 0xd7, 0x65, 0x7a, 0xe9, 0xdb, 0x9d, 0x96, 0xc5,
0xdb, 0x83, 0xba, 0xde, 0xa0, 0xdd, 0x91, 0x2b, 0xef, 0xdf, 0x21, 0x6b, 0xbe, 0x1c, 0x7d, 0x2f,
0x39, 0xf5, 0x65, 0xf1, 0xb5, 0xf4, 0xf1, 0xeb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xc8, 0xb5,
0x68, 0x2a, 0x0a, 0x00, 0x00,
0xf3, 0xdf, 0xdf, 0xd4, 0xcc, 0x67, 0xca, 0x81, 0x76, 0xdb, 0x08, 0x78, 0xb8, 0x47, 0x01, 0x4f,
0x20, 0x22, 0x3a, 0x08, 0x6d, 0x07, 0x78, 0xf5, 0xf7, 0x5f, 0x2a, 0xb3, 0x18, 0x20, 0x63, 0xee,
0x88, 0x98, 0xdb, 0xe8, 0x43, 0x23, 0xe8, 0xc9, 0x66, 0xc6, 0x99, 0xdb, 0xb3, 0xe7, 0xe8, 0x07,
0x88, 0xfb, 0x86, 0x23, 0xda, 0x79, 0xd3, 0x4c, 0x9d, 0x84, 0xdf, 0xbd, 0x0a, 0x26, 0x49, 0xdc,
0x11, 0x24, 0x6e, 0xbb, 0x89, 0x6f, 0x04, 0xf3, 0x40, 0xdf, 0x43, 0xdc, 0xf7, 0xe0, 0x05, 0x12,
0x98, 0x7f, 0xec, 0x03, 0x09, 0x04, 0xbc, 0x9b, 0x5a, 0x5a, 0x10, 0x48, 0xa2, 0x45, 0xd1, 0x7f,
0x57, 0xe0, 0xc6, 0x4c, 0xeb, 0xa2, 0x7b, 0xc1, 0xbe, 0x03, 0x26, 0x4b, 0xea, 0xe0, 0x6d, 0xa0,
0x92, 0xca, 0xa1, 0xa0, 0xb2, 0x87, 0x76, 0x16, 0x14, 0x44, 0x74, 0xa8, 0x71, 0xe6, 0xcd, 0xa6,
0xf3, 0xdc, 0x17, 0x7f, 0x5c, 0xa4, 0x95, 0x57, 0x17, 0x69, 0xe5, 0x9f, 0x8b, 0xb4, 0xf2, 0xcb,
0x65, 0x7a, 0xe9, 0xd5, 0x65, 0x7a, 0xe9, 0xaf, 0xcb, 0xf4, 0xd2, 0xb7, 0x3b, 0x2d, 0x8b, 0xb7,
0x07, 0x75, 0xbd, 0x41, 0xbb, 0x23, 0x57, 0xde, 0xbf, 0x43, 0xd6, 0x7c, 0x39, 0xfa, 0x5e, 0x72,
0xea, 0xcb, 0xe2, 0x6b, 0xe9, 0xe3, 0xd7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x47, 0x4a,
0x2a, 0x0a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.