Skip to content
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

x/staking: gRPC query Service #6490

Merged
merged 67 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
976f106
Add types for staking grpc
sahith-narahari Jun 23, 2020
2efeb8a
Update module.go
sahith-narahari Jun 23, 2020
68ae41c
Update staking query types
sahith-narahari Jun 23, 2020
ae4fb1b
Add grpc query methods
sahith-narahari Jun 23, 2020
ec69007
Add delegation response to proto
sahith-narahari Jun 23, 2020
777f8f9
Add queriers for delegations
sahith-narahari Jun 23, 2020
bc3775f
Add queriers for unbonding
sahith-narahari Jun 24, 2020
dcfcd97
Add queriers for redelegations
sahith-narahari Jun 24, 2020
e4738c7
Add cases for redelegations
sahith-narahari Jun 24, 2020
cc0dbeb
Add test for grpc validators
sahith-narahari Jun 25, 2020
21e081a
Update staking types to proto
sahith-narahari Jun 25, 2020
dd36921
Update staking query proto
sahith-narahari Jun 25, 2020
f0de012
Add tests for grpc
sahith-narahari Jun 25, 2020
a485a85
Add tests for grpc pool, parameters
sahith-narahari Jun 25, 2020
50e49be
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jun 25, 2020
54b50a5
Fix lint issues
sahith-narahari Jun 25, 2020
6026f36
Add grpc redelegation tests
sahith-narahari Jun 25, 2020
8533b65
Add more tests
sahith-narahari Jun 26, 2020
44f2cab
Add docs for query proto
sahith-narahari Jun 26, 2020
8d0f67f
Add docs for query types
sahith-narahari Jun 26, 2020
f6cb68b
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jun 26, 2020
042e685
Modify redel querier
sahith-narahari Jun 30, 2020
e883d4e
Add debugging statements
sahith-narahari Jun 30, 2020
9b41cc3
Revert debugging
sahith-narahari Jul 1, 2020
c814819
Fix proto lint errors
sahith-narahari Jul 1, 2020
0dd64f3
Add wrapper for keeper
sahith-narahari Jul 1, 2020
b980454
Embed keeper in querier
sahith-narahari Jul 2, 2020
905837d
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jul 2, 2020
5cbed40
Add more tests
sahith-narahari Jul 2, 2020
e03b180
Add tests for validator unbondings
sahith-narahari Jul 2, 2020
e6a3f45
Add redel tests
sahith-narahari Jul 2, 2020
9992408
fix queryRedelegationsFromSrcValidator
aaronc Jul 2, 2020
d06d2c8
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jul 3, 2020
232b0dd
Fix Redelegation tests
sahith-narahari Jul 3, 2020
a4d379b
update godoc
sahith-narahari Jul 3, 2020
7bf68e6
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jul 6, 2020
13877d9
Update args
sahith-narahari Jul 6, 2020
f897224
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/592…
sahith-narahari Jul 6, 2020
2cbe510
Update tests with suite
sahith-narahari Jul 7, 2020
2f398ff
Fix lint
sahith-narahari Jul 7, 2020
c954248
Remove redundant types
sahith-narahari Jul 7, 2020
3f29df7
Refactor tests
sahith-narahari Jul 7, 2020
c35fd9c
fix test
sahith-narahari Jul 7, 2020
31813f3
refactor query proto
sahith-narahari Jul 7, 2020
986709c
Fix tests
sahith-narahari Jul 7, 2020
0f011e9
address review comments
sahith-narahari Jul 7, 2020
a8a9d5a
lint staking proto
sahith-narahari Jul 7, 2020
98fad04
add godoc
sahith-narahari Jul 7, 2020
6ff557c
Update tests to table driven tests
sahith-narahari Jul 7, 2020
1161d83
add debugging
sahith-narahari Jul 7, 2020
11bb336
Fix grpc tests
sahith-narahari Jul 7, 2020
723cc99
address comments
sahith-narahari Jul 8, 2020
fa700d5
address whitespace suggestions
sahith-narahari Jul 8, 2020
db0c866
Add more tests
sahith-narahari Jul 8, 2020
d120576
add tests for invalid redels
sahith-narahari Jul 9, 2020
eb4b532
Merge branch 'master' into sahith/5921-staking-grpc
fedekunze Jul 9, 2020
e90c2ef
update error messages
sahith-narahari Jul 9, 2020
a4d7466
address review suggestions
sahith-narahari Jul 9, 2020
a8c8398
Merge branch 'sahith/5921-staking-grpc' of github.com:cosmos/cosmos-s…
sahith-narahari Jul 9, 2020
3bbba34
Merge branch 'master' into sahith/5921-staking-grpc
sahith-narahari Jul 9, 2020
dfaf174
Merge branch 'master' into sahith/5921-staking-grpc
sahith-narahari Jul 10, 2020
05202a2
add tests
sahith-narahari Jul 12, 2020
365d339
Merge branch 'master' into sahith/5921-staking-grpc
sahith-narahari Jul 12, 2020
0c7afad
move suite to keeper_test
sahith-narahari Jul 13, 2020
867c012
Merge branch 'sahith/5921-staking-grpc' of github.com:cosmos/cosmos-s…
sahith-narahari Jul 13, 2020
0866a2e
Merge branch 'master' into sahith/5921-staking-grpc
fedekunze Jul 13, 2020
0013d05
Merge branch 'master' into sahith/5921-staking-grpc
mergify[bot] Jul 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 228 additions & 0 deletions proto/cosmos/staking/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
syntax = "proto3";
package cosmos.staking;

import "cosmos/query/pagination.proto";
import "gogoproto/gogo.proto";
import "cosmos/staking/staking.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";

// Query defines the gRPC querier service
service Query {
// Validators queries all validators that match the given status
rpc Validators (QueryValidatorsRequest) returns (QueryValidatorsResponse) {}

// Validator queries validator info for given validator addr
rpc Validator (QueryValidatorRequest) returns (QueryValidatorResponse) {}

// ValidatorDelegations queries delegate info for given validator
rpc ValidatorDelegations (QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) {}

// ValidatorUnbondingDelegations queries unbonding delegations of a validator
rpc ValidatorUnbondingDelegations (QueryValidatorUnbondingDelegationsRequest) returns (QueryValidatorUnbondingDelegationsResponse) {}

// Delegation queries delegate info for given validator delegator pair
rpc Delegation (QueryDelegationRequest) returns (QueryDelegationResponse) {}

// UnbondingDelegation queries unbonding info for give validator delegator pair
rpc UnbondingDelegation (QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {}

// DelegatorDelegations queries all delegations of a give delegator address
rpc DelegatorDelegations (QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) {}

// DelegatorUnbondingDelegations queries all unbonding delegations of a give delegator address
rpc DelegatorUnbondingDelegations (QueryDelegatorUnbondingDelegationsRequest) returns (QueryDelegatorUnbondingDelegationsResponse) {}

// Redelegations queries redelegations of given address
rpc Redelegations (QueryRedelegationsRequest) returns (QueryRedelegationsResponse) {}

// DelegatorValidators queries all validator info for given delegator address
rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {}

// DelegatorValidator queries validator info for given delegator validator pair
rpc DelegatorValidator (QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) {}

// HistoricalInfo queries the historical info for given height
rpc HistoricalInfo (QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) {}

// Pool queries the pool info
rpc Pool (QueryPoolRequest) returns (QueryPoolResponse) {}

// Parameters queries the staking parameters
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {}
}

// QueryValidatorsRequest is request type for Query/Validators RPC method
message QueryValidatorsRequest{
string status = 1;

cosmos.query.PageRequest req = 2;
}

// QueryValidatorsResponse is response type for the Query/Validators RPC method
message QueryValidatorsResponse {
repeated cosmos.staking.Validator validators = 1 [(gogoproto.nullable) = false];
sahith-narahari marked this conversation as resolved.
Show resolved Hide resolved

cosmos.query.PageResponse res = 2;
}

// QueryValidatorRequest is response type for the Query/Validator RPC method
message QueryValidatorRequest {
bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
}

// QueryValidatorResponse is response type for the Query/Validator RPC method
message QueryValidatorResponse {
Validator validator = 1 [(gogoproto.nullable) = false];
sahith-narahari marked this conversation as resolved.
Show resolved Hide resolved
}

// QueryValidatorDelegationsRequest is request type for the Query/ValidatorDelegations RPC method
message QueryValidatorDelegationsRequest {
bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];

cosmos.query.PageRequest req = 2;
}

// QueryValidatorDelegationsRequest is response type for the Query/ValidatorDelegations RPC method
message QueryValidatorDelegationsResponse {
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];

cosmos.query.PageResponse res = 2;
}

// QueryValidatorUnbondingDelegationsRequest is required type for the Query/ValidatorUnbondingDelegations RPC method
message QueryValidatorUnbondingDelegationsRequest {
bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];

cosmos.query.PageRequest req = 2;
}

// QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method
message QueryValidatorUnbondingDelegationsResponse {
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}

// QueryDelegationRequest is request type for the Query/Delegation RPC method
message QueryDelegationRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
}

// QueryDelegationResponse is response type for the Query/Delegation RPC method
message QueryDelegationResponse {
DelegationResponse delegation_response = 1 [(gogoproto.casttype) = "DelegationResponse"];
}

// QueryUnbondingDelegationRequest is request type for the Query/UnbondingDelegation RPC method
message QueryUnbondingDelegationRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
}

// QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method
message QueryUnbondingDelegationResponse {
UnbondingDelegation unbond =1 [(gogoproto.nullable) = false];
}

// QueryDelegatorDelegationsRequest is request type for the Query/DelegatorDelegations RPC method
message QueryDelegatorDelegationsRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

cosmos.query.PageRequest req = 2;
}

// QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method
message QueryDelegatorDelegationsResponse {
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}

// QueryDelegatorUnbondingDelegationsRequest is request type for the Query/DelegatorUnbondingDelegations RPC method
message QueryDelegatorUnbondingDelegationsRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

cosmos.query.PageRequest req = 2;
}
// QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method
message QueryDelegatorUnbondingDelegationsResponse {
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}

// QueryRedelegationsRequest is request type for the Query/Redelegations RPC method
message QueryRedelegationsRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

bytes src_validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];

bytes dst_validator_addr = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];

cosmos.query.PageRequest req = 4;
}

// QueryRedelegationsResponse is response type for the Query/Redelegations RPC method
message QueryRedelegationsResponse {
repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}

// QueryDelegatorValidatorsRequest is request type for the Query/DelegatorValidators RPC method
message QueryDelegatorValidatorsRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

cosmos.query.PageRequest req = 2;
}

// QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method
message QueryDelegatorValidatorsResponse {
repeated Validator validators = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}

// QueryDelegatorValidatorRequest is request type for the Query/DelegatorValidator RPC method
message QueryDelegatorValidatorRequest {
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];

bytes validator_addr = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
}

// QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method
message QueryDelegatorValidatorResponse {
Validator validator = 1 [(gogoproto.nullable) = false];
}

// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC method
message QueryHistoricalInfoRequest {
int64 height = 1;
}

// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC method
message QueryHistoricalInfoResponse {
HistoricalInfo hist = 1;
}

// QueryPoolRequest is request type for the Query/Pool RPC method
message QueryPoolRequest { }

// QueryPoolResponse is response type for the Query/Pool RPC method
message QueryPoolResponse {
Pool pool = 1 [(gogoproto.nullable) = false];
}

// QueryParametersRequest is request type for the Query/Parameters RPC method
message QueryParamsRequest { }

// QueryParametersResponse is response type for the Query/Parameters RPC method
message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];

cosmos.query.PageResponse res = 2;
}
48 changes: 48 additions & 0 deletions proto/cosmos/staking/staking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,51 @@ message Params {
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""];
}

// DelegationResponse is equivalent to Delegation except that it contains a balance
// in addition to shares which is more suitable for client responses.
message DelegationResponse {
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;

Delegation delegation = 1 [(gogoproto.nullable) = false];

cosmos.Coin balance = 2 [(gogoproto.nullable) = false];
}

// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
// contains a balance in addition to shares which is more suitable for client
// responses.
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
];
}

// RedelegationResponse is equivalent to a Redelegation except that its entries
// contain a balance in addition to shares which is more suitable for client
// responses.
message RedelegationResponse {
option (gogoproto.equal) = true;

Redelegation redelegation = 1 [(gogoproto.nullable) = false];
repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false];
}

// Pool - tracking bonded and not-bonded token supply of the bond denomination
message Pool {
option (gogoproto.description) = true;
option (gogoproto.equal) = true;
string not_bonded_tokens = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.jsontag) = "not_bonded_tokens",
sahith-narahari marked this conversation as resolved.
Show resolved Hide resolved
(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\""];
}

2 changes: 1 addition & 1 deletion x/slashing/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func signingInfoHandlerFn(clientCtx client.Context) http.HandlerFunc {
return
}

params := types.NewQuerySigningInfoParams(sdk.ConsAddress(pk.Address()))
params := types.QuerySigningInfoRequest{ConsAddress: sdk.ConsAddress(pk.Address())}
sahith-narahari marked this conversation as resolved.
Show resolved Hide resolved

bz, err := clientCtx.JSONMarshaler.MarshalJSON(params)
if rest.CheckBadRequestError(w, err) {
Expand Down
2 changes: 1 addition & 1 deletion x/slashing/keeper/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func queryParams(ctx sdk.Context, k Keeper) ([]byte, error) {
}

func querySigningInfo(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) {
var params types.QuerySigningInfoParams
var params types.QuerySigningInfoRequest

err := types.ModuleCdc.UnmarshalJSON(req.Data, &params)
if err != nil {
Expand Down
15 changes: 0 additions & 15 deletions x/slashing/types/querier.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// DONTCOVER

// Query endpoints supported by the slashing querier
Expand All @@ -13,17 +9,6 @@ const (
QuerySigningInfos = "signingInfos"
)

// QuerySigningInfoParams defines the params for the following queries:
// - 'custom/slashing/signingInfo'
type QuerySigningInfoParams struct {
ConsAddress sdk.ConsAddress
}

// NewQuerySigningInfoParams creates a new QuerySigningInfoParams instance
func NewQuerySigningInfoParams(consAddr sdk.ConsAddress) QuerySigningInfoParams {
return QuerySigningInfoParams{consAddr}
}

// QuerySigningInfosParams defines the params for the following queries:
// - 'custom/slashing/signingInfos'
type QuerySigningInfosParams struct {
Expand Down
2 changes: 1 addition & 1 deletion x/staking/client/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestCLICreateValidator(t *testing.T) {
// Query delegations to the validator
validatorDelegations := testutil.QueryStakingDelegationsTo(f, barVal)
require.Len(t, validatorDelegations, 1)
require.NotZero(t, validatorDelegations[0].Shares)
require.NotNil(t, validatorDelegations[0].Shares)

// Edit validator
// params to be changed in edit validator (NOTE: a validator can only change its commission once per day)
Expand Down
6 changes: 3 additions & 3 deletions x/staking/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ $ %s query staking delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosm
return err
}

bz, err := cdc.MarshalJSON(types.NewQueryBondsParams(delAddr, valAddr))
bz, err := cdc.MarshalJSON(types.QueryDelegatorValidatorRequest{DelegatorAddr: delAddr, ValidatorAddr: valAddr})
sahith-narahari marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return err
}
Expand Down Expand Up @@ -414,7 +414,7 @@ $ %s query staking unbonding-delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld7
return err
}

bz, err := cdc.MarshalJSON(types.NewQueryBondsParams(delAddr, valAddr))
bz, err := cdc.MarshalJSON(types.QueryDelegatorValidatorRequest{DelegatorAddr: delAddr, ValidatorAddr: valAddr})
if err != nil {
return err
}
Expand Down Expand Up @@ -619,7 +619,7 @@ $ %s query staking historical-info 5
return fmt.Errorf("height argument provided must be a non-negative-integer: %v", err)
}

bz, err := cdc.MarshalJSON(types.QueryHistoricalInfoParams{Height: height})
bz, err := cdc.MarshalJSON(types.QueryHistoricalInfoRequest{Height: height})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion x/staking/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func historicalInfoHandlerFn(clientCtx client.Context) http.HandlerFunc {
return
}

params := types.NewQueryHistoricalInfoParams(height)
params := types.QueryHistoricalInfoRequest{Height: height}

bz, err := clientCtx.JSONMarshaler.MarshalJSON(params)
if rest.CheckInternalServerError(w, err) {
Expand Down
2 changes: 1 addition & 1 deletion x/staking/client/rest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func queryBonds(clientCtx client.Context, endpoint string) http.HandlerFunc {
return
}

params := types.NewQueryBondsParams(delegatorAddr, validatorAddr)
params := types.QueryDelegatorValidatorRequest{DelegatorAddr: delegatorAddr, ValidatorAddr: validatorAddr}

bz, err := clientCtx.JSONMarshaler.MarshalJSON(params)
if rest.CheckBadRequestError(w, err) {
Expand Down
Loading