refactor: decouple comet from modules (#21382)

This commit is contained in:
son trinh 2024-09-11 16:18:13 +07:00 committed by GitHub
parent 04cec5b5e5
commit 1d4ecd5e37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 1702 additions and 5169 deletions

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,6 @@ const (
Query_Redelegations_FullMethodName = "/cosmos.staking.v1beta1.Query/Redelegations"
Query_DelegatorValidators_FullMethodName = "/cosmos.staking.v1beta1.Query/DelegatorValidators"
Query_DelegatorValidator_FullMethodName = "/cosmos.staking.v1beta1.Query/DelegatorValidator"
Query_HistoricalInfo_FullMethodName = "/cosmos.staking.v1beta1.Query/HistoricalInfo"
Query_Pool_FullMethodName = "/cosmos.staking.v1beta1.Query/Pool"
Query_Params_FullMethodName = "/cosmos.staking.v1beta1.Query/Params"
)
@ -88,9 +87,6 @@ type QueryClient interface {
// DelegatorValidator queries validator info for given delegator validator
// pair.
DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error)
// Deprecated: Do not use.
// HistoricalInfo queries the historical info for given height.
HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error)
// Pool queries the pool info.
Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
// Parameters queries the staking parameters.
@ -215,17 +211,6 @@ func (c *queryClient) DelegatorValidator(ctx context.Context, in *QueryDelegator
return out, nil
}
// Deprecated: Do not use.
func (c *queryClient) HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryHistoricalInfoResponse)
err := c.cc.Invoke(ctx, Query_HistoricalInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryPoolResponse)
@ -299,9 +284,6 @@ type QueryServer interface {
// DelegatorValidator queries validator info for given delegator validator
// pair.
DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error)
// Deprecated: Do not use.
// HistoricalInfo queries the historical info for given height.
HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error)
// Pool queries the pool info.
Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error)
// Parameters queries the staking parameters.
@ -349,9 +331,6 @@ func (UnimplementedQueryServer) DelegatorValidators(context.Context, *QueryDeleg
func (UnimplementedQueryServer) DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidator not implemented")
}
func (UnimplementedQueryServer) HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HistoricalInfo not implemented")
}
func (UnimplementedQueryServer) Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented")
}
@ -577,24 +556,6 @@ func _Query_DelegatorValidator_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Query_HistoricalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryHistoricalInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).HistoricalInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_HistoricalInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).HistoricalInfo(ctx, req.(*QueryHistoricalInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryPoolRequest)
if err := dec(in); err != nil {
@ -682,10 +643,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
MethodName: "DelegatorValidator",
Handler: _Query_DelegatorValidator_Handler,
},
{
MethodName: "HistoricalInfo",
Handler: _Query_HistoricalInfo_Handler,
},
{
MethodName: "Pool",
Handler: _Query_Pool_Handler,

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@ import (
"fmt"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmttypes "github.com/cometbft/cometbft/types"
"cosmossdk.io/collections"
storetypes "cosmossdk.io/store/types"
@ -12,6 +13,7 @@ import (
"cosmossdk.io/x/staking"
stakingtypes "cosmossdk.io/x/staking/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@ -41,9 +43,25 @@ func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAd
}
validators, err := staking.WriteValidators(ctx, app.StakingKeeper)
cmtValidators := []cmttypes.GenesisValidator{}
for _, val := range validators {
cmtPk, err := cryptocodec.ToCmtPubKeyInterface(val.PubKey)
if err != nil {
return servertypes.ExportedApp{}, err
}
cmtVal := cmttypes.GenesisValidator{
Address: val.Address.Bytes(),
PubKey: cmtPk,
Power: val.Power,
Name: val.Name,
}
cmtValidators = append(cmtValidators, cmtVal)
}
return servertypes.ExportedApp{
AppState: appState,
Validators: validators,
Validators: cmtValidators,
Height: height,
ConsensusParams: app.BaseApp.GetConsensusParams(ctx),
}, err

View File

@ -715,16 +715,6 @@ func TestGRPCQueryPoolParameters(t *testing.T) {
assert.DeepEqual(t, params, resp.Params)
}
func TestGRPCQueryHistoricalInfo(t *testing.T) {
t.Parallel()
f := initFixture(t)
qr := f.app.QueryHelper()
queryClient := types.NewQueryClient(qr)
_, err := queryClient.HistoricalInfo(gocontext.Background(), &types.QueryHistoricalInfoRequest{}) // nolint:staticcheck // SA1019: deprecated endpoint
assert.ErrorContains(t, err, "this endpoint has been deprecated and removed in 0.52")
}
func TestGRPCQueryRedelegations(t *testing.T) {
t.Parallel()
f := initFixture(t)

View File

@ -27,9 +27,9 @@ func NewMockCometRPC(respQuery abci.QueryResponse) MockCometRPC {
return MockCometRPC{responseQuery: respQuery}
}
// NewMockCometRPCWithValue returns a mock CometBFT RPC implementation with value only.
// NewMockCometRPCWithResponseQueryValue returns a mock CometBFT RPC implementation with value only.
// It is used for CLI testing.
func NewMockCometRPCWithValue(bz []byte) MockCometRPC {
func NewMockCometRPCWithResponseQueryValue(bz []byte) MockCometRPC {
return MockCometRPC{responseQuery: abci.QueryResponse{
Value: bz,
}}
@ -47,3 +47,80 @@ func (m MockCometRPC) ABCIQueryWithOptions(
) (*coretypes.ResultABCIQuery, error) {
return &coretypes.ResultABCIQuery{Response: m.responseQuery}, nil
}
type FilterTxsFn = func(query string, start, end int) ([][]byte, error)
type MockCometTxSearchRPC struct {
rpcclientmock.Client
txConfig client.TxConfig
txs []cmttypes.Tx
filterTxsFn FilterTxsFn
}
func (m MockCometTxSearchRPC) Txs() []cmttypes.Tx {
return m.txs
}
// accept [][]byte so that module that use this for testing dont have to import comet directly
func (m *MockCometTxSearchRPC) WithTxs(txs [][]byte) {
cmtTxs := make([]cmttypes.Tx, len(txs))
for i, tx := range txs {
cmtTxs[i] = tx
}
m.txs = cmtTxs
}
func (m *MockCometTxSearchRPC) WithTxConfig(cfg client.TxConfig) {
m.txConfig = cfg
}
func (m *MockCometTxSearchRPC) WithFilterTxsFn(fn FilterTxsFn) {
m.filterTxsFn = fn
}
func (MockCometTxSearchRPC) BroadcastTxSync(context.Context, cmttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
return &coretypes.ResultBroadcastTx{Code: 0}, nil
}
func (mock MockCometTxSearchRPC) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) {
if page == nil {
*page = 0
}
if perPage == nil {
*perPage = 0
}
start, end := client.Paginate(len(mock.txs), *page, *perPage, 100)
if start < 0 || end < 0 {
// nil result with nil error crashes utils.QueryTxsByEvents
return &coretypes.ResultTxSearch{}, nil
}
var txs []cmttypes.Tx
if mock.filterTxsFn != nil {
filterTxs, err := mock.filterTxsFn(query, start, end)
if err != nil {
return nil, err
}
cmtTxs := make([]cmttypes.Tx, len(filterTxs))
for i, tx := range filterTxs {
cmtTxs[i] = tx
}
txs = append(txs, cmtTxs...)
} else {
txs = mock.txs[start:end]
}
rst := &coretypes.ResultTxSearch{Txs: make([]*coretypes.ResultTx, len(txs)), TotalCount: len(txs)}
for i := range txs {
rst.Txs[i] = &coretypes.ResultTx{Tx: txs[i]}
}
return rst, nil
}
func (mock MockCometTxSearchRPC) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) {
return &coretypes.ResultBlock{Block: &cmttypes.Block{}}, nil
}

10
types/genesis.go Normal file
View File

@ -0,0 +1,10 @@
package types
import cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
type GenesisValidator struct {
Address ConsAddress
PubKey cryptotypes.PubKey
Power int64
Name string
}

View File

@ -83,7 +83,7 @@ func (s *CLITestSuite) TestTxInitCmd() {
Response: sdk.MsgTypeURL(&types.Empty{})[1:],
},
})
c := clitestutil.NewMockCometRPCWithValue(bz)
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -4,7 +4,6 @@ import (
"context"
"testing"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
@ -117,7 +116,7 @@ func SetupTestSuite(t *testing.T, isCheckTx bool) *AnteTestSuite {
suite.clientCtx = client.Context{}.
WithTxConfig(suite.encCfg.TxConfig).
WithClient(clitestutil.NewMockCometRPC(abci.QueryResponse{}))
WithClient(clitestutil.NewMockCometRPCWithResponseQueryValue(nil))
anteHandler, err := ante.NewAnteHandler(
ante.HandlerOptions{

View File

@ -68,7 +68,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPCWithValue(bz)
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -6,7 +6,6 @@ import (
"io"
"testing"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
sdkmath "cosmossdk.io/math"
@ -44,7 +43,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithAddressCodec(addresscodec.NewBech32Codec("cosmos")).

View File

@ -12,7 +12,7 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0

View File

@ -7,8 +7,6 @@ import (
"testing"
"time"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/suite"
@ -69,7 +67,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain").
@ -79,9 +77,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}

View File

@ -13,7 +13,7 @@ require (
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0
@ -58,7 +58,7 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.14.0 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.3-0.20240829004618-717cba019b33 // indirect
github.com/cosmos/crypto v0.1.2 // indirect

View File

@ -7,8 +7,6 @@ import (
"path/filepath"
"testing"
abci "github.com/cometbft/cometbft/abci/types"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
sdkmath "cosmossdk.io/math"
@ -48,16 +46,14 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain")
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -6,8 +6,6 @@ import (
"io"
"testing"
abci "github.com/cometbft/cometbft/abci/types"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
sdkmath "cosmossdk.io/math"
@ -50,7 +48,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain").
@ -60,9 +58,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -1,15 +1,11 @@
package utils_test
import (
"context"
"fmt"
"strconv"
"strings"
"testing"
"github.com/cometbft/cometbft/rpc/client/mock"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
cmttypes "github.com/cometbft/cometbft/types"
"github.com/stretchr/testify/require"
sdkmath "cosmossdk.io/math"
@ -20,100 +16,73 @@ import (
"github.com/cosmos/cosmos-sdk/client"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
)
type TxSearchMock struct {
txConfig client.TxConfig
mock.Client
txs []cmttypes.Tx
clitestutil.MockCometTxSearchRPC
// use for filter tx with query conditions
msgsSet [][]sdk.Msg
}
func (mock TxSearchMock) TxSearch(ctx context.Context, query string, _ bool, page, perPage *int, _ string) (*coretypes.ResultTxSearch, error) {
if page == nil {
*page = 0
}
if perPage == nil {
*perPage = 0
}
start, end := client.Paginate(len(mock.txs), *page, *perPage, 100)
if start < 0 || end < 0 {
// nil result with nil error crashes utils.QueryTxsByEvents
return &coretypes.ResultTxSearch{}, nil
}
txs, err := mock.filterTxs(query, start, end)
if err != nil {
return nil, err
}
rst := &coretypes.ResultTxSearch{Txs: make([]*coretypes.ResultTx, len(txs)), TotalCount: len(txs)}
for i := range txs {
rst.Txs[i] = &coretypes.ResultTx{Tx: txs[i]}
}
return rst, nil
}
func (mock TxSearchMock) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) {
// any non nil Block needs to be returned. used to get time value
return &coretypes.ResultBlock{Block: &cmttypes.Block{}}, nil
}
// mock applying the query string in TxSearch
func (mock TxSearchMock) filterTxs(query string, start, end int) ([]cmttypes.Tx, error) {
filterTxs := []cmttypes.Tx{}
proposalIdStr, senderAddr := getQueryAttributes(query)
if senderAddr != "" {
proposalId, err := strconv.ParseUint(proposalIdStr, 10, 64)
if err != nil {
return nil, err
}
func filterTxs(mock *TxSearchMock) clitestutil.FilterTxsFn {
return func(query string, start, end int) ([][]byte, error) {
filterTxs := [][]byte{}
proposalIdStr, senderAddr := getQueryAttributes(query)
txs := mock.Txs()
if senderAddr != "" {
proposalId, err := strconv.ParseUint(proposalIdStr, 10, 64)
if err != nil {
return nil, err
}
for i, msgs := range mock.msgsSet {
for _, msg := range msgs {
if voteMsg, ok := msg.(*v1beta1.MsgVote); ok {
if voteMsg.Voter == senderAddr && voteMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, mock.txs[i])
continue
for i, msgs := range mock.msgsSet {
for _, msg := range msgs {
if voteMsg, ok := msg.(*v1beta1.MsgVote); ok {
if voteMsg.Voter == senderAddr && voteMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, txs[i])
continue
}
}
}
if voteMsg, ok := msg.(*v1.MsgVote); ok {
if voteMsg.Voter == senderAddr && voteMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, mock.txs[i])
continue
if voteMsg, ok := msg.(*v1.MsgVote); ok {
if voteMsg.Voter == senderAddr && voteMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, txs[i])
continue
}
}
}
if voteWeightedMsg, ok := msg.(*v1beta1.MsgVoteWeighted); ok {
if voteWeightedMsg.Voter == senderAddr && voteWeightedMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, mock.txs[i])
continue
if voteWeightedMsg, ok := msg.(*v1beta1.MsgVoteWeighted); ok {
if voteWeightedMsg.Voter == senderAddr && voteWeightedMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, txs[i])
continue
}
}
}
if voteWeightedMsg, ok := msg.(*v1.MsgVoteWeighted); ok {
if voteWeightedMsg.Voter == senderAddr && voteWeightedMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, mock.txs[i])
continue
if voteWeightedMsg, ok := msg.(*v1.MsgVoteWeighted); ok {
if voteWeightedMsg.Voter == senderAddr && voteWeightedMsg.ProposalId == proposalId {
filterTxs = append(filterTxs, txs[i])
continue
}
}
}
}
} else {
for _, tx := range txs {
filterTxs = append(filterTxs, tx)
}
}
} else {
filterTxs = append(filterTxs, mock.txs...)
}
if len(filterTxs) < end {
return filterTxs, nil
}
if len(filterTxs) < end {
return filterTxs, nil
}
return filterTxs[start:end], nil
return filterTxs[start:end], nil
}
}
// getQueryAttributes extracts value from query string
@ -227,11 +196,9 @@ func TestGetPaginatedVotes(t *testing.T) {
tc := tc
t.Run(tc.description, func(t *testing.T) {
marshaled := make([]cmttypes.Tx, len(tc.msgs))
cli := TxSearchMock{txs: marshaled, txConfig: encCfg.TxConfig}
marshaled := make([][]byte, len(tc.msgs))
clientCtx := client.Context{}.
WithLegacyAmino(encCfg.Amino).
WithClient(cli).
WithTxConfig(encCfg.TxConfig)
for i := range tc.msgs {
@ -244,6 +211,12 @@ func TestGetPaginatedVotes(t *testing.T) {
marshaled[i] = tx
}
cli := &TxSearchMock{msgsSet: tc.msgs}
cli.WithTxs(marshaled)
cli.WithTxConfig(encCfg.TxConfig)
cli.WithFilterTxsFn(filterTxs(cli))
clientCtx = clientCtx.WithClient(cli)
params := utils.QueryProposalVotesParams{0, tc.page, tc.limit}
votesData, err := utils.QueryVotesByTxQuery(clientCtx, params)
require.NoError(t, err)
@ -328,11 +301,9 @@ func TestGetSingleVote(t *testing.T) {
tc := tc
t.Run(tc.description, func(t *testing.T) {
marshaled := make([]cmttypes.Tx, len(tc.msgs))
cli := TxSearchMock{txs: marshaled, txConfig: encCfg.TxConfig, msgsSet: tc.msgs}
marshaled := make([][]byte, len(tc.msgs))
clientCtx := client.Context{}.
WithLegacyAmino(encCfg.Amino).
WithClient(cli).
WithTxConfig(encCfg.TxConfig).
WithAddressCodec(cdcOpts.GetAddressCodec()).
WithCodec(encCfg.Codec)
@ -347,6 +318,12 @@ func TestGetSingleVote(t *testing.T) {
marshaled[i] = tx
}
cli := &TxSearchMock{msgsSet: tc.msgs}
cli.WithTxs(marshaled)
cli.WithTxConfig(encCfg.TxConfig)
cli.WithFilterTxsFn(filterTxs(cli))
clientCtx = clientCtx.WithClient(cli)
// testing query single vote
for i, v := range tc.votes {
accAddr, err := clientCtx.AddressCodec.StringToBytes(v.Voter)

View File

@ -16,7 +16,7 @@ require (
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
github.com/chzyer/readline v1.5.1
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0

View File

@ -7,8 +7,6 @@ import (
"io"
"testing"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
// without this import amino json encoding will fail when resolving any types
@ -56,7 +54,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain").
@ -77,9 +75,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -18,8 +18,6 @@ require (
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
github.com/cockroachdb/apd/v2 v2.0.2
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/cosmos-db v1.0.3-0.20240829004618-717cba019b33
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
@ -64,7 +62,9 @@ require (
github.com/cockroachdb/pebble v1.1.1 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // indirect
github.com/cometbft/cometbft-db v0.14.0 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/crypto v0.1.2 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect

View File

@ -8,7 +8,6 @@ import (
"strings"
"time"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"cosmossdk.io/core/header"
@ -1852,7 +1851,7 @@ func (s *TestSuite) TestSubmitProposal() {
s.Require().Contains(fromBalances, sdk.NewInt64Coin("test", 9900))
toBalances := s.bankKeeper.GetAllBalances(sdkCtx, addr2)
s.Require().Contains(toBalances, sdk.NewInt64Coin("test", 100))
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
},
},
@ -1996,7 +1995,7 @@ func (s *TestSuite) TestWithdrawProposal() {
timeDiff := vpe.Sub(s.sdkCtx.HeaderInfo().Time)
ctxVPE := sdkCtx.WithHeaderInfo(header.Info{Time: s.sdkCtx.HeaderInfo().Time.Add(timeDiff).Add(time.Second * 1)})
s.Require().NoError(s.groupKeeper.TallyProposalsAtVPEnd(ctxVPE))
events := ctxVPE.EventManager().ABCIEvents()
events := ctxVPE.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
},
@ -2576,7 +2575,7 @@ func (s *TestSuite) TestExecProposal() {
expFromBalances: sdk.NewInt64Coin("test", 9900),
expToBalances: sdk.NewInt64Coin("test", 100),
postRun: func(sdkCtx sdk.Context) {
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
},
},
@ -2594,7 +2593,7 @@ func (s *TestSuite) TestExecProposal() {
expFromBalances: sdk.NewInt64Coin("test", 9800),
expToBalances: sdk.NewInt64Coin("test", 200),
postRun: func(sdkCtx sdk.Context) {
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
},
},
@ -2607,7 +2606,7 @@ func (s *TestSuite) TestExecProposal() {
expProposalStatus: group.PROPOSAL_STATUS_REJECTED,
expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN,
postRun: func(sdkCtx sdk.Context) {
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().False(eventTypeFound(events, EventProposalPruned))
},
},
@ -2618,7 +2617,7 @@ func (s *TestSuite) TestExecProposal() {
expProposalStatus: group.PROPOSAL_STATUS_SUBMITTED,
expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_NOT_RUN,
postRun: func(sdkCtx sdk.Context) {
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().False(eventTypeFound(events, EventProposalPruned))
},
},
@ -2676,7 +2675,7 @@ func (s *TestSuite) TestExecProposal() {
expProposalStatus: group.PROPOSAL_STATUS_ACCEPTED,
expExecutorResult: group.PROPOSAL_EXECUTOR_RESULT_SUCCESS,
postRun: func(sdkCtx sdk.Context) {
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
},
},
@ -2962,7 +2961,7 @@ func (s *TestSuite) TestExecPrunedProposalsAndVotes() {
res, err := s.groupKeeper.VotesByProposal(sdkCtx, &group.QueryVotesByProposalRequest{ProposalId: proposalID})
s.Require().NoError(err)
s.Require().Empty(res.GetVotes())
events := sdkCtx.EventManager().ABCIEvents()
events := sdkCtx.EventManager().Events()
s.Require().True(eventTypeFound(events, EventProposalPruned))
} else {
@ -3398,7 +3397,7 @@ func (s *TestSuite) TestExecProposalsWhenMemberLeavesOrIsUpdated() {
}
}
func eventTypeFound(events []abci.Event, eventType string) bool {
func eventTypeFound(events []sdk.Event, eventType string) bool {
eventTypeFound := false
for _, e := range events {
if e.Type == eventType {

View File

@ -116,15 +116,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{ProtoField: "dst_validator_addr"},
},
},
{
RpcMethod: "HistoricalInfo",
Use: "historical-info <height>",
Short: "Query historical info at given height",
Example: fmt.Sprintf("$ %s query staking historical-info 5", version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "height"},
},
},
{
RpcMethod: "Pool",
Use: "pool",

View File

@ -5,8 +5,6 @@ import (
"io"
"testing"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/spf13/pflag"
"github.com/stretchr/testify/suite"
@ -51,7 +49,7 @@ func (s *CLITestSuite) SetupSuite() {
WithKeyring(s.kr).
WithTxConfig(s.encCfg.TxConfig).
WithCodec(s.encCfg.Codec).
WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}).
WithClient(clitestutil.MockCometRPC{}).
WithAccountRetriever(client.MockAccountRetriever{}).
WithOutput(io.Discard).
WithChainID("test-chain").
@ -61,9 +59,7 @@ func (s *CLITestSuite) SetupSuite() {
ctxGen := func() client.Context {
bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockCometRPC(abci.QueryResponse{
Value: bz,
})
c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz)
return s.baseCtx.WithClient(c)
}
s.clientCtx = ctxGen()

View File

@ -4,18 +4,28 @@ import (
"context"
"fmt"
cmttypes "github.com/cometbft/cometbft/types"
gogotypes "github.com/cosmos/gogoproto/types"
"cosmossdk.io/x/staking/keeper"
"cosmossdk.io/x/staking/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// TODO: move this to sdk types and use this instead of comet types GenesisValidator
// then we can do pubkey conversion in ToGenesisDoc
//
// this is a temporary work around to avoid import comet directly in staking
type GenesisValidator struct {
Address sdk.ConsAddress
PubKey cryptotypes.PubKey
Power int64
Name string
}
// WriteValidators returns a slice of bonded genesis validators.
func WriteValidators(ctx context.Context, keeper *keeper.Keeper) (vals []cmttypes.GenesisValidator, returnErr error) {
func WriteValidators(ctx context.Context, keeper *keeper.Keeper) (vals []GenesisValidator, returnErr error) {
err := keeper.LastValidatorPower.Walk(ctx, nil, func(key []byte, _ gogotypes.Int64Value) (bool, error) {
validator, err := keeper.GetValidator(ctx, key)
if err != nil {
@ -27,15 +37,10 @@ func WriteValidators(ctx context.Context, keeper *keeper.Keeper) (vals []cmttype
returnErr = err
return true, err
}
cmtPk, err := cryptocodec.ToCmtPubKeyInterface(pk)
if err != nil {
returnErr = err
return true, err
}
vals = append(vals, cmttypes.GenesisValidator{
Address: sdk.ConsAddress(cmtPk.Address()).Bytes(),
PubKey: cmtPk,
vals = append(vals, GenesisValidator{
Address: sdk.ConsAddress(pk.Address()),
PubKey: pk,
Power: validator.GetConsensusPower(keeper.PowerReduction(ctx)),
Name: validator.GetMoniker(),
})

View File

@ -11,8 +11,8 @@ require (
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.53.0
github.com/cosmos/gogoproto v1.7.0

View File

@ -410,15 +410,6 @@ func (k Querier) DelegatorUnbondingDelegations(ctx context.Context, req *types.Q
}, nil
}
// HistoricalInfo queries the historical info for given height
func (k Querier) HistoricalInfo(ctx context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { // nolint:staticcheck // SA1019: deprecated endpoint
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}
return nil, status.Error(codes.Internal, "this endpoint has been deprecated and removed in 0.52")
}
// Redelegations queries redelegations of given address
func (k Querier) Redelegations(ctx context.Context, req *types.QueryRedelegationsRequest) (*types.QueryRedelegationsResponse, error) {
if req == nil {

View File

@ -6,7 +6,6 @@ import (
"testing"
"time"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@ -33,8 +32,7 @@ func TestHistoricalKeysMigration(t *testing.T) {
logger := coretesting.NewNopLogger()
type testCase struct {
oldKey, newKey []byte
historicalInfo []byte
oldKey, newKey, data []byte
}
testCases := make(map[int64]testCase)
@ -54,15 +52,15 @@ func TestHistoricalKeysMigration(t *testing.T) {
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
for height := range testCases {
testCases[height] = testCase{
oldKey: v5.GetLegacyHistoricalInfoKey(height),
newKey: v5.GetHistoricalInfoKey(height),
historicalInfo: cdc.MustMarshal(createHistoricalInfo(height, "testChainID")),
oldKey: v5.GetLegacyHistoricalInfoKey(height),
newKey: v5.GetHistoricalInfoKey(height),
data: []byte("test"),
}
}
// populate store using old key format
for _, tc := range testCases {
store.Set(tc.oldKey, tc.historicalInfo)
store.Set(tc.oldKey, tc.data)
}
// migrate store to new key format
@ -72,14 +70,10 @@ func TestHistoricalKeysMigration(t *testing.T) {
for _, tc := range testCases {
require.Nilf(t, store.Get(tc.oldKey), "old key should be deleted, seed: %d", seed)
require.NotNilf(t, store.Get(tc.newKey), "new key should be created, seed: %d", seed)
require.Equalf(t, tc.historicalInfo, store.Get(tc.newKey), "seed: %d", seed)
require.Equalf(t, tc.data, store.Get(tc.newKey), "seed: %d", seed)
}
}
func createHistoricalInfo(height int64, chainID string) *stakingtypes.HistoricalInfo {
return &stakingtypes.HistoricalInfo{Header: cmtproto.Header{ChainID: chainID, Height: height}}
}
func TestDelegationsByValidatorMigrations(t *testing.T) {
codecOpts := codectestutil.CodecOptions{}
cdc := moduletestutil.MakeTestEncodingConfig(codecOpts, staking.AppModule{}).Codec

View File

@ -111,13 +111,6 @@ service Query {
"{validator_addr}";
}
// HistoricalInfo queries the historical info for given height.
rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) {
option deprecated = true;
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}";
}
// Pool queries the pool info.
rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) {
option (cosmos.query.v1.module_query_safe) = true;
@ -366,22 +359,6 @@ message QueryDelegatorValidatorResponse {
Validator validator = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
// method.
message QueryHistoricalInfoRequest {
option deprecated = true;
// height defines at which height to query the historical info.
int64 height = 1;
}
// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
// method.
message QueryHistoricalInfoResponse {
option deprecated = true;
// hist defines the historical info at the given height.
HistoricalInfo hist = 1 [deprecated = true];
}
// QueryPoolRequest is request type for the Query/Pool RPC method.
message QueryPoolRequest {}

View File

@ -9,22 +9,9 @@ import "google/protobuf/timestamp.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
import "amino/amino.proto";
import "cometbft/types/v1/types.proto";
import "cometbft/abci/v1/types.proto";
option go_package = "cosmossdk.io/x/staking/types";
// HistoricalInfo contains header and validator information for a given block.
// It is stored as part of staking module's state, which persists the `n` most
// recent HistoricalInfo
// (`n` is set by the staking module's `historical_entries` parameter).
message HistoricalInfo {
option deprecated = true;
cometbft.types.v1.Header header = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated Validator valset = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// CommissionRates defines the initial commission rates to be used for creating
// a validator.
message CommissionRates {
@ -392,14 +379,6 @@ enum Infraction {
INFRACTION_DOWNTIME = 2;
}
// ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
message ValidatorUpdates {
option deprecated = true;
repeated cometbft.abci.v1.ValidatorUpdate updates = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// ConsPubKeyRotationHistory contains a validator's consensus public key rotation history.
message ConsPubKeyRotationHistory {
option (gogoproto.equal) = false;

View File

@ -1187,105 +1187,6 @@ func (m *QueryDelegatorValidatorResponse) GetValidator() Validator {
return Validator{}
}
// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
// method.
//
// Deprecated: Do not use.
type QueryHistoricalInfoRequest struct {
// height defines at which height to query the historical info.
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
}
func (m *QueryHistoricalInfoRequest) Reset() { *m = QueryHistoricalInfoRequest{} }
func (m *QueryHistoricalInfoRequest) String() string { return proto.CompactTextString(m) }
func (*QueryHistoricalInfoRequest) ProtoMessage() {}
func (*QueryHistoricalInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{23}
}
func (m *QueryHistoricalInfoRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryHistoricalInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryHistoricalInfoRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryHistoricalInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryHistoricalInfoRequest.Merge(m, src)
}
func (m *QueryHistoricalInfoRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryHistoricalInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryHistoricalInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryHistoricalInfoRequest proto.InternalMessageInfo
func (m *QueryHistoricalInfoRequest) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
// method.
//
// Deprecated: Do not use.
type QueryHistoricalInfoResponse struct {
// hist defines the historical info at the given height.
Hist *HistoricalInfo `protobuf:"bytes,1,opt,name=hist,proto3" json:"hist,omitempty"` // Deprecated: Do not use.
}
func (m *QueryHistoricalInfoResponse) Reset() { *m = QueryHistoricalInfoResponse{} }
func (m *QueryHistoricalInfoResponse) String() string { return proto.CompactTextString(m) }
func (*QueryHistoricalInfoResponse) ProtoMessage() {}
func (*QueryHistoricalInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{24}
}
func (m *QueryHistoricalInfoResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryHistoricalInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryHistoricalInfoResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryHistoricalInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryHistoricalInfoResponse.Merge(m, src)
}
func (m *QueryHistoricalInfoResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryHistoricalInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryHistoricalInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryHistoricalInfoResponse proto.InternalMessageInfo
// Deprecated: Do not use.
func (m *QueryHistoricalInfoResponse) GetHist() *HistoricalInfo {
if m != nil {
return m.Hist
}
return nil
}
// QueryPoolRequest is request type for the Query/Pool RPC method.
type QueryPoolRequest struct {
}
@ -1294,7 +1195,7 @@ func (m *QueryPoolRequest) Reset() { *m = QueryPoolRequest{} }
func (m *QueryPoolRequest) String() string { return proto.CompactTextString(m) }
func (*QueryPoolRequest) ProtoMessage() {}
func (*QueryPoolRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{25}
return fileDescriptor_f270127f442bbcd8, []int{23}
}
func (m *QueryPoolRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1333,7 +1234,7 @@ func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} }
func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) }
func (*QueryPoolResponse) ProtoMessage() {}
func (*QueryPoolResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{26}
return fileDescriptor_f270127f442bbcd8, []int{24}
}
func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1377,7 +1278,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryParamsRequest) ProtoMessage() {}
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{27}
return fileDescriptor_f270127f442bbcd8, []int{25}
}
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1416,7 +1317,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryParamsResponse) ProtoMessage() {}
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f270127f442bbcd8, []int{28}
return fileDescriptor_f270127f442bbcd8, []int{26}
}
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1476,8 +1377,6 @@ func init() {
proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")
proto.RegisterType((*QueryDelegatorValidatorRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")
proto.RegisterType((*QueryDelegatorValidatorResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")
proto.RegisterType((*QueryHistoricalInfoRequest)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoRequest")
proto.RegisterType((*QueryHistoricalInfoResponse)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoResponse")
proto.RegisterType((*QueryPoolRequest)(nil), "cosmos.staking.v1beta1.QueryPoolRequest")
proto.RegisterType((*QueryPoolResponse)(nil), "cosmos.staking.v1beta1.QueryPoolResponse")
proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.staking.v1beta1.QueryParamsRequest")
@ -1489,99 +1388,93 @@ func init() {
}
var fileDescriptor_f270127f442bbcd8 = []byte{
// 1467 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdd, 0x6b, 0x1c, 0x55,
0x14, 0xcf, 0xdd, 0xc4, 0x60, 0x4e, 0x69, 0x49, 0xef, 0x6e, 0xe3, 0x76, 0x9a, 0x6e, 0xb6, 0x43,
0xad, 0x69, 0x6a, 0x66, 0xda, 0x54, 0xdb, 0x58, 0xa1, 0xed, 0xc6, 0xa2, 0xad, 0x2d, 0x35, 0x5d,
0x31, 0x8a, 0x1f, 0x84, 0x49, 0x76, 0x3a, 0x19, 0x9a, 0xcc, 0x6c, 0xe7, 0x4e, 0x42, 0x4b, 0x29,
0x82, 0x0f, 0x52, 0x5f, 0x44, 0xf0, 0x5d, 0xfa, 0x28, 0xa2, 0x20, 0x98, 0x0a, 0x22, 0xf6, 0x51,
0xfa, 0x20, 0x52, 0x2a, 0x15, 0xf5, 0xa1, 0x4a, 0x23, 0xe8, 0x8b, 0xff, 0x81, 0x88, 0xcc, 0xcc,
0x99, 0xaf, 0xcc, 0xe7, 0x6e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e0, 0xd4, 0xcc, 0x1d, 0xc8, 0xb5,
0x17, 0xe1, 0x1c, 0xf0, 0xe1, 0x54, 0x69, 0x25, 0x11, 0x8e, 0x33, 0x48, 0x1f, 0xb9, 0xf3, 0xb0,
0x42, 0xee, 0x3e, 0xac, 0x90, 0x3f, 0x1e, 0x56, 0xc8, 0x47, 0x6b, 0x95, 0x9e, 0xbb, 0x6b, 0x95,
0x9e, 0x5f, 0xd6, 0x2a, 0x3d, 0x6f, 0x0e, 0x3b, 0x86, 0xac, 0x71, 0x49, 0x50, 0x75, 0xd1, 0xfb,
0xe5, 0x50, 0x34, 0xaf, 0x36, 0x65, 0x36, 0xd7, 0x6f, 0xff, 0x46, 0x7a, 0xf8, 0xff, 0x00, 0x00,
0x00, 0xff, 0xff, 0x02, 0x10, 0x70, 0xd8, 0x32, 0x1e, 0x00, 0x00,
// 1371 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0x5d, 0x68, 0x1c, 0xd5,
0x17, 0xdf, 0xbb, 0xcd, 0x3f, 0xfc, 0x73, 0x4a, 0x4a, 0x72, 0x77, 0x1b, 0xd3, 0x31, 0xdd, 0x6c,
0x86, 0xaa, 0xf9, 0x30, 0x33, 0x4d, 0xaa, 0x69, 0xac, 0x60, 0xbb, 0xb1, 0xa8, 0xb5, 0xa5, 0xa6,
0x2b, 0x46, 0xf1, 0x83, 0x30, 0xc9, 0x4e, 0xa7, 0x4b, 0x93, 0x99, 0xed, 0xdc, 0x49, 0x68, 0x29,
0x45, 0xf0, 0x41, 0xea, 0x8b, 0x08, 0xbe, 0x4b, 0x1f, 0x45, 0x14, 0x7c, 0x48, 0x05, 0x1f, 0xec,
0xa3, 0xf4, 0x41, 0xa4, 0x44, 0x2a, 0xea, 0x43, 0x95, 0x44, 0xd0, 0x17, 0x1f, 0x7d, 0x13, 0x91,
0x99, 0x39, 0xf3, 0x95, 0xf9, 0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
0xa0, 0x10, 0x31, 0x53, 0xa6, 0x74, 0x66, 0xfc, 0xf0, 0xcc, 0xcd, 0x36, 0x6f, 0x88, 0xd4, 0xce,
0x7a, 0xd4, 0x4e, 0xd1, 0xe7, 0x5a, 0xa1, 0xe6, 0x7b, 0x99, 0x6f, 0x13, 0xa0, 0xe1, 0x60, 0x74,
0xa6, 0x49, 0x74, 0x0e, 0xab, 0xe3, 0x4d, 0xdb, 0x21, 0xa9, 0xb7, 0x3d, 0x52, 0x17, 0xe8, 0x2b,
0xbb, 0x23, 0x15, 0x9e, 0x01, 0xde, 0x27, 0xd0, 0x65, 0xce, 0x79, 0x74, 0x34, 0x11, 0x9f, 0x6f,
0xa4, 0xe4, 0xc6, 0x32, 0xec, 0x44, 0xec, 0x63, 0x1e, 0xf6, 0x12, 0x1d, 0x8a, 0xc3, 0x6e, 0x8e,
0x95, 0xf4, 0x43, 0x02, 0xdd, 0xf6, 0x10, 0x48, 0xc7, 0x93, 0x03, 0xf8, 0xe7, 0x4e, 0x6e, 0x22,
0xd3, 0x5e, 0x84, 0x33, 0xe1, 0xc1, 0x29, 0xd3, 0x52, 0x2c, 0x1c, 0x7b, 0x14, 0x9d, 0xb9, 0xbb,
0x55, 0x22, 0xf7, 0xb6, 0x4a, 0xe4, 0xb7, 0xad, 0x12, 0xf9, 0x68, 0xbb, 0x94, 0xbb, 0xb7, 0x5d,
0xca, 0xfd, 0xb4, 0x5d, 0xca, 0xbd, 0x39, 0x64, 0x1b, 0xb2, 0xda, 0x65, 0xa1, 0xae, 0x89, 0xee,
0xcf, 0x5b, 0xa2, 0x71, 0xad, 0x21, 0xb3, 0xa5, 0x6e, 0xeb, 0x87, 0xbc, 0x63, 0xff, 0x05, 0x00,
0x00, 0xff, 0xff, 0x90, 0x4c, 0x2c, 0x70, 0xd7, 0x1c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1643,8 +1536,6 @@ type QueryClient interface {
// DelegatorValidator queries validator info for given delegator validator
// pair.
DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error)
// HistoricalInfo queries the historical info for given height.
HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error)
// Pool queries the pool info.
Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
// Parameters queries the staking parameters.
@ -1758,16 +1649,6 @@ func (c *queryClient) DelegatorValidator(ctx context.Context, in *QueryDelegator
return out, nil
}
// Deprecated: Do not use.
func (c *queryClient) HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) {
out := new(QueryHistoricalInfoResponse)
err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/HistoricalInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) {
out := new(QueryPoolResponse)
err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Pool", in, out, opts...)
@ -1835,8 +1716,6 @@ type QueryServer interface {
// DelegatorValidator queries validator info for given delegator validator
// pair.
DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error)
// HistoricalInfo queries the historical info for given height.
HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error)
// Pool queries the pool info.
Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error)
// Parameters queries the staking parameters.
@ -1880,9 +1759,6 @@ func (*UnimplementedQueryServer) DelegatorValidators(ctx context.Context, req *Q
func (*UnimplementedQueryServer) DelegatorValidator(ctx context.Context, req *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidator not implemented")
}
func (*UnimplementedQueryServer) HistoricalInfo(ctx context.Context, req *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HistoricalInfo not implemented")
}
func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented")
}
@ -2092,24 +1968,6 @@ func _Query_DelegatorValidator_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Query_HistoricalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryHistoricalInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).HistoricalInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.staking.v1beta1.Query/HistoricalInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).HistoricalInfo(ctx, req.(*QueryHistoricalInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryPoolRequest)
if err := dec(in); err != nil {
@ -2195,10 +2053,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "DelegatorValidator",
Handler: _Query_DelegatorValidator_Handler,
},
{
MethodName: "HistoricalInfo",
Handler: _Query_HistoricalInfo_Handler,
},
{
MethodName: "Pool",
Handler: _Query_Pool_Handler,
@ -3182,69 +3036,6 @@ func (m *QueryDelegatorValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int
return len(dAtA) - i, nil
}
func (m *QueryHistoricalInfoRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryHistoricalInfoRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryHistoricalInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Height != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.Height))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *QueryHistoricalInfoResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryHistoricalInfoResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Hist != nil {
{
size, err := m.Hist.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryPoolRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -3757,31 +3548,6 @@ func (m *QueryDelegatorValidatorResponse) Size() (n int) {
return n
}
func (m *QueryHistoricalInfoRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Height != 0 {
n += 1 + sovQuery(uint64(m.Height))
}
return n
}
func (m *QueryHistoricalInfoResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Hist != nil {
l = m.Hist.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryPoolRequest) Size() (n int) {
if m == nil {
return 0
@ -6433,161 +6199,6 @@ func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryHistoricalInfoRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryHistoricalInfoRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryHistoricalInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
}
m.Height = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Height |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryHistoricalInfoResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryHistoricalInfoResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryHistoricalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Hist == nil {
m.Hist = &HistoricalInfo{}
}
if err := m.Hist.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

View File

@ -783,60 +783,6 @@ func local_request_Query_DelegatorValidator_0(ctx context.Context, marshaler run
}
func request_Query_HistoricalInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryHistoricalInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["height"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height")
}
protoReq.Height, err = runtime.Int64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err)
}
msg, err := client.HistoricalInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_HistoricalInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryHistoricalInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["height"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height")
}
protoReq.Height, err = runtime.Int64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err)
}
msg, err := server.HistoricalInfo(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_Pool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryPoolRequest
var metadata runtime.ServerMetadata
@ -1132,29 +1078,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_HistoricalInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_HistoricalInfo_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_HistoricalInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Pool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1462,26 +1385,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_HistoricalInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_HistoricalInfo_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_HistoricalInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_Pool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1548,8 +1451,6 @@ var (
pattern_Query_DelegatorValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "staking", "v1beta1", "delegators", "delegator_addr", "validators", "validator_addr"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_HistoricalInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "staking", "v1beta1", "historical_info", "height"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "pool"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
@ -1578,8 +1479,6 @@ var (
forward_Query_DelegatorValidator_0 = runtime.ForwardResponseMessage
forward_Query_HistoricalInfo_0 = runtime.ForwardResponseMessage
forward_Query_Pool_0 = runtime.ForwardResponseMessage
forward_Query_Params_0 = runtime.ForwardResponseMessage

File diff suppressed because it is too large Load Diff