-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fix queries #2209
feat: fix queries #2209
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||
syntax = "proto3"; | ||||||||||||
Check failure on line 1 in proto/interchain_security/ccv/provider/v1/query.proto GitHub Actions / break-check
|
||||||||||||
package interchain_security.ccv.provider.v1; | ||||||||||||
|
||||||||||||
option go_package = "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"; | ||||||||||||
|
@@ -13,7 +13,7 @@ | |||||||||||
import "cosmos_proto/cosmos.proto"; | ||||||||||||
import "cosmos/staking/v1beta1/staking.proto"; | ||||||||||||
|
||||||||||||
service Query { | ||||||||||||
// ConsumerGenesis queries the genesis state needed to start a consumer chain | ||||||||||||
// whose proposal has been accepted | ||||||||||||
rpc QueryConsumerGenesis(QueryConsumerGenesisRequest) | ||||||||||||
|
@@ -64,11 +64,11 @@ | |||||||||||
"/interchain_security/ccv/provider/registered_consumer_reward_denoms"; | ||||||||||||
} | ||||||||||||
|
||||||||||||
// QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address | ||||||||||||
// QueryAllPairsValConsAddrByConsumer returns a list of pair valconsensus address | ||||||||||||
// between provider and consumer chain | ||||||||||||
rpc QueryAllPairsValConAddrByConsumerChainID ( | ||||||||||||
QueryAllPairsValConAddrByConsumerChainIDRequest) | ||||||||||||
returns (QueryAllPairsValConAddrByConsumerChainIDResponse) { | ||||||||||||
rpc QueryAllPairsValConsAddrByConsumer ( | ||||||||||||
QueryAllPairsValConsAddrByConsumerRequest) | ||||||||||||
returns (QueryAllPairsValConsAddrByConsumerResponse) { | ||||||||||||
option (google.api.http) = { | ||||||||||||
get: "/interchain_security/ccv/provider/address_pairs/{consumer_id}"; | ||||||||||||
}; | ||||||||||||
|
@@ -110,7 +110,7 @@ | |||||||||||
}; | ||||||||||||
} | ||||||||||||
|
||||||||||||
// QueryConsumerValidators returns the latest set consumer-validator set for a given chainID | ||||||||||||
// QueryConsumerValidators returns the latest set consumer-validator set for a given consumer ID | ||||||||||||
// Note that this does not necessarily mean that the consumer chain is using this validator set at this exact moment | ||||||||||||
// because a VSCPacket could be delayed to be delivered on the consumer chain. | ||||||||||||
rpc QueryConsumerValidators(QueryConsumerValidatorsRequest) | ||||||||||||
|
@@ -168,7 +168,6 @@ | |||||||||||
message Chain { | ||||||||||||
string chain_id = 1; | ||||||||||||
string client_id = 2; | ||||||||||||
// If chain with `chainID` is a Top-N chain, i.e., enforces at least one validator to validate chain `chainID` | ||||||||||||
uint32 top_N = 3; | ||||||||||||
// If the chain is a Top-N chain, this is the minimum power required to be in the top N. | ||||||||||||
// Otherwise, this is -1. | ||||||||||||
|
@@ -184,13 +183,14 @@ | |||||||||||
// Corresponds to a list of provider consensus addresses of validators that CANNOT validate the consumer chain. | ||||||||||||
repeated string denylist = 8; | ||||||||||||
// The phase the consumer chain (Registered=0|Initialized=1|FailedToLaunch=2|Launched=3|Stopped=4) | ||||||||||||
ConsumerPhase phase = 9; | ||||||||||||
string phase = 9; | ||||||||||||
Comment on lines
185
to
+186
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you pls update the comment above (outdated enum values) and I assume we return
Suggested change
|
||||||||||||
// The metadata of the consumer chain | ||||||||||||
ConsumerMetadata metadata = 10 [(gogoproto.nullable) = false ]; | ||||||||||||
// Corresponds to the minimal amount of (provider chain) stake required to validate on the consumer chain. | ||||||||||||
uint64 min_stake = 11; | ||||||||||||
// Corresponds to whether inactive validators are allowed to validate the consumer chain. | ||||||||||||
bool allow_inactive_vals = 12; | ||||||||||||
string consumer_id = 13; | ||||||||||||
} | ||||||||||||
|
||||||||||||
message QueryValidatorConsumerAddrRequest { | ||||||||||||
|
@@ -241,12 +241,12 @@ | |||||||||||
repeated string denoms = 1; | ||||||||||||
} | ||||||||||||
|
||||||||||||
message QueryAllPairsValConAddrByConsumerChainIDRequest { | ||||||||||||
message QueryAllPairsValConsAddrByConsumerRequest { | ||||||||||||
// The id of the consumer chain | ||||||||||||
string consumer_id = 1; | ||||||||||||
} | ||||||||||||
|
||||||||||||
message QueryAllPairsValConAddrByConsumerChainIDResponse { | ||||||||||||
message QueryAllPairsValConsAddrByConsumerResponse { | ||||||||||||
repeated PairValConAddrProviderAndConsumer pair_val_con_addr = 1; | ||||||||||||
} | ||||||||||||
|
||||||||||||
|
@@ -332,7 +332,7 @@ | |||||||||||
} | ||||||||||||
|
||||||||||||
message QueryConsumerChainsValidatorHasToValidateResponse { | ||||||||||||
repeated string consumer_chain_ids = 1; | ||||||||||||
repeated string consumer_ids = 1; | ||||||||||||
Check failure on line 335 in proto/interchain_security/ccv/provider/v1/query.proto GitHub Actions / break-check
|
||||||||||||
} | ||||||||||||
|
||||||||||||
message QueryValidatorConsumerCommissionRateRequest { | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why not use
QueryAllPairsValConsAddrByConsumerID
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's too long of a name for something that doesn't matter. Nobody really uses this name. The relevant parts are the REST endpoint or CLI command.