Add proto formatting tool (#7266)
* Add proto format option * Add clang format options * Fix proto format * Fix fmt * Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
This commit is contained in:
parent
9856327d95
commit
a9547b54ff
|
@ -0,0 +1,115 @@
|
|||
---
|
||||
Language: Proto
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 120
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
RawStringFormats:
|
||||
- Delimiter: pb
|
||||
Language: TextProto
|
||||
BasedOnStyle: google
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
...
|
||||
|
5
Makefile
5
Makefile
|
@ -312,11 +312,14 @@ devdoc-update:
|
|||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen
|
||||
proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-format
|
||||
|
||||
proto-gen:
|
||||
@./scripts/protocgen.sh
|
||||
|
||||
proto-format:
|
||||
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
|
||||
|
||||
# This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed
|
||||
proto-gen-any:
|
||||
@./scripts/protocgen-any.sh
|
||||
|
|
|
@ -122,6 +122,14 @@ ifeq (, $(shell which protoc-gen-swagger))
|
|||
else
|
||||
@echo "protoc-gen-grpc-gateway already installed; skipping..."
|
||||
endif
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
@echo "Installing clang-format..."
|
||||
sudo apt-get install clang-format
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
@echo "Installing clang-format..."
|
||||
brew install clang-format
|
||||
endif
|
||||
|
||||
buf: buf-stamp
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
|
|||
// GenesisState defines the auth module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// accounts are the accounts present at genesis.
|
||||
repeated google.protobuf.Any accounts = 2;
|
||||
|
|
|
@ -10,26 +10,17 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
|||
// GenesisState defines the bank module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// balances is an array containing the balances of all the accounts.
|
||||
repeated Balance balances = 2 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Balance balances = 2 [(gogoproto.nullable) = false];
|
||||
|
||||
// supply represents the total supply.
|
||||
repeated cosmos.base.v1beta1.Coin supply = 3 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin supply = 3
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
|
||||
// denom_metadata defines the metadata of the differents coins.
|
||||
repeated Metadata denom_metadata = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"denom_metadata\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Balance defines an account address and balance pair used in the bank module's
|
||||
|
@ -41,8 +32,6 @@ message Balance {
|
|||
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
// coins defines the different coins this balance holds.
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -26,7 +26,5 @@ message Owner {
|
|||
// CapabilityOwners defines a set of owners of a single Capability. The set of
|
||||
// owners must be unique.
|
||||
message CapabilityOwners {
|
||||
repeated Owner owners = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Owner owners = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -12,10 +12,7 @@ message GenesisOwners {
|
|||
uint64 index = 1;
|
||||
|
||||
// index_owners are the owners at the given index.
|
||||
CapabilityOwners index_owners = 2[
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"index_owners\""
|
||||
];
|
||||
CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""];
|
||||
}
|
||||
|
||||
// GenesisState defines the capability module's genesis state.
|
||||
|
@ -25,7 +22,5 @@ message GenesisState {
|
|||
|
||||
// owners represents a map from index to owners of the capability index
|
||||
// index key is string to allow amino marshalling.
|
||||
repeated GenesisOwners owners = 2 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@ import "cosmos/base/v1beta1/coin.proto";
|
|||
message GenesisState {
|
||||
// constant_fee is the fee used to verify the invariant in the crisis
|
||||
// module.
|
||||
cosmos.base.v1beta1.Coin constant_fee = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"constant_fee\""
|
||||
];
|
||||
cosmos.base.v1beta1.Coin constant_fee = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""];
|
||||
}
|
||||
|
|
|
@ -52,20 +52,16 @@ message ValidatorHistoricalRewards {
|
|||
// period for a validator kept as a running counter and incremented
|
||||
// each block as long as the validator's tokens remain constant.
|
||||
message ValidatorCurrentRewards {
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
uint64 period = 2;
|
||||
}
|
||||
|
||||
// ValidatorAccumulatedCommission represents accumulated commission
|
||||
// for a validator kept as a running counter, can be withdrawn at any time.
|
||||
message ValidatorAccumulatedCommission {
|
||||
repeated cosmos.base.v1beta1.DecCoin commission = 1 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin commission = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
|
||||
|
@ -84,10 +80,7 @@ message ValidatorOutstandingRewards {
|
|||
// for delegations which are withdrawn after a slash has occurred.
|
||||
message ValidatorSlashEvent {
|
||||
uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""];
|
||||
string fraction = 2 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages.
|
||||
|
@ -115,10 +108,8 @@ message CommunityPoolSpendProposal {
|
|||
string title = 1;
|
||||
string description = 2;
|
||||
bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// DelegatorStartingInfo represents the starting info for a delegator reward period.
|
||||
|
@ -135,8 +126,7 @@ message DelegatorStartingInfo {
|
|||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
uint64 height = 3
|
||||
[(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"];
|
||||
uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"];
|
||||
}
|
||||
|
||||
// DelegationDelegatorReward represents the properties
|
||||
|
@ -147,10 +137,8 @@ message DelegationDelegatorReward {
|
|||
(gogoproto.moretags) = "yaml:\"validator_address\""
|
||||
];
|
||||
|
||||
repeated cosmos.base.v1beta1.DecCoin reward = 2 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin reward = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit
|
||||
|
|
|
@ -49,10 +49,8 @@ message ValidatorAccumulatedCommissionRecord {
|
|||
];
|
||||
|
||||
// accumulated is the accumulated commission of a validator.
|
||||
ValidatorAccumulatedCommission accumulated = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"accumulated\""
|
||||
];
|
||||
ValidatorAccumulatedCommission accumulated = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""];
|
||||
}
|
||||
|
||||
// ValidatorHistoricalRewardsRecord is used for import / export via genesis json.
|
||||
|
@ -67,10 +65,7 @@ message ValidatorHistoricalRewardsRecord {
|
|||
uint64 period = 2;
|
||||
|
||||
// rewards defines the historical rewards of a validator.
|
||||
ValidatorHistoricalRewards rewards = 3[
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"rewards\""
|
||||
];
|
||||
ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
|
||||
}
|
||||
|
||||
// ValidatorCurrentRewardsRecord is used for import / export via genesis json.
|
||||
|
@ -82,10 +77,7 @@ message ValidatorCurrentRewardsRecord {
|
|||
];
|
||||
|
||||
// rewards defines the current rewards of a validator.
|
||||
ValidatorCurrentRewards rewards = 2[
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"rewards\""
|
||||
];
|
||||
ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
|
||||
}
|
||||
|
||||
// DelegatorStartingInfoRecord used for import / export via genesis json.
|
||||
|
@ -103,10 +95,8 @@ message DelegatorStartingInfoRecord {
|
|||
];
|
||||
|
||||
// starting_info defines the starting info of a delegator.
|
||||
DelegatorStartingInfo starting_info = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"starting_info\""
|
||||
];
|
||||
DelegatorStartingInfo starting_info = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""];
|
||||
}
|
||||
|
||||
// ValidatorSlashEventRecord is used for import / export via genesis json.
|
||||
|
@ -121,31 +111,20 @@ message ValidatorSlashEventRecord {
|
|||
// period is the period of the slash event.
|
||||
uint64 period = 3;
|
||||
// event describes the slash event.
|
||||
ValidatorSlashEvent event = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"event\""
|
||||
];
|
||||
ValidatorSlashEvent event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""];
|
||||
}
|
||||
|
||||
// GenesisState defines the distribution module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"params\""
|
||||
];
|
||||
Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""];
|
||||
|
||||
// fee_pool defines the fee pool at genesis.
|
||||
FeePool fee_pool = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"fee_pool\""
|
||||
];
|
||||
FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""];
|
||||
|
||||
// fee_pool defines the delegator withdraw infos at genesis.
|
||||
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""
|
||||
];
|
||||
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""];
|
||||
|
||||
// fee_pool defines the previous proposer at genesis.
|
||||
bytes previous_proposer = 4 [
|
||||
|
@ -154,38 +133,26 @@ message GenesisState {
|
|||
];
|
||||
|
||||
// fee_pool defines the outstanding rewards of all validators at genesis.
|
||||
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"outstanding_rewards\""
|
||||
];
|
||||
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""];
|
||||
|
||||
// fee_pool defines the accumulated commisions of all validators at genesis.
|
||||
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""
|
||||
];
|
||||
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""];
|
||||
|
||||
// fee_pool defines the historical rewards of all validators at genesis.
|
||||
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"validator_historical_rewards\""
|
||||
];
|
||||
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""];
|
||||
|
||||
// fee_pool defines the current rewards of all validators at genesis.
|
||||
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"validator_current_rewards\""
|
||||
];
|
||||
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""];
|
||||
|
||||
// fee_pool defines the delegator starting infos at genesis.
|
||||
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"delegator_starting_infos\""
|
||||
];
|
||||
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""];
|
||||
|
||||
// fee_pool defines the validator slash events at genesis.
|
||||
repeated ValidatorSlashEventRecord validator_slash_events = 10 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"validator_slash_events\""
|
||||
];
|
||||
repeated ValidatorSlashEventRecord validator_slash_events = 10
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""];
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ service Query {
|
|||
}
|
||||
|
||||
// ValidatorOutstandingRewards queries rewards of a validator address.
|
||||
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) returns (QueryValidatorOutstandingRewardsResponse) {
|
||||
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest)
|
||||
returns (QueryValidatorOutstandingRewardsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards";
|
||||
}
|
||||
|
||||
|
@ -33,7 +34,8 @@ service Query {
|
|||
|
||||
// DelegationRewards queries the total rewards accrued by a delegation.
|
||||
rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}";
|
||||
option (google.api.http).get =
|
||||
"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}";
|
||||
}
|
||||
|
||||
// DelegationTotalRewards queries the total rewards accrued by a each validator.
|
||||
|
@ -121,10 +123,8 @@ message QueryDelegationRewardsRequest {
|
|||
// QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method.
|
||||
message QueryDelegationRewardsResponse {
|
||||
// rewards defines the rewards accrued by a delegation.
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
|
||||
}
|
||||
|
||||
// QueryDelegationTotalRewardsRequest is the request type for the Query/DelegationTotalRewards RPC method.
|
||||
|
@ -138,10 +138,8 @@ message QueryDelegationTotalRewardsResponse {
|
|||
// rewards defines all the rewards accrued by a delegator.
|
||||
repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false];
|
||||
// total defines the sum of all the rewards.
|
||||
repeated cosmos.base.v1beta1.DecCoin total = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin total = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsRequest is the request type for the Query/DelegatorValidators RPC method.
|
||||
|
@ -174,8 +172,6 @@ message QueryCommunityPoolRequest {}
|
|||
// QueryCommunityPoolResponse is the response type for the Query/CommunityPool 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
|
||||
];
|
||||
repeated cosmos.base.v1beta1.DecCoin pool = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -44,9 +44,7 @@ message MsgWithdrawValidatorCommission {
|
|||
// MsgFundCommunityPool allows an account to directly
|
||||
// fund the community pool.
|
||||
message MsgFundCommunityPool {
|
||||
repeated cosmos.base.v1beta1.Coin amount = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
|
@ -10,37 +10,17 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
|
|||
// GenesisState defines the gov module's genesis state.
|
||||
message GenesisState {
|
||||
// starting_proposal_id is the ID of the starting proposal.
|
||||
uint64 starting_proposal_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"starting_proposal_id\""
|
||||
];
|
||||
uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""];
|
||||
// deposits defines all the deposits present at genesis.
|
||||
repeated Deposit deposits = 2 [
|
||||
(gogoproto.castrepeated) = "Deposits",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false];
|
||||
// votes defines all the votes present at genesis.
|
||||
repeated Vote votes = 3 [
|
||||
(gogoproto.castrepeated) = "Votes",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false];
|
||||
// proposals defines all the proposals present at genesis.
|
||||
repeated Proposal proposals = 4 [
|
||||
(gogoproto.castrepeated) = "Proposals",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false];
|
||||
// params defines all the paramaters of related to deposit.
|
||||
DepositParams deposit_params = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"deposit_params\""
|
||||
];
|
||||
DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""];
|
||||
// params defines all the paramaters of related to voting.
|
||||
VotingParams voting_params = 6 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"voting_params\""
|
||||
];
|
||||
VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""];
|
||||
// params defines all the paramaters of related to tally.
|
||||
TallyParams tally_params = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"tally_params\""
|
||||
];
|
||||
TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""];
|
||||
}
|
||||
|
|
|
@ -54,10 +54,7 @@ message Deposit {
|
|||
message Proposal {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.jsontag) = "id",
|
||||
(gogoproto.moretags) = "yaml:\"id\""
|
||||
];
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""];
|
||||
google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"];
|
||||
ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""];
|
||||
TallyResult final_tally_result = 4
|
||||
|
|
|
@ -30,10 +30,7 @@ message MsgSubmitProposal {
|
|||
message MsgVote {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.jsontag) = "proposal_id",
|
||||
(gogoproto.moretags) = "yaml:\"proposal_id\""
|
||||
];
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
VoteOption option = 3;
|
||||
}
|
||||
|
@ -42,10 +39,7 @@ message MsgVote {
|
|||
message MsgDeposit {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.jsontag) = "proposal_id",
|
||||
(gogoproto.moretags) = "yaml:\"proposal_id\""
|
||||
];
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
|
|
@ -9,12 +9,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
|
|||
// GenesisState defines the mint module's genesis state.
|
||||
message GenesisState {
|
||||
// minter is a space for holding current inflation information.
|
||||
Minter minter = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Minter minter = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 2 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -49,5 +49,6 @@ message QueryAnnualProvisionsRequest { }
|
|||
// QueryAnnualProvisionsResponse is the response type for the 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];
|
||||
bytes annual_provisions = 1
|
||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -9,23 +9,17 @@ import "cosmos/slashing/v1beta1/slashing.proto";
|
|||
// GenesisState defines the slashing module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of related to deposit.
|
||||
Params params = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// signing_infos represents a map between validator addresses and their
|
||||
// signing infos.
|
||||
repeated SigningInfo signing_infos = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"signing_infos\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated SigningInfo signing_infos = 2
|
||||
[(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false];
|
||||
|
||||
// signing_infos represents a map between validator addresses and their
|
||||
// missed blocks.
|
||||
repeated ValidatorMissedBlocks missed_blocks = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"missed_blocks\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated ValidatorMissedBlocks missed_blocks = 3
|
||||
[(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SigningInfo stores validator signing info of corresponding address.
|
||||
|
@ -33,10 +27,8 @@ message SigningInfo {
|
|||
// address is the validator address.
|
||||
string address = 1;
|
||||
// validator_signing_info represents the signing info of this validator.
|
||||
ValidatorSigningInfo validator_signing_info = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"validator_signing_info\""
|
||||
];
|
||||
ValidatorSigningInfo validator_signing_info = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""];
|
||||
}
|
||||
|
||||
// ValidatorMissedBlocks contains array of missed blocks of corresponding address.
|
||||
|
@ -44,10 +36,8 @@ message ValidatorMissedBlocks {
|
|||
// address is the validator address.
|
||||
string address = 1;
|
||||
// missed_blocks is an array of missed blocks by the validator.
|
||||
repeated MissedBlock missed_blocks = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"missed_blocks\""
|
||||
];
|
||||
repeated MissedBlock missed_blocks = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""];
|
||||
}
|
||||
|
||||
// MissedBlock contains height and missed status as boolean.
|
||||
|
|
|
@ -9,9 +9,7 @@ import "cosmos/staking/v1beta1/staking.proto";
|
|||
// GenesisState defines the staking module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of related to deposit.
|
||||
Params params = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// last_total_power tracks the total amounts of bonded tokens recorded during
|
||||
// the previous end block.
|
||||
|
@ -23,31 +21,21 @@ message GenesisState {
|
|||
|
||||
// last_validator_powers is a special index that provides a historical list
|
||||
// of the last-block's bonded validators.
|
||||
repeated LastValidatorPower last_validator_powers = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"last_validator_powers\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated LastValidatorPower last_validator_powers = 3
|
||||
[(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false];
|
||||
|
||||
// delegations defines the validator set at genesis.
|
||||
repeated Validator validators = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Validator validators = 4 [(gogoproto.nullable) = false];
|
||||
|
||||
// delegations defines the delegations active at genesis.
|
||||
repeated Delegation delegations = 5 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Delegation delegations = 5 [(gogoproto.nullable) = false];
|
||||
|
||||
// unbonding_delegations defines the unbonding delegations active at genesis.
|
||||
repeated UnbondingDelegation unbonding_delegations = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"unbonding_delegations\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated UnbondingDelegation unbonding_delegations = 6
|
||||
[(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false];
|
||||
|
||||
// redelegations defines the redelegations active at genesis.
|
||||
repeated Redelegation redelegations = 7 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false];
|
||||
|
||||
bool exported = 8;
|
||||
}
|
||||
|
@ -55,9 +43,7 @@ message GenesisState {
|
|||
// LastValidatorPower required for validator set update logic.
|
||||
message LastValidatorPower {
|
||||
// address is the address of the validator.
|
||||
bytes address = 1 [
|
||||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"
|
||||
];
|
||||
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
|
||||
|
||||
// power defines the power of the validator.
|
||||
int64 power = 2;
|
||||
|
|
|
@ -26,7 +26,8 @@ service Query {
|
|||
}
|
||||
|
||||
// ValidatorUnbondingDelegations queries unbonding delegations of a validator.
|
||||
rpc ValidatorUnbondingDelegations (QueryValidatorUnbondingDelegationsRequest) returns (QueryValidatorUnbondingDelegationsResponse) {
|
||||
rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest)
|
||||
returns (QueryValidatorUnbondingDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations";
|
||||
}
|
||||
|
||||
|
@ -37,7 +38,8 @@ service Query {
|
|||
|
||||
// UnbondingDelegation queries unbonding info for given validator delegator pair.
|
||||
rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation";
|
||||
option (google.api.http).get =
|
||||
"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation";
|
||||
}
|
||||
|
||||
// DelegatorDelegations queries all delegations of a given delegator address.
|
||||
|
@ -46,7 +48,8 @@ service Query {
|
|||
}
|
||||
|
||||
// DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address.
|
||||
rpc DelegatorUnbondingDelegations (QueryDelegatorUnbondingDelegationsRequest) returns (QueryDelegatorUnbondingDelegationsResponse) {
|
||||
rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest)
|
||||
returns (QueryDelegatorUnbondingDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations";
|
||||
}
|
||||
|
||||
|
@ -122,7 +125,8 @@ message QueryValidatorDelegationsRequest {
|
|||
|
||||
// QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method
|
||||
message QueryValidatorDelegationsResponse {
|
||||
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];
|
||||
repeated DelegationResponse delegation_responses = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
|
|
|
@ -23,10 +23,7 @@ message CommissionRates {
|
|||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string rate = 1 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
string max_rate = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"max_rate\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
|
@ -45,11 +42,8 @@ message Commission {
|
|||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||
google.protobuf.Timestamp update_time = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.moretags) = "yaml:\"update_time\""
|
||||
];
|
||||
google.protobuf.Timestamp update_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""];
|
||||
}
|
||||
|
||||
// Description defines a validator description.
|
||||
|
@ -84,10 +78,7 @@ message Validator {
|
|||
string consensus_pubkey = 2 [(gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
|
||||
bool jailed = 3;
|
||||
int32 status = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.BondStatus"];
|
||||
string tokens = 5 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string delegator_shares = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"delegator_shares\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
|
@ -95,11 +86,8 @@ message Validator {
|
|||
];
|
||||
Description description = 7 [(gogoproto.nullable) = false];
|
||||
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
|
||||
google.protobuf.Timestamp unbonding_time = 9 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.moretags) = "yaml:\"unbonding_time\""
|
||||
];
|
||||
google.protobuf.Timestamp unbonding_time = 9
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||
Commission commission = 10 [(gogoproto.nullable) = false];
|
||||
string min_self_delegation = 11 [
|
||||
(gogoproto.moretags) = "yaml:\"min_self_delegation\"",
|
||||
|
@ -180,10 +168,7 @@ message Delegation {
|
|||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
|
||||
(gogoproto.moretags) = "yaml:\"validator_address\""
|
||||
];
|
||||
string shares = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// UnbondingDelegation stores all of a single delegator's unbonding bonds
|
||||
|
@ -200,8 +185,7 @@ message UnbondingDelegation {
|
|||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
|
||||
(gogoproto.moretags) = "yaml:\"validator_address\""
|
||||
];
|
||||
repeated UnbondingDelegationEntry entries = 3
|
||||
[(gogoproto.nullable) = false]; // unbonding delegation entries
|
||||
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
|
||||
}
|
||||
|
||||
// UnbondingDelegationEntry defines an unbonding object with relevant metadata.
|
||||
|
@ -210,20 +194,14 @@ message UnbondingDelegationEntry {
|
|||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||
google.protobuf.Timestamp completion_time = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.moretags) = "yaml:\"completion_time\""
|
||||
];
|
||||
google.protobuf.Timestamp completion_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||
string initial_balance = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||
];
|
||||
string balance = 4 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// RedelegationEntry defines a redelegation object with relevant metadata.
|
||||
|
@ -232,20 +210,15 @@ message RedelegationEntry {
|
|||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||
google.protobuf.Timestamp completion_time = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.moretags) = "yaml:\"completion_time\""
|
||||
];
|
||||
google.protobuf.Timestamp completion_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||
string initial_balance = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||
];
|
||||
string shares_dst = 4 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string shares_dst = 4
|
||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Redelegation contains the list of a particular delegator's redelegating bonds
|
||||
|
@ -274,11 +247,8 @@ message Params {
|
|||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
google.protobuf.Duration unbonding_time = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "yaml:\"unbonding_time\""
|
||||
];
|
||||
google.protobuf.Duration unbonding_time = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||
uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""];
|
||||
uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""];
|
||||
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
|
||||
|
@ -303,10 +273,7 @@ message RedelegationEntryResponse {
|
|||
option (gogoproto.equal) = true;
|
||||
|
||||
RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false];
|
||||
string balance = 4 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// RedelegationResponse is equivalent to a Redelegation except that its entries
|
||||
|
@ -323,11 +290,15 @@ message RedelegationResponse {
|
|||
message Pool {
|
||||
option (gogoproto.description) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
string not_bonded_tokens = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
string not_bonded_tokens = 1 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.jsontag) = "not_bonded_tokens",
|
||||
(gogoproto.nullable) = false];
|
||||
string bonded_tokens = 2 [(gogoproto.jsontag) = "bonded_tokens",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string bonded_tokens = 2 [
|
||||
(gogoproto.jsontag) = "bonded_tokens",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"bonded_tokens\""];
|
||||
(gogoproto.moretags) = "yaml:\"bonded_tokens\""
|
||||
];
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import "cosmos/staking/v1beta1/staking.proto";
|
|||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||
|
||||
|
||||
// MsgCreateValidator defines an SDK message for creating a new validator.
|
||||
message MsgCreateValidator {
|
||||
option (gogoproto.equal) = true;
|
||||
|
|
|
@ -57,10 +57,8 @@ message Period {
|
|||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 length = 1;
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// PeriodicVestingAccount implements the VestingAccount interface. It
|
||||
|
@ -71,6 +69,5 @@ message PeriodicVestingAccount {
|
|||
|
||||
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
|
||||
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
|
||||
repeated Period vesting_periods = 3
|
||||
[(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
|
||||
repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ message MsgChannelOpenInit {
|
|||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
Channel channel = 3 [(gogoproto.nullable) = false];
|
||||
bytes signer = 4
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel
|
||||
|
@ -22,15 +21,10 @@ message MsgChannelOpenTry {
|
|||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
Channel channel = 3 [(gogoproto.nullable) = false];
|
||||
string counterparty_version = 4
|
||||
[(gogoproto.moretags) = "yaml:\"counterparty_version\""];
|
||||
string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
|
||||
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
|
||||
ibc.client.Height proof_height = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 7
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 7 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge
|
||||
|
@ -38,15 +32,10 @@ message MsgChannelOpenTry {
|
|||
message MsgChannelOpenAck {
|
||||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
string counterparty_version = 3
|
||||
[(gogoproto.moretags) = "yaml:\"counterparty_version\""];
|
||||
string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
|
||||
bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""];
|
||||
ibc.client.Height proof_height = 5 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 6
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to
|
||||
|
@ -55,12 +44,8 @@ message MsgChannelOpenConfirm {
|
|||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 5
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain A
|
||||
|
@ -68,8 +53,7 @@ message MsgChannelOpenConfirm {
|
|||
message MsgChannelCloseInit {
|
||||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
bytes signer = 3
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B
|
||||
|
@ -78,38 +62,25 @@ message MsgChannelCloseConfirm {
|
|||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""];
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 5
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgRecvPacket receives incoming IBC packet
|
||||
message MsgRecvPacket {
|
||||
Packet packet = 1 [(gogoproto.nullable) = false];
|
||||
bytes proof = 2;
|
||||
ibc.client.Height proof_height = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 4
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgTimeout receives timed-out packet
|
||||
message MsgTimeout {
|
||||
Packet packet = 1 [(gogoproto.nullable) = false];
|
||||
bytes proof = 2;
|
||||
ibc.client.Height proof_height = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
uint64 next_sequence_recv = 4
|
||||
[(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
|
||||
bytes signer = 5
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
|
||||
bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgTimeoutOnClose timed-out packet upon counterparty channel closure.
|
||||
|
@ -117,14 +88,9 @@ message MsgTimeoutOnClose {
|
|||
Packet packet = 1 [(gogoproto.nullable) = false];
|
||||
bytes proof = 2;
|
||||
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
uint64 next_sequence_recv = 5
|
||||
[(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
|
||||
bytes signer = 6
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
|
||||
bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgAcknowledgement receives incoming IBC acknowledgement
|
||||
|
@ -132,12 +98,8 @@ message MsgAcknowledgement {
|
|||
Packet packet = 1 [(gogoproto.nullable) = false];
|
||||
bytes acknowledgement = 2;
|
||||
bytes proof = 3;
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 5
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// Channel defines pipeline for exactly-once packet delivery between specific
|
||||
|
@ -154,8 +116,7 @@ message Channel {
|
|||
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
|
||||
// list of connection identifiers, in order, along which packets sent on this
|
||||
// channel will travel
|
||||
repeated string connection_hops = 4
|
||||
[(gogoproto.moretags) = "yaml:\"connection_hops\""];
|
||||
repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""];
|
||||
// opaque channel version, which is agreed upon during the handshake
|
||||
string version = 5;
|
||||
}
|
||||
|
@ -173,8 +134,7 @@ message IdentifiedChannel {
|
|||
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
|
||||
// list of connection identifiers, in order, along which packets sent on this
|
||||
// channel will travel
|
||||
repeated string connection_hops = 4
|
||||
[(gogoproto.moretags) = "yaml:\"connection_hops\""];
|
||||
repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""];
|
||||
// opaque channel version, which is agreed upon during the handshake
|
||||
string version = 5;
|
||||
// port identifier
|
||||
|
@ -189,8 +149,7 @@ enum State {
|
|||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// Default State
|
||||
STATE_UNINITIALIZED_UNSPECIFIED = 0
|
||||
[(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
|
||||
STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
|
||||
// A channel has just started the opening handshake.
|
||||
STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"];
|
||||
// A channel has acknowledged the handshake step on the counterparty chain.
|
||||
|
@ -239,21 +198,15 @@ message Packet {
|
|||
// identifies the channel end on the sending chain.
|
||||
string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""];
|
||||
// identifies the port on the receiving chain.
|
||||
string destination_port = 4
|
||||
[(gogoproto.moretags) = "yaml:\"destination_port\""];
|
||||
string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""];
|
||||
// identifies the channel end on the receiving chain.
|
||||
string destination_channel = 5
|
||||
[(gogoproto.moretags) = "yaml:\"destination_channel\""];
|
||||
string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""];
|
||||
// actual opaque bytes transferred directly to the application module
|
||||
bytes data = 6;
|
||||
// block height after which the packet times out
|
||||
ibc.client.Height timeout_height = 7 [
|
||||
(gogoproto.moretags) = "yaml:\"timeout_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height timeout_height = 7 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
|
||||
// block timestamp (in nanoseconds) after which the packet times out
|
||||
uint64 timeout_timestamp = 8
|
||||
[(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
|
||||
uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
|
||||
}
|
||||
|
||||
// PacketAckCommitment defines the genesis type necessary to retrieve and store
|
||||
|
|
|
@ -8,37 +8,22 @@ import "ibc/channel/channel.proto";
|
|||
|
||||
// GenesisState defines the ibc channel submodule's genesis state.
|
||||
message GenesisState {
|
||||
repeated IdentifiedChannel channels = 1 [
|
||||
(gogoproto.casttype) = "IdentifiedChannel",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated PacketAckCommitment acknowledgements = 2 [
|
||||
(gogoproto.casttype) = "PacketAckCommitment",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false];
|
||||
repeated PacketAckCommitment acknowledgements = 2
|
||||
[(gogoproto.casttype) = "PacketAckCommitment", (gogoproto.nullable) = false];
|
||||
repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false];
|
||||
repeated PacketSequence send_sequences = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"send_sequences\""
|
||||
];
|
||||
repeated PacketSequence recv_sequences = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"recv_sequences\""
|
||||
];
|
||||
repeated PacketSequence ack_sequences = 6 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"ack_sequences\""
|
||||
];
|
||||
repeated PacketSequence send_sequences = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""];
|
||||
repeated PacketSequence recv_sequences = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""];
|
||||
repeated PacketSequence ack_sequences = 6
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""];
|
||||
}
|
||||
|
||||
// PacketSequence defines the genesis type necessary to retrieve and store
|
||||
// next send and receive sequences.
|
||||
message PacketSequence {
|
||||
string port_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"port_id\""
|
||||
];
|
||||
string channel_id = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"channel_id\""
|
||||
];
|
||||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
|
||||
uint64 sequence = 3;
|
||||
}
|
||||
|
|
|
@ -24,54 +24,49 @@ service Query {
|
|||
|
||||
// ConnectionChannels queries all the channels associated with a connection
|
||||
// end.
|
||||
rpc ConnectionChannels(QueryConnectionChannelsRequest)
|
||||
returns (QueryConnectionChannelsResponse) {
|
||||
rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels";
|
||||
}
|
||||
|
||||
// ChannelClientState queries for the client state for the channel associated
|
||||
// with the provided channel identifiers.
|
||||
rpc ChannelClientState(QueryChannelClientStateRequest)
|
||||
returns (QueryChannelClientStateResponse) {
|
||||
rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state";
|
||||
}
|
||||
|
||||
// ChannelConsensusState queries for the consensus state for the channel
|
||||
// associated with the provided channel identifiers.
|
||||
rpc ChannelConsensusState(QueryChannelConsensusStateRequest)
|
||||
returns (QueryChannelConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}";
|
||||
rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/"
|
||||
"{epoch_number}/height/{epoch_height}";
|
||||
}
|
||||
|
||||
// PacketCommitment queries a stored packet commitment hash.
|
||||
rpc PacketCommitment(QueryPacketCommitmentRequest)
|
||||
returns (QueryPacketCommitmentResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}";
|
||||
rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) {
|
||||
option (google.api.http).get =
|
||||
"/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}";
|
||||
}
|
||||
|
||||
// PacketCommitments returns the all the packet commitments hashes associated
|
||||
// with a channel.
|
||||
rpc PacketCommitments(QueryPacketCommitmentsRequest)
|
||||
returns (QueryPacketCommitmentsResponse) {
|
||||
rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments";
|
||||
}
|
||||
|
||||
// PacketAcknowledgement queries a stored packet acknowledgement hash.
|
||||
rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest)
|
||||
returns (QueryPacketAcknowledgementResponse) {
|
||||
rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}";
|
||||
}
|
||||
|
||||
// UnrelayedPackets returns all the unrelayed IBC packets associated with a
|
||||
// channel and sequences.
|
||||
rpc UnrelayedPackets(QueryUnrelayedPacketsRequest)
|
||||
returns (QueryUnrelayedPacketsResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets";
|
||||
rpc UnrelayedPackets(QueryUnrelayedPacketsRequest) returns (QueryUnrelayedPacketsResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/"
|
||||
"{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets";
|
||||
}
|
||||
|
||||
// NextSequenceReceive returns the next receive sequence for a given channel.
|
||||
rpc NextSequenceReceive(QueryNextSequenceReceiveRequest)
|
||||
returns (QueryNextSequenceReceiveResponse) {
|
||||
rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence";
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +90,7 @@ message QueryChannelResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryChannelsRequest is the request type for the Query/Channels RPC method
|
||||
|
@ -113,9 +106,7 @@ message QueryChannelsResponse {
|
|||
// pagination response
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
// query block height
|
||||
ibc.client.Height height = 3 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryConnectionChannelsRequest is the request type for the
|
||||
|
@ -135,9 +126,7 @@ message QueryConnectionChannelsResponse {
|
|||
// pagination response
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
// query block height
|
||||
ibc.client.Height height = 3 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryChannelClientStateRequest is the request type for the Query/ClientState
|
||||
|
@ -159,9 +148,7 @@ message QueryChannelClientStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryChannelConsensusStateRequest is the request type for the
|
||||
|
@ -189,9 +176,7 @@ message QueryChannelConsensusStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 4;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 5 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryPacketCommitmentRequest is the request type for the
|
||||
|
@ -216,9 +201,7 @@ message QueryPacketCommitmentResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryPacketCommitmentsRequest is the request type for the
|
||||
|
@ -239,9 +222,7 @@ message QueryPacketCommitmentsResponse {
|
|||
// pagination response
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
// query block height
|
||||
ibc.client.Height height = 3 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryPacketAcknowledgementRequest is the request type for the
|
||||
|
@ -266,9 +247,7 @@ message QueryPacketAcknowledgementResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryUnrelayedPacketsRequest is the request type for the
|
||||
|
@ -291,9 +270,7 @@ message QueryUnrelayedPacketsResponse {
|
|||
// list of unrelayed packet sequences
|
||||
repeated uint64 sequences = 1;
|
||||
// query block height
|
||||
ibc.client.Height height = 2 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height height = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryNextSequenceReceiveRequest is the request type for the
|
||||
|
@ -315,8 +292,5 @@ message QueryNextSequenceReceiveResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ message IdentifiedClientState {
|
|||
// client identifier
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// client state
|
||||
google.protobuf.Any client_state = 2
|
||||
[(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
}
|
||||
|
||||
// ClientConsensusStates defines all the stored consensus states for a given
|
||||
|
@ -22,8 +21,7 @@ message ClientConsensusStates {
|
|||
// client identifier
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// consensus states associated with the client
|
||||
repeated google.protobuf.Any consensus_states = 2
|
||||
[(gogoproto.moretags) = "yaml:\"consensus_states\""];
|
||||
repeated google.protobuf.Any consensus_states = 2 [(gogoproto.moretags) = "yaml:\"consensus_states\""];
|
||||
}
|
||||
|
||||
// ClientUpdateProposal is a governance proposal. If it passes, the client is
|
||||
|
@ -46,15 +44,12 @@ message MsgCreateClient {
|
|||
// client unique identifier
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// light client state
|
||||
google.protobuf.Any client_state = 2
|
||||
[(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
// consensus state associated with the client that corresponds to a given
|
||||
// height.
|
||||
google.protobuf.Any consensus_state = 3
|
||||
[(gogoproto.moretags) = "yaml:\"consensus_state\""];
|
||||
google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
|
||||
// signer address
|
||||
bytes signer = 4
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgUpdateClient defines an sdk.Msg to update a IBC client state using
|
||||
|
@ -65,8 +60,7 @@ message MsgUpdateClient {
|
|||
// header to update the light client
|
||||
google.protobuf.Any header = 2;
|
||||
// signer address
|
||||
bytes signer = 3
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for
|
||||
|
@ -77,8 +71,7 @@ message MsgSubmitMisbehaviour {
|
|||
// misbehaviour used for freezing the light client
|
||||
google.protobuf.Any misbehaviour = 2;
|
||||
// signer address
|
||||
bytes signer = 3
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// Height is a monotonically increasing data type
|
||||
|
|
|
@ -23,7 +23,8 @@ service Query {
|
|||
|
||||
// ConsensusState queries a consensus state associated with a client state at a given height.
|
||||
rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}";
|
||||
option (google.api.http).get =
|
||||
"/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}";
|
||||
}
|
||||
|
||||
// ConsensusStates queries all the consensus state associated with a given client.
|
||||
|
@ -50,9 +51,7 @@ message QueryClientStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryClientStatesRequest is the request type for the Query/ClientStates RPC
|
||||
|
@ -93,9 +92,7 @@ message QueryConsensusStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,10 +25,7 @@ message MerklePrefix {
|
|||
message MerklePath {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
KeyPath key_path = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"key_path\""
|
||||
];
|
||||
KeyPath key_path = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"key_path\""];
|
||||
}
|
||||
|
||||
// MerkleProof is a wrapper type that contains a merkle proof.
|
||||
|
|
|
@ -11,36 +11,21 @@ import "ibc/client/client.proto";
|
|||
// MsgConnectionOpenInit defines the msg sent by an account on Chain A to
|
||||
// initialize a connection with Chain B.
|
||||
message MsgConnectionOpenInit {
|
||||
string client_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string connection_id = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
|
||||
bytes signer = 4
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a
|
||||
// connection on Chain B.
|
||||
message MsgConnectionOpenTry {
|
||||
string client_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string connection_id = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
google.protobuf.Any client_state = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"client_state\""
|
||||
];
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
Counterparty counterparty = 4 [(gogoproto.nullable) = false];
|
||||
repeated string counterparty_versions = 5
|
||||
[(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
|
||||
ibc.client.Height proof_height = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated string counterparty_versions = 5 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
|
||||
ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
// proof of the initialization the connection on Chain A: `UNITIALIZED ->
|
||||
// INIT`
|
||||
bytes proof_init = 7 [(gogoproto.moretags) = "yaml:\"proof_init\""];
|
||||
|
@ -48,28 +33,18 @@ message MsgConnectionOpenTry {
|
|||
bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""];
|
||||
// proof of client consensus state
|
||||
bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
|
||||
ibc.client.Height consensus_height = 10 [
|
||||
(gogoproto.moretags) = "yaml:\"consensus_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 11
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height consensus_height = 10
|
||||
[(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 11 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to
|
||||
// acknowledge the change of connection state to TRYOPEN on Chain B.
|
||||
message MsgConnectionOpenAck {
|
||||
string connection_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
string version = 2;
|
||||
google.protobuf.Any client_state = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"client_state\""
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
// proof of the initialization the connection on Chain B: `UNITIALIZED ->
|
||||
// TRYOPEN`
|
||||
bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""];
|
||||
|
@ -77,28 +52,19 @@ message MsgConnectionOpenAck {
|
|||
bytes proof_client = 6 [(gogoproto.moretags) = "yaml:\"proof_client\""];
|
||||
// proof of client consensus state
|
||||
bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
|
||||
ibc.client.Height consensus_height = 8 [
|
||||
(gogoproto.moretags) = "yaml:\"consensus_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 9
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height consensus_height = 8
|
||||
[(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 9 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to
|
||||
// acknowledge the change of connection state to OPEN on Chain A.
|
||||
message MsgConnectionOpenConfirm {
|
||||
string connection_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
// proof for the change of the connection state on Chain A: `INIT -> OPEN`
|
||||
bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
|
||||
ibc.client.Height proof_height = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"proof_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes signer = 4
|
||||
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
|
||||
bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// ICS03 - Connection Data Structures as defined in
|
||||
|
@ -110,9 +76,7 @@ message MsgConnectionOpenConfirm {
|
|||
message ConnectionEnd {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
// client associated with this connection.
|
||||
string client_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// IBC version which can be utilised to determine encodings or protocols for
|
||||
// channels or packets utilising this connection
|
||||
repeated string versions = 2;
|
||||
|
@ -127,12 +91,9 @@ message ConnectionEnd {
|
|||
message IdentifiedConnection {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
// connection identifier.
|
||||
string id = 1
|
||||
[(gogoproto.moretags) = "yaml:\"id\""];
|
||||
string id = 1 [(gogoproto.moretags) = "yaml:\"id\""];
|
||||
// client associated with this connection.
|
||||
string client_id = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// IBC version which can be utilised to determine encodings or protocols for
|
||||
// channels or packets utilising this connection
|
||||
repeated string versions = 3;
|
||||
|
@ -148,8 +109,7 @@ enum State {
|
|||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// Default State
|
||||
STATE_UNINITIALIZED_UNSPECIFIED = 0
|
||||
[(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
|
||||
STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
|
||||
// A connection end has just started the opening handshake.
|
||||
STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"];
|
||||
// A connection end has acknowledged the handshake step on the counterparty
|
||||
|
@ -165,14 +125,10 @@ message Counterparty {
|
|||
|
||||
// identifies the client on the counterparty chain associated with a given
|
||||
// connection.
|
||||
string client_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// identifies the connection end on the counterparty chain associated with a
|
||||
// given connection.
|
||||
string connection_id = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
// commitment merkle prefix of the counterparty chain
|
||||
ibc.commitment.MerklePrefix prefix = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
@ -186,9 +142,7 @@ message ClientPaths {
|
|||
// ConnectionPaths define all the connection paths for a given client state.
|
||||
message ConnectionPaths {
|
||||
// client state unique identifier
|
||||
string client_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"client_id\""
|
||||
];
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
// list of connection paths
|
||||
repeated string paths = 2;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types";
|
|||
import "gogoproto/gogo.proto";
|
||||
import "ibc/connection/connection.proto";
|
||||
|
||||
|
||||
// GenesisState defines the ibc connection submodule's genesis state.
|
||||
message GenesisState {
|
||||
repeated IdentifiedConnection connections = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated ConnectionPaths client_connection_paths = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"client_connection_paths\""
|
||||
];
|
||||
repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false];
|
||||
repeated ConnectionPaths client_connection_paths = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""];
|
||||
}
|
||||
|
|
|
@ -24,23 +24,21 @@ service Query {
|
|||
|
||||
// ClientConnections queries the connection paths associated with a client
|
||||
// state.
|
||||
rpc ClientConnections(QueryClientConnectionsRequest)
|
||||
returns (QueryClientConnectionsResponse) {
|
||||
rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) {
|
||||
option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}";
|
||||
}
|
||||
|
||||
// ConnectionClientState queries the client state associated with the
|
||||
// connection.
|
||||
rpc ConnectionClientState(QueryConnectionClientStateRequest)
|
||||
returns (QueryConnectionClientStateResponse) {
|
||||
rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) {
|
||||
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state";
|
||||
}
|
||||
|
||||
// ConnectionConsensusState queries the consensus state associated with the
|
||||
// connection.
|
||||
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest)
|
||||
returns (QueryConnectionConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}";
|
||||
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/"
|
||||
"{epoch_number}/height/{epoch_height}";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,9 +60,7 @@ message QueryConnectionResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryConnectionsRequest is the request type for the Query/Connections RPC
|
||||
|
@ -81,9 +77,7 @@ message QueryConnectionsResponse {
|
|||
// pagination response
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
// query block height
|
||||
ibc.client.Height height = 3 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryClientConnectionsRequest is the request type for the
|
||||
|
@ -103,18 +97,14 @@ message QueryClientConnectionsResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was generated
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryConnectionClientStateRequest is the request type for the
|
||||
// Query/ConnectionClientState RPC method
|
||||
message QueryConnectionClientStateRequest {
|
||||
// connection identifier
|
||||
string connection_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
}
|
||||
|
||||
// QueryConnectionClientStateResponse is the response type for the
|
||||
|
@ -127,18 +117,14 @@ message QueryConnectionClientStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 3;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 4 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryConnectionConsensusStateRequest is the request type for the
|
||||
// Query/ConnectionConsensusState RPC method
|
||||
message QueryConnectionConsensusStateRequest {
|
||||
// connection identifier
|
||||
string connection_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"connection_id\""
|
||||
];
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
uint64 epoch_number = 2;
|
||||
uint64 epoch_height = 3;
|
||||
}
|
||||
|
@ -155,7 +141,5 @@ message QueryConnectionConsensusStateResponse {
|
|||
// merkle proof path
|
||||
string proof_path = 4;
|
||||
// height at which the proof was retrieved
|
||||
ibc.client.Height proof_height = 5 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -18,17 +18,11 @@ message ClientState {
|
|||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string chain_id = 1;
|
||||
Fraction trust_level = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"trust_level\""
|
||||
];
|
||||
Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""];
|
||||
// duration of the period since the LastestTimestamp during which the
|
||||
// submitted headers are valid for upgrade
|
||||
google.protobuf.Duration trusting_period = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "yaml:\"trusting_period\""
|
||||
];
|
||||
google.protobuf.Duration trusting_period = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""];
|
||||
// duration of the staking unbonding period
|
||||
google.protobuf.Duration unbonding_period = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
|
@ -36,33 +30,21 @@ message ClientState {
|
|||
(gogoproto.moretags) = "yaml:\"unbonding_period\""
|
||||
];
|
||||
// defines how much new (untrusted) header's Time can drift into the future.
|
||||
google.protobuf.Duration max_clock_drift = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "yaml:\"max_clock_drift\""
|
||||
];
|
||||
google.protobuf.Duration max_clock_drift = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""];
|
||||
// Block height when the client was frozen due to a misbehaviour
|
||||
ibc.client.Height frozen_height = 6 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"frozen_height\""
|
||||
];
|
||||
ibc.client.Height frozen_height = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""];
|
||||
// Latest height the client was updated to
|
||||
ibc.client.Height latest_height = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"latest_height\""
|
||||
];
|
||||
ibc.client.Height latest_height = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""];
|
||||
// Proof specifications used in verifying counterparty state
|
||||
repeated ics23.ProofSpec proof_specs = 8
|
||||
[(gogoproto.moretags) = "yaml:\"proof_specs\""];
|
||||
repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""];
|
||||
|
||||
// This flag, when set to true, will allow governance to recover a client
|
||||
// which has expired
|
||||
bool allow_update_after_expiry = 9
|
||||
[(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
|
||||
bool allow_update_after_expiry = 9 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
|
||||
// This flag, when set to true, will allow governance to unfreeze a client
|
||||
// whose chain has experienced a misbehaviour event
|
||||
bool allow_update_after_misbehaviour = 10
|
||||
[(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
|
||||
bool allow_update_after_misbehaviour = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
|
||||
}
|
||||
|
||||
// ConsensusState defines the consensus state from Tendermint.
|
||||
|
@ -71,15 +53,13 @@ message ConsensusState {
|
|||
|
||||
// timestamp that corresponds to the block height in which the ConsensusState
|
||||
// was stored.
|
||||
google.protobuf.Timestamp timestamp = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
// commitment root (i.e app hash)
|
||||
ibc.commitment.MerkleRoot root = 2 [(gogoproto.nullable) = false];
|
||||
// height at which the consensus state was stored.
|
||||
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
|
||||
bytes next_validators_hash = 4 [
|
||||
(gogoproto.casttype) =
|
||||
"github.com/tendermint/tendermint/libs/bytes.HexBytes",
|
||||
(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes",
|
||||
(gogoproto.moretags) = "yaml:\"next_validators_hash\""
|
||||
];
|
||||
}
|
||||
|
@ -92,14 +72,8 @@ message Misbehaviour {
|
|||
|
||||
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
||||
string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""];
|
||||
Header header_1 = 3 [
|
||||
(gogoproto.customname) = "Header1",
|
||||
(gogoproto.moretags) = "yaml:\"header_1\""
|
||||
];
|
||||
Header header_2 = 4 [
|
||||
(gogoproto.customname) = "Header2",
|
||||
(gogoproto.moretags) = "yaml:\"header_2\""
|
||||
];
|
||||
Header header_1 = 3 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""];
|
||||
Header header_2 = 4 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""];
|
||||
}
|
||||
|
||||
// Header defines the Tendermint client consensus Header.
|
||||
|
@ -115,19 +89,12 @@ message Misbehaviour {
|
|||
// hash to TrustedConsensusState.NextValidatorsHash since that is the last
|
||||
// trusted validator set at the TrustedHeight.
|
||||
message Header {
|
||||
.tendermint.types.SignedHeader signed_header = 1 [
|
||||
(gogoproto.embed) = true,
|
||||
(gogoproto.moretags) = "yaml:\"signed_header\""
|
||||
];
|
||||
.tendermint.types.SignedHeader signed_header = 1
|
||||
[(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""];
|
||||
|
||||
.tendermint.types.ValidatorSet validator_set = 2
|
||||
[(gogoproto.moretags) = "yaml:\"validator_set\""];
|
||||
ibc.client.Height trusted_height = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"trusted_height\""
|
||||
];
|
||||
.tendermint.types.ValidatorSet trusted_validators = 4
|
||||
[(gogoproto.moretags) = "yaml:\"trusted_validators\""];
|
||||
.tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""];
|
||||
ibc.client.Height trusted_height = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""];
|
||||
.tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""];
|
||||
}
|
||||
|
||||
// Fraction defines the protobuf message type for tmmath.Fraction
|
||||
|
@ -135,4 +102,3 @@ message Fraction {
|
|||
int64 numerator = 1;
|
||||
int64 denominator = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,15 +8,11 @@ import "ibc/transfer/transfer.proto";
|
|||
|
||||
// GenesisState defines the ibc-transfer genesis state
|
||||
message GenesisState {
|
||||
string port_id = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"port_id\""
|
||||
];
|
||||
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
|
||||
repeated DenomTrace denom_traces = 2 [
|
||||
(gogoproto.castrepeated) = "Traces",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"denom_traces\""
|
||||
];
|
||||
Params params = 3 [
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Params params = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
|
|
@ -47,10 +47,7 @@ message QueryDenomTracesRequest {
|
|||
// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method.
|
||||
message QueryDenomTracesResponse {
|
||||
// denom_traces returns all denominations trace information.
|
||||
repeated DenomTrace denom_traces = 1 [
|
||||
(gogoproto.castrepeated) = "Traces",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
|
|
@ -23,10 +23,7 @@ message MsgTransfer {
|
|||
string receiver = 5;
|
||||
// Timeout height relative to the current block height.
|
||||
// The timeout is disabled when set to 0.
|
||||
ibc.client.Height timeout_height = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"timeout_height\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
ibc.client.Height timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
|
||||
// Timeout timestamp (in nanoseconds) relative to the current block timestamp.
|
||||
// The timeout is disabled when set to 0.
|
||||
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
|
||||
|
@ -70,11 +67,7 @@ message DenomTrace {
|
|||
// true and then set the bank module's SendEnabled parameter for the denomination to false.
|
||||
message Params {
|
||||
// send_enabled enables or disables all cross-chain token transfers from this chain.
|
||||
bool send_enabled = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"send_enabled\""
|
||||
];
|
||||
bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""];
|
||||
// receive_enabled enables or disables all cross-chain token transfers to this chain.
|
||||
bool receive_enabled = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"receive_enabled\""
|
||||
];
|
||||
bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""];
|
||||
}
|
||||
|
|
|
@ -11,18 +11,12 @@ import "ibc/channel/genesis.proto";
|
|||
// GenesisState defines the ibc module's genesis state.
|
||||
message GenesisState {
|
||||
// ICS002 - Clients genesis state
|
||||
ibc.client.GenesisState client_genesis = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"client_genesis\""
|
||||
];
|
||||
ibc.client.GenesisState client_genesis = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""];
|
||||
// ICS003 - Connections genesis state
|
||||
ibc.connection.GenesisState connection_genesis = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"connection_genesis\""
|
||||
];
|
||||
ibc.connection.GenesisState connection_genesis = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""];
|
||||
// ICS004 - Channel genesis state
|
||||
ibc.channel.GenesisState channel_genesis = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"channel_genesis\""
|
||||
];
|
||||
ibc.channel.GenesisState channel_genesis = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue