chore(consensus): add cometInfo to consensus (#20615)
This commit is contained in:
parent
e3177868e0
commit
f4136797a1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,8 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params"
|
||||
Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params"
|
||||
Query_GetCometInfo_FullMethodName = "/cosmos.consensus.v1.Query/GetCometInfo"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
@ -30,6 +31,8 @@ const (
|
||||
type QueryClient interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -49,12 +52,23 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) {
|
||||
out := new(QueryGetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GetCometInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
type QueryServer interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
@ -65,6 +79,9 @@ type UnimplementedQueryServer struct {
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -96,6 +113,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetCometInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GetCometInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -107,6 +142,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCometInfo",
|
||||
Handler: _Query_GetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/query.proto",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams"
|
||||
Msg_SetCometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/SetCometInfo"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
@ -31,6 +32,8 @@ type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -50,6 +53,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) {
|
||||
out := new(MsgSetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_SetCometInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
@ -57,6 +69,8 @@ type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
@ -67,6 +81,9 @@ type UnimplementedMsgServer struct {
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -98,6 +115,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSetCometInfo)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_SetCometInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -109,6 +144,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetCometInfo",
|
||||
Handler: _Msg_SetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/tx.proto",
|
||||
|
||||
@ -30,3 +30,5 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
* [#20615](https://github.com/cosmos/cosmos-sdk/pull/20615) Add consensus messages to add cometinfo to consensus modules
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
@ -10,6 +11,7 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
coreapp "cosmossdk.io/core/app"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/event"
|
||||
"cosmossdk.io/x/consensus/exported"
|
||||
@ -25,6 +27,8 @@ type Keeper struct {
|
||||
|
||||
authority string
|
||||
ParamsStore collections.Item[cmtproto.ConsensusParams]
|
||||
// storage of the last comet info
|
||||
cometInfo collections.Item[types.CometInfo]
|
||||
}
|
||||
|
||||
var _ exported.ConsensusParamSetter = Keeper{}.ParamsStore
|
||||
@ -35,6 +39,7 @@ func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, authority strin
|
||||
Environment: env,
|
||||
authority: authority,
|
||||
ParamsStore: collections.NewItem(sb, collections.NewPrefix("Consensus"), "params", codec.CollValue[cmtproto.ConsensusParams](cdc)),
|
||||
cometInfo: collections.NewItem(sb, collections.NewPrefix("CometInfo"), "comet_info", codec.CollValue[types.CometInfo](cdc)),
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,3 +104,31 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*
|
||||
|
||||
return &types.MsgUpdateParamsResponse{}, nil
|
||||
}
|
||||
|
||||
func (k Keeper) SetCometInfo(ctx context.Context, msg *types.MsgSetCometInfo) (*types.MsgSetCometInfoResponse, error) {
|
||||
if !bytes.Equal(coreapp.ConsensusIdentity, []byte(msg.Authority)) {
|
||||
return nil, fmt.Errorf("invalid authority; expected %s, got %s", coreapp.ConsensusIdentity, msg.Authority)
|
||||
}
|
||||
|
||||
cometInfo := types.CometInfo{
|
||||
Evidence: msg.Evidence,
|
||||
ValidatorsHash: msg.ValidatorsHash,
|
||||
ProposerAddress: msg.ProposerAddress,
|
||||
LastCommit: msg.LastCommit,
|
||||
}
|
||||
|
||||
if err := k.cometInfo.Set(ctx, cometInfo); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &types.MsgSetCometInfoResponse{}, nil
|
||||
}
|
||||
|
||||
func (k Keeper) GetCometInfo(ctx context.Context, _ *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) {
|
||||
cometInfo, err := k.cometInfo.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryGetCometInfoResponse{CometInfo: &cometInfo}, nil
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
cmttypes "github.com/cometbft/cometbft/types"
|
||||
gogotypes "github.com/cosmos/gogoproto/types"
|
||||
@ -603,3 +604,53 @@ func (s *KeeperTestSuite) TestUpdateParams() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *KeeperTestSuite) TestSetCometInfo() {
|
||||
consensusIdentiy := "consensus"
|
||||
testCases := []struct {
|
||||
name string
|
||||
enabledFeatures bool
|
||||
input *types.MsgSetCometInfo
|
||||
expErr bool
|
||||
expErrMsg string
|
||||
}{
|
||||
{
|
||||
name: "valid comet info",
|
||||
input: &types.MsgSetCometInfo{
|
||||
Authority: consensusIdentiy,
|
||||
Evidence: []*v1.Misbehavior{},
|
||||
ValidatorsHash: []byte("validatorhash"),
|
||||
ProposerAddress: []byte("proposeraddress"),
|
||||
LastCommit: &v1.CommitInfo{},
|
||||
},
|
||||
expErr: false,
|
||||
expErrMsg: "",
|
||||
},
|
||||
{
|
||||
name: "invalid authority",
|
||||
input: &types.MsgSetCometInfo{
|
||||
Authority: "invalid",
|
||||
Evidence: []*v1.Misbehavior{},
|
||||
ValidatorsHash: []byte("validatorhash"),
|
||||
ProposerAddress: []byte("proposeraddress"),
|
||||
LastCommit: &v1.CommitInfo{},
|
||||
},
|
||||
expErr: true,
|
||||
expErrMsg: "invalid authority",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.Run(tc.name, func() {
|
||||
s.SetupTest(tc.enabledFeatures)
|
||||
_, err := s.consensusParamsKeeper.SetCometInfo(s.ctx, tc.input)
|
||||
if tc.expErr {
|
||||
s.Require().Error(err)
|
||||
s.Require().Contains(err.Error(), tc.expErrMsg)
|
||||
} else {
|
||||
s.Require().NoError(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,25 +1,15 @@
|
||||
// Since: cosmos-sdk 0.51
|
||||
// Since: cosmos-sdk 0.52
|
||||
syntax = "proto3";
|
||||
package cosmos.consensus.v1;
|
||||
|
||||
import "cometbft/types/v1/params.proto";
|
||||
import "cometbft/abci/v1/types.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/consensus/types";
|
||||
|
||||
// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft.
|
||||
message ConsensusMsgParams {
|
||||
// params defines the x/consensus parameters to be passed from comet.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
cometbft.types.v1.VersionParams version = 1;
|
||||
cometbft.types.v1.BlockParams block = 2;
|
||||
cometbft.types.v1.EvidenceParams evidence = 3;
|
||||
cometbft.types.v1.ValidatorParams validator = 4;
|
||||
cometbft.types.v1.ABCIParams abci = 5 [deprecated = true];
|
||||
cometbft.types.v1.SynchronyParams synchrony = 6;
|
||||
cometbft.types.v1.FeatureParams feature = 7;
|
||||
// CometInfo defines the structure of the x/consensus module's comet info.
|
||||
message CometInfo {
|
||||
repeated cometbft.abci.v1.Misbehavior evidence = 1;
|
||||
bytes validators_hash = 2;
|
||||
bytes proposer_address = 3;
|
||||
cometbft.abci.v1.CommitInfo last_commit = 4;
|
||||
}
|
||||
|
||||
// ConsensusMsgParamsResponse defines the response structure for executing a
|
||||
// ConsensusMsgParams message.
|
||||
message ConsensusMsgParamsResponse {}
|
||||
|
||||
@ -4,6 +4,7 @@ package cosmos.consensus.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "cometbft/types/v1/params.proto";
|
||||
import "cosmos/consensus/v1/consensus.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/consensus/types";
|
||||
|
||||
@ -13,6 +14,18 @@ service Query {
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/consensus/v1/params";
|
||||
}
|
||||
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
rpc GetCometInfo(QueryGetCometInfoRequest) returns (QueryGetCometInfoResponse);
|
||||
}
|
||||
|
||||
// QueryCometInfoRequest defines the request type for querying x/consensus comet info.
|
||||
message QueryGetCometInfoRequest {}
|
||||
|
||||
// QueryCometInfoResponse defines the response type for querying x/consensus comet info.
|
||||
message QueryGetCometInfoResponse {
|
||||
// comet_info is the comet info of the x/consensus module.
|
||||
CometInfo comet_info = 1;
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/consensus parameters.
|
||||
|
||||
@ -6,6 +6,7 @@ import "amino/amino.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "cometbft/types/v1/params.proto";
|
||||
import "cometbft/abci/v1/types.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/consensus/types";
|
||||
|
||||
@ -18,6 +19,9 @@ service Msg {
|
||||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) {
|
||||
option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47";
|
||||
}
|
||||
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
rpc SetCometInfo(MsgSetCometInfo) returns (MsgSetCometInfoResponse);
|
||||
}
|
||||
|
||||
// MsgUpdateParams is the Msg/UpdateParams request type.
|
||||
@ -46,3 +50,27 @@ message MsgUpdateParams {
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
// MsgUpdateParams message.
|
||||
message MsgUpdateParamsResponse {}
|
||||
|
||||
// MsgCometInfo is the Msg/CometInfo request type.
|
||||
message MsgSetCometInfo {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo";
|
||||
|
||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// evidence is the misbehaviour evidence to submit.
|
||||
repeated cometbft.abci.v1.Misbehavior evidence = 2;
|
||||
|
||||
// validators_hash is the hash of the current validator set.
|
||||
bytes validators_hash = 3;
|
||||
|
||||
// proposer_address is the address of the current proposer.
|
||||
bytes proposer_address = 4;
|
||||
|
||||
// last_commit is the last commit info.
|
||||
cometbft.abci.v1.CommitInfo last_commit = 5;
|
||||
}
|
||||
|
||||
// MsgCometInfoResponse defines the response
|
||||
message MsgSetCometInfoResponse {}
|
||||
|
||||
@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
@ -23,32 +23,26 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft.
|
||||
type ConsensusMsgParams struct {
|
||||
// params defines the x/consensus parameters to be passed from comet.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
|
||||
Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"`
|
||||
Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use.
|
||||
Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"`
|
||||
Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"`
|
||||
// CometInfo defines the structure of the x/consensus module's comet info.
|
||||
type CometInfo struct {
|
||||
Evidence []*v1.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
|
||||
ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
|
||||
LastCommit *v1.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} }
|
||||
func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConsensusMsgParams) ProtoMessage() {}
|
||||
func (*ConsensusMsgParams) Descriptor() ([]byte, []int) {
|
||||
func (m *CometInfo) Reset() { *m = CometInfo{} }
|
||||
func (m *CometInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*CometInfo) ProtoMessage() {}
|
||||
func (*CometInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7ed86dd7d42fb61b, []int{0}
|
||||
}
|
||||
func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error {
|
||||
func (m *CometInfo) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *CometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ConsensusMsgParams.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_CometInfo.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@ -58,109 +52,48 @@ func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte,
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *ConsensusMsgParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConsensusMsgParams.Merge(m, src)
|
||||
func (m *CometInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CometInfo.Merge(m, src)
|
||||
}
|
||||
func (m *ConsensusMsgParams) XXX_Size() int {
|
||||
func (m *CometInfo) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ConsensusMsgParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m)
|
||||
func (m *CometInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CometInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo
|
||||
var xxx_messageInfo_CometInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *ConsensusMsgParams) GetVersion() *v1.VersionParams {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) GetBlock() *v1.BlockParams {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams {
|
||||
func (m *CometInfo) GetEvidence() []*v1.Misbehavior {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) GetValidator() *v1.ValidatorParams {
|
||||
func (m *CometInfo) GetValidatorsHash() []byte {
|
||||
if m != nil {
|
||||
return m.Validator
|
||||
return m.ValidatorsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (m *ConsensusMsgParams) GetAbci() *v1.ABCIParams {
|
||||
func (m *CometInfo) GetProposerAddress() []byte {
|
||||
if m != nil {
|
||||
return m.Abci
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams {
|
||||
func (m *CometInfo) GetLastCommit() *v1.CommitInfo {
|
||||
if m != nil {
|
||||
return m.Synchrony
|
||||
return m.LastCommit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) GetFeature() *v1.FeatureParams {
|
||||
if m != nil {
|
||||
return m.Feature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ConsensusMsgParamsResponse defines the response structure for executing a
|
||||
// ConsensusMsgParams message.
|
||||
type ConsensusMsgParamsResponse struct {
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsResponse{} }
|
||||
func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConsensusMsgParamsResponse) ProtoMessage() {}
|
||||
func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7ed86dd7d42fb61b, []int{1}
|
||||
}
|
||||
func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ConsensusMsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ConsensusMsgParamsResponse.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 *ConsensusMsgParamsResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConsensusMsgParamsResponse.Merge(m, src)
|
||||
}
|
||||
func (m *ConsensusMsgParamsResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ConsensusMsgParamsResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams")
|
||||
proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse")
|
||||
proto.RegisterType((*CometInfo)(nil), "cosmos.consensus.v1.CometInfo")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@ -168,32 +101,28 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_7ed86dd7d42fb61b = []byte{
|
||||
// 340 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xcb, 0x4a, 0x33, 0x31,
|
||||
0x14, 0x07, 0xf0, 0x4e, 0xaf, 0xdf, 0x17, 0x77, 0x71, 0x13, 0x8a, 0x86, 0x5a, 0x37, 0xae, 0x32,
|
||||
0xd4, 0x0b, 0x88, 0x20, 0xe8, 0x14, 0x05, 0x17, 0x82, 0x54, 0x70, 0xe1, 0x6e, 0x26, 0x4d, 0x75,
|
||||
0x68, 0x3b, 0x19, 0x92, 0x34, 0xd8, 0xb7, 0xf0, 0x81, 0x7c, 0x00, 0x97, 0x5d, 0xba, 0x94, 0xf6,
|
||||
0x45, 0x64, 0x72, 0x69, 0x05, 0xa7, 0xcb, 0x49, 0xfe, 0xbf, 0x73, 0x86, 0x93, 0x03, 0x0e, 0x29,
|
||||
0x97, 0x53, 0x2e, 0x43, 0xca, 0x33, 0xc9, 0x32, 0x39, 0x93, 0xa1, 0xee, 0x6d, 0x3e, 0x48, 0x2e,
|
||||
0xb8, 0xe2, 0x70, 0xd7, 0x86, 0xc8, 0xe6, 0x5c, 0xf7, 0xda, 0x98, 0xf2, 0x29, 0x53, 0xc9, 0x48,
|
||||
0x85, 0x6a, 0x9e, 0x33, 0xe3, 0xf2, 0x58, 0xc4, 0x53, 0x87, 0xba, 0x1f, 0x35, 0x00, 0xfb, 0x1e,
|
||||
0xdc, 0xcb, 0x97, 0x07, 0x73, 0x09, 0x2f, 0x40, 0x4b, 0x33, 0x21, 0x53, 0x9e, 0xa1, 0xa0, 0x13,
|
||||
0x1c, 0xed, 0x1c, 0x77, 0x88, 0x2f, 0x44, 0x4c, 0x21, 0xa2, 0x7b, 0xe4, 0xc9, 0x26, 0x2c, 0x19,
|
||||
0x78, 0x00, 0x4f, 0x41, 0x23, 0x99, 0x70, 0x3a, 0x46, 0x55, 0x23, 0x71, 0x89, 0x8c, 0x8a, 0x7b,
|
||||
0xe7, 0x6c, 0x18, 0x5e, 0x82, 0x7f, 0x4c, 0xa7, 0x43, 0x96, 0x51, 0x86, 0x6a, 0x06, 0x1e, 0x94,
|
||||
0xc0, 0x1b, 0x17, 0x71, 0x76, 0x4d, 0xe0, 0x15, 0xf8, 0xaf, 0xe3, 0x49, 0x3a, 0x8c, 0x15, 0x17,
|
||||
0xa8, 0x6e, 0x7c, 0xb7, 0xec, 0x97, 0x7d, 0xc6, 0x15, 0xd8, 0x20, 0x78, 0x06, 0xea, 0x71, 0x42,
|
||||
0x53, 0xd4, 0x30, 0x78, 0xbf, 0x04, 0x5f, 0x47, 0xfd, 0x3b, 0xeb, 0xa2, 0x2a, 0x0a, 0x06, 0x26,
|
||||
0x5e, 0x34, 0x96, 0xf3, 0x8c, 0xbe, 0x0a, 0x9e, 0xcd, 0x51, 0x73, 0x6b, 0xe3, 0x47, 0x9f, 0xf1,
|
||||
0x8d, 0xd7, 0xa8, 0x98, 0xf5, 0x88, 0xc5, 0x6a, 0x26, 0x18, 0x6a, 0x6d, 0x9d, 0xf5, 0xad, 0x4d,
|
||||
0xf8, 0x59, 0x3b, 0xd0, 0xdd, 0x03, 0xed, 0xbf, 0xaf, 0x37, 0x60, 0x32, 0x2f, 0x0e, 0xa3, 0xf3,
|
||||
0xcf, 0x25, 0x0e, 0x16, 0x4b, 0x1c, 0x7c, 0x2f, 0x71, 0xf0, 0xbe, 0xc2, 0x95, 0xc5, 0x0a, 0x57,
|
||||
0xbe, 0x56, 0xb8, 0xf2, 0x8c, 0xed, 0xae, 0xc8, 0xe1, 0x98, 0xa4, 0x3c, 0x7c, 0xfb, 0xb5, 0x58,
|
||||
0xa6, 0x63, 0xd2, 0x34, 0xdb, 0x71, 0xf2, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8f, 0x7e, 0x2c,
|
||||
0x79, 0x02, 0x00, 0x00,
|
||||
// 285 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xf3, 0x30,
|
||||
0x14, 0x85, 0xeb, 0xbf, 0xbf, 0x10, 0xb8, 0x88, 0xa2, 0xb0, 0x44, 0xa8, 0x58, 0x15, 0x0c, 0x94,
|
||||
0xc5, 0x51, 0xca, 0x02, 0x03, 0x03, 0x74, 0x81, 0x81, 0x25, 0x23, 0x4b, 0xe4, 0x38, 0xae, 0x62,
|
||||
0xd1, 0xe4, 0x46, 0xbe, 0xc6, 0x82, 0xb7, 0xe0, 0xb1, 0x18, 0x3b, 0xc2, 0x86, 0x92, 0x17, 0x41,
|
||||
0x49, 0x28, 0x41, 0x62, 0x3c, 0xc7, 0xe7, 0x93, 0x7c, 0x3f, 0x7a, 0x22, 0x01, 0x73, 0xc0, 0x40,
|
||||
0x42, 0x81, 0xaa, 0xc0, 0x27, 0x0c, 0x5c, 0xd8, 0x07, 0x5e, 0x1a, 0xb0, 0xe0, 0x1d, 0x74, 0x23,
|
||||
0xde, 0xf7, 0x2e, 0x3c, 0x9c, 0x48, 0xc8, 0x95, 0x4d, 0x96, 0x36, 0x10, 0x89, 0xd4, 0x0d, 0x66,
|
||||
0x5f, 0x4a, 0xf5, 0x8d, 0x1c, 0x7f, 0x10, 0xba, 0xb3, 0x68, 0x06, 0x77, 0xc5, 0x12, 0xbc, 0x4b,
|
||||
0xba, 0xad, 0x9c, 0x4e, 0x55, 0x21, 0x95, 0x4f, 0xa6, 0xc3, 0xd9, 0x68, 0x7e, 0xc4, 0x37, 0x38,
|
||||
0x6f, 0x70, 0xee, 0x42, 0x7e, 0xaf, 0x31, 0x51, 0x99, 0x70, 0x1a, 0x4c, 0xf4, 0x33, 0xf7, 0x4e,
|
||||
0xe9, 0xd8, 0x89, 0x95, 0x4e, 0x85, 0x05, 0x83, 0x71, 0x26, 0x30, 0xf3, 0xff, 0x4d, 0xc9, 0x6c,
|
||||
0x37, 0xda, 0xeb, 0xeb, 0x5b, 0x81, 0x99, 0x77, 0x46, 0xf7, 0x4b, 0x03, 0x25, 0xa0, 0x32, 0xb1,
|
||||
0x48, 0x53, 0xa3, 0x10, 0xfd, 0x61, 0xbb, 0x1c, 0x6f, 0xfa, 0xeb, 0xae, 0xf6, 0xae, 0xe8, 0x68,
|
||||
0x25, 0xd0, 0xc6, 0x12, 0xf2, 0x5c, 0x5b, 0xff, 0xff, 0x94, 0xcc, 0x46, 0xf3, 0xc9, 0xdf, 0x1f,
|
||||
0x2d, 0xda, 0xf7, 0xe6, 0x82, 0x88, 0x36, 0x40, 0x97, 0x6f, 0x2e, 0xde, 0x2a, 0x46, 0xd6, 0x15,
|
||||
0x23, 0x9f, 0x15, 0x23, 0xaf, 0x35, 0x1b, 0xac, 0x6b, 0x36, 0x78, 0xaf, 0xd9, 0xe0, 0x81, 0x75,
|
||||
0xa2, 0x30, 0x7d, 0xe4, 0x1a, 0x82, 0xe7, 0x5f, 0x56, 0x5b, 0x37, 0xc9, 0x56, 0x2b, 0xe7, 0xfc,
|
||||
0x2b, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x63, 0x02, 0x4f, 0x76, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) {
|
||||
func (m *CometInfo) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@ -203,55 +132,19 @@ func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *CometInfo) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *CometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Feature != nil {
|
||||
if m.LastCommit != nil {
|
||||
{
|
||||
size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.Synchrony != nil {
|
||||
{
|
||||
size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if m.Abci != nil {
|
||||
{
|
||||
size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.Validator != nil {
|
||||
{
|
||||
size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -261,68 +154,37 @@ func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if m.Evidence != nil {
|
||||
{
|
||||
size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.Block != nil {
|
||||
{
|
||||
size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
if len(m.ValidatorsHash) > 0 {
|
||||
i -= len(m.ValidatorsHash)
|
||||
copy(dAtA[i:], m.ValidatorsHash)
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(len(m.ValidatorsHash)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Version != nil {
|
||||
{
|
||||
size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
if len(m.Evidence) > 0 {
|
||||
for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintConsensus(dAtA, i, uint64(size))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParamsResponse) 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 *ConsensusMsgParamsResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovConsensus(v)
|
||||
base := offset
|
||||
@ -334,49 +196,30 @@ func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *ConsensusMsgParams) Size() (n int) {
|
||||
func (m *CometInfo) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Version != nil {
|
||||
l = m.Version.Size()
|
||||
if len(m.Evidence) > 0 {
|
||||
for _, e := range m.Evidence {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
}
|
||||
l = len(m.ValidatorsHash)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Block != nil {
|
||||
l = m.Block.Size()
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Evidence != nil {
|
||||
l = m.Evidence.Size()
|
||||
if m.LastCommit != nil {
|
||||
l = m.LastCommit.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Validator != nil {
|
||||
l = m.Validator.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Abci != nil {
|
||||
l = m.Abci.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Synchrony != nil {
|
||||
l = m.Synchrony.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
if m.Feature != nil {
|
||||
l = m.Feature.Size()
|
||||
n += 1 + l + sovConsensus(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ConsensusMsgParamsResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
@ -386,7 +229,7 @@ func sovConsensus(x uint64) (n int) {
|
||||
func sozConsensus(x uint64) (n int) {
|
||||
return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error {
|
||||
func (m *CometInfo) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@ -409,85 +252,13 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ConsensusMsgParams: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: CometInfo: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: CometInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Version == nil {
|
||||
m.Version = &v1.VersionParams{}
|
||||
}
|
||||
if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Block == nil {
|
||||
m.Block = &v1.BlockParams{}
|
||||
}
|
||||
if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
|
||||
}
|
||||
@ -516,16 +287,82 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Evidence == nil {
|
||||
m.Evidence = &v1.EvidenceParams{}
|
||||
}
|
||||
if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.Evidence = append(m.Evidence, &v1.Misbehavior{})
|
||||
if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ValidatorsHash == nil {
|
||||
m.ValidatorsHash = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -552,171 +389,13 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Validator == nil {
|
||||
m.Validator = &v1.ValidatorParams{}
|
||||
if m.LastCommit == nil {
|
||||
m.LastCommit = &v1.CommitInfo{}
|
||||
}
|
||||
if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Abci == nil {
|
||||
m.Abci = &v1.ABCIParams{}
|
||||
}
|
||||
if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Synchrony == nil {
|
||||
m.Synchrony = &v1.SynchronyParams{}
|
||||
}
|
||||
if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowConsensus
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Feature == nil {
|
||||
m.Feature = &v1.FeatureParams{}
|
||||
}
|
||||
if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipConsensus(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthConsensus
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ConsensusMsgParamsResponse) 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 ErrIntOverflowConsensus
|
||||
}
|
||||
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: ConsensusMsgParamsResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipConsensus(dAtA[iNdEx:])
|
||||
|
||||
@ -29,6 +29,89 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// QueryCometInfoRequest defines the request type for querying x/consensus comet info.
|
||||
type QueryGetCometInfoRequest struct {
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) Reset() { *m = QueryGetCometInfoRequest{} }
|
||||
func (m *QueryGetCometInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetCometInfoRequest) ProtoMessage() {}
|
||||
func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{0}
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetCometInfoRequest.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 *QueryGetCometInfoRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetCometInfoRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetCometInfoRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetCometInfoRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryCometInfoResponse defines the response type for querying x/consensus comet info.
|
||||
type QueryGetCometInfoResponse struct {
|
||||
// comet_info is the comet info of the x/consensus module.
|
||||
CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) Reset() { *m = QueryGetCometInfoResponse{} }
|
||||
func (m *QueryGetCometInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetCometInfoResponse) ProtoMessage() {}
|
||||
func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{1}
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetCometInfoResponse.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 *QueryGetCometInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetCometInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetCometInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetCometInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetCometInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetCometInfoResponse) GetCometInfo() *CometInfo {
|
||||
if m != nil {
|
||||
return m.CometInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/consensus parameters.
|
||||
type QueryParamsRequest struct {
|
||||
}
|
||||
@ -37,7 +120,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_bf54d1e5df04cee9, []int{0}
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{2}
|
||||
}
|
||||
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -78,7 +161,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_bf54d1e5df04cee9, []int{1}
|
||||
return fileDescriptor_bf54d1e5df04cee9, []int{3}
|
||||
}
|
||||
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -115,6 +198,8 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryGetCometInfoRequest)(nil), "cosmos.consensus.v1.QueryGetCometInfoRequest")
|
||||
proto.RegisterType((*QueryGetCometInfoResponse)(nil), "cosmos.consensus.v1.QueryGetCometInfoResponse")
|
||||
proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest")
|
||||
proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse")
|
||||
}
|
||||
@ -122,24 +207,29 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) }
|
||||
|
||||
var fileDescriptor_bf54d1e5df04cee9 = []byte{
|
||||
// 271 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce,
|
||||
0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4,
|
||||
0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0,
|
||||
0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c,
|
||||
0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x68, 0x91,
|
||||
0x92, 0x4b, 0xce, 0xcf, 0x4d, 0x2d, 0x49, 0x4a, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x05, 0x9b,
|
||||
0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x95, 0x57, 0x12, 0xe1, 0x12, 0x0a, 0x04, 0xd9, 0x10, 0x00,
|
||||
0x16, 0x0c, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0x0a, 0xe4, 0x12, 0x46, 0x11, 0x2d, 0x2e,
|
||||
0x00, 0xd9, 0x28, 0x64, 0xc5, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4,
|
||||
0xa4, 0x07, 0x33, 0x5d, 0x0f, 0x6c, 0xba, 0x5e, 0x99, 0xa1, 0x9e, 0x33, 0xcc, 0x6d, 0x50, 0xbd,
|
||||
0x50, 0x1d, 0x46, 0x5d, 0x8c, 0x5c, 0xac, 0x60, 0x33, 0x85, 0x1a, 0x18, 0xb9, 0xd8, 0x20, 0x92,
|
||||
0x42, 0xea, 0x7a, 0x58, 0x7c, 0xa4, 0x87, 0xe9, 0x20, 0x29, 0x0d, 0xc2, 0x0a, 0x21, 0x6e, 0x54,
|
||||
0x52, 0x6e, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xac, 0x90, 0xb4, 0x3e, 0xb6, 0xd0, 0x84, 0x38, 0xc6,
|
||||
0xc9, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0,
|
||||
0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xe4, 0x20, 0xba, 0x8a,
|
||||
0x53, 0xb2, 0xf5, 0x32, 0xf3, 0xf5, 0x2b, 0x90, 0x74, 0x83, 0x7d, 0x98, 0xc4, 0x06, 0x0e, 0x36,
|
||||
0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xcb, 0xf0, 0x2b, 0xac, 0x01, 0x00, 0x00,
|
||||
// 342 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc3, 0x30,
|
||||
0x10, 0x85, 0x6b, 0x24, 0x2a, 0x61, 0x98, 0x5c, 0x86, 0x12, 0xc0, 0xa0, 0x74, 0xa0, 0x0b, 0xb6,
|
||||
0x5a, 0x16, 0x84, 0xc4, 0x02, 0x03, 0x62, 0xa3, 0x8c, 0x5d, 0x50, 0x1a, 0xdc, 0x2a, 0x82, 0xf8,
|
||||
0xd2, 0xda, 0xad, 0xe8, 0x86, 0xf8, 0x05, 0x48, 0xfc, 0x29, 0xc6, 0x4a, 0x2c, 0x8c, 0x28, 0xe1,
|
||||
0x4f, 0xb0, 0xa1, 0xd8, 0x09, 0x2d, 0xc2, 0x08, 0xb6, 0x28, 0xf7, 0xee, 0xbd, 0xef, 0x5d, 0x82,
|
||||
0x77, 0x42, 0x50, 0x31, 0x28, 0x1e, 0x82, 0x54, 0x42, 0xaa, 0xb1, 0xe2, 0x93, 0x16, 0x1f, 0x8e,
|
||||
0xc5, 0x68, 0xca, 0x92, 0x11, 0x68, 0x20, 0x35, 0x2b, 0x60, 0x5f, 0x02, 0x36, 0x69, 0x79, 0x5b,
|
||||
0x03, 0x80, 0xc1, 0xad, 0xe0, 0x41, 0x12, 0xf1, 0x40, 0x4a, 0xd0, 0x81, 0x8e, 0x40, 0x2a, 0xbb,
|
||||
0xe2, 0xd1, 0x10, 0x62, 0xa1, 0x7b, 0x7d, 0xcd, 0xf5, 0x34, 0x11, 0xc6, 0x31, 0x09, 0x46, 0x41,
|
||||
0x5c, 0xce, 0x1b, 0xae, 0xcc, 0xb9, 0xbf, 0x11, 0xf9, 0x1e, 0xae, 0x77, 0x72, 0x8c, 0x33, 0xa1,
|
||||
0x4f, 0x73, 0xbb, 0x73, 0xd9, 0x87, 0x4b, 0x31, 0x1c, 0x0b, 0xa5, 0xfd, 0x2e, 0xde, 0x70, 0xcc,
|
||||
0x54, 0x92, 0x5b, 0x90, 0x63, 0x8c, 0x4d, 0xfe, 0x55, 0x24, 0xfb, 0x50, 0x47, 0xbb, 0xa8, 0xb9,
|
||||
0xda, 0xa6, 0xcc, 0xd1, 0x82, 0xcd, 0x77, 0x57, 0xc2, 0xf2, 0xd1, 0x5f, 0xc7, 0xc4, 0x78, 0x5f,
|
||||
0x18, 0xe2, 0x32, 0xb1, 0x83, 0x6b, 0xdf, 0xde, 0x16, 0x59, 0x47, 0xb8, 0x6a, 0x9b, 0x15, 0x39,
|
||||
0x3e, 0x2b, 0xab, 0x33, 0x53, 0xdd, 0xa6, 0x14, 0x91, 0xc5, 0x6e, 0xb1, 0xd1, 0xfe, 0x40, 0x78,
|
||||
0xd9, 0x78, 0x92, 0x7b, 0x84, 0xab, 0x76, 0x48, 0xf6, 0x9c, 0xa0, 0x3f, 0x81, 0xbc, 0xe6, 0xdf,
|
||||
0x42, 0xcb, 0xe8, 0x37, 0x1e, 0x5e, 0xde, 0x9f, 0x96, 0xb6, 0xc9, 0x26, 0x77, 0x9d, 0xdd, 0xc2,
|
||||
0x90, 0x18, 0xaf, 0x2d, 0x1e, 0x93, 0xec, 0xff, 0x6e, 0xef, 0xf8, 0x20, 0x1e, 0xfb, 0xaf, 0xdc,
|
||||
0x32, 0x9d, 0x1c, 0x3e, 0xa7, 0x14, 0xcd, 0x52, 0x8a, 0xde, 0x52, 0x8a, 0x1e, 0x33, 0x5a, 0x99,
|
||||
0x65, 0xb4, 0xf2, 0x9a, 0xd1, 0x4a, 0x97, 0x5a, 0x23, 0x75, 0x7d, 0xc3, 0x22, 0xe0, 0x77, 0x0b,
|
||||
0xb0, 0xe6, 0xa0, 0xbd, 0xaa, 0xf9, 0x3b, 0x0e, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xd8,
|
||||
0xe1, 0x00, 0xb8, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -156,6 +246,8 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type QueryClient interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -175,10 +267,21 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) {
|
||||
out := new(QueryGetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/GetCometInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Params queries the parameters of x/consensus module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// CometInfo queries the comet info of x/consensus module.
|
||||
GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@ -188,6 +291,9 @@ type UnimplementedQueryServer struct {
|
||||
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) GetCometInfo(ctx context.Context, req *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@ -211,6 +317,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetCometInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.consensus.v1.Query/GetCometInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.consensus.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@ -219,11 +343,73 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCometInfo",
|
||||
Handler: _Query_GetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/query.proto",
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) 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 *QueryGetCometInfoRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) 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 *QueryGetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.CometInfo != nil {
|
||||
{
|
||||
size, err := m.CometInfo.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 *QueryParamsRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@ -293,6 +479,28 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetCometInfoResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.CometInfo != nil {
|
||||
l = m.CometInfo.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryParamsRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@ -321,6 +529,142 @@ func sovQuery(x uint64) (n int) {
|
||||
func sozQuery(x uint64) (n int) {
|
||||
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *QueryGetCometInfoRequest) 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: QueryGetCometInfoRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
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 *QueryGetCometInfoResponse) 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: QueryGetCometInfoResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CometInfo", 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.CometInfo == nil {
|
||||
m.CometInfo = &CometInfo{}
|
||||
}
|
||||
if err := m.CometInfo.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 *QueryParamsRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -6,6 +6,7 @@ package types
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
v1 "github.com/cometbft/cometbft/api/cometbft/types/v1"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
@ -170,47 +171,177 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgCometInfo is the Msg/CometInfo request type.
|
||||
type MsgSetCometInfo struct {
|
||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
// evidence is the misbehaviour evidence to submit.
|
||||
Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
// validators_hash is the hash of the current validator set.
|
||||
ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
|
||||
// proposer_address is the address of the current proposer.
|
||||
ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
|
||||
// last_commit is the last commit info.
|
||||
LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) Reset() { *m = MsgSetCometInfo{} }
|
||||
func (m *MsgSetCometInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSetCometInfo) ProtoMessage() {}
|
||||
func (*MsgSetCometInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2135c60575ab504d, []int{2}
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSetCometInfo.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 *MsgSetCometInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSetCometInfo.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSetCometInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSetCometInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSetCometInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgSetCometInfo) GetAuthority() string {
|
||||
if m != nil {
|
||||
return m.Authority
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetValidatorsHash() []byte {
|
||||
if m != nil {
|
||||
return m.ValidatorsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetProposerAddress() []byte {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo {
|
||||
if m != nil {
|
||||
return m.LastCommit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MsgCometInfoResponse defines the response
|
||||
type MsgSetCometInfoResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) Reset() { *m = MsgSetCometInfoResponse{} }
|
||||
func (m *MsgSetCometInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSetCometInfoResponse) ProtoMessage() {}
|
||||
func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2135c60575ab504d, []int{3}
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSetCometInfoResponse.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 *MsgSetCometInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSetCometInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSetCometInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSetCometInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams")
|
||||
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse")
|
||||
proto.RegisterType((*MsgSetCometInfo)(nil), "cosmos.consensus.v1.MsgSetCometInfo")
|
||||
proto.RegisterType((*MsgSetCometInfoResponse)(nil), "cosmos.consensus.v1.MsgSetCometInfoResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) }
|
||||
|
||||
var fileDescriptor_2135c60575ab504d = []byte{
|
||||
// 498 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40,
|
||||
0x18, 0xc6, 0x1b, 0xb7, 0xdd, 0xb5, 0xa3, 0xb0, 0x98, 0x2a, 0x3b, 0x5b, 0x74, 0xa8, 0x45, 0x64,
|
||||
0x29, 0x76, 0xb2, 0xad, 0xeb, 0x5f, 0x10, 0xdc, 0x88, 0xa2, 0x87, 0x45, 0xc9, 0xb2, 0x1e, 0xbc,
|
||||
0xc8, 0x34, 0x99, 0xcd, 0x86, 0x6e, 0x32, 0x21, 0x33, 0x8d, 0xdb, 0x9b, 0x08, 0x5e, 0x3c, 0xf9,
|
||||
0x45, 0x84, 0x1e, 0xf6, 0x43, 0x88, 0xa7, 0xc5, 0x93, 0x78, 0x92, 0xf6, 0xd0, 0xaf, 0x21, 0x9d,
|
||||
0x99, 0x6c, 0xdc, 0x9a, 0xc2, 0x5e, 0x02, 0xc9, 0xf3, 0xfc, 0x9e, 0x27, 0xf3, 0xe6, 0x0d, 0xb8,
|
||||
0xee, 0x32, 0x1e, 0x32, 0x6e, 0xb9, 0x2c, 0xe2, 0x34, 0xe2, 0x03, 0x6e, 0xa5, 0x1d, 0x4b, 0x1c,
|
||||
0xe1, 0x38, 0x61, 0x82, 0x99, 0x35, 0xa5, 0xe2, 0x53, 0x15, 0xa7, 0x9d, 0xfa, 0x15, 0x12, 0x06,
|
||||
0x11, 0xb3, 0xe4, 0x55, 0xf9, 0xea, 0xeb, 0xca, 0xf7, 0x5e, 0xde, 0x59, 0x1a, 0x52, 0xd2, 0x9a,
|
||||
0x2e, 0x08, 0xb9, 0x3f, 0x8b, 0x0e, 0xb9, 0xaf, 0x05, 0xe4, 0xb2, 0x90, 0x8a, 0xde, 0xbe, 0xb0,
|
||||
0xc4, 0x30, 0xa6, 0xb2, 0x37, 0x26, 0x09, 0x09, 0x35, 0xd8, 0xfc, 0x56, 0x06, 0xab, 0x3b, 0xdc,
|
||||
0xdf, 0x8b, 0x3d, 0x22, 0xe8, 0x1b, 0xa9, 0x98, 0xf7, 0x41, 0x95, 0x0c, 0xc4, 0x01, 0x4b, 0x02,
|
||||
0x31, 0x84, 0x46, 0xc3, 0xd8, 0xa8, 0xda, 0xf0, 0xe7, 0x71, 0xfb, 0xaa, 0x6e, 0xdc, 0xf6, 0xbc,
|
||||
0x84, 0x72, 0xbe, 0x2b, 0x92, 0x20, 0xf2, 0x9d, 0xdc, 0x6a, 0x6e, 0x81, 0x4a, 0xef, 0x90, 0xb9,
|
||||
0x7d, 0x78, 0xa1, 0x61, 0x6c, 0x5c, 0xea, 0x22, 0x9c, 0x75, 0x63, 0xd9, 0x8d, 0xd3, 0x0e, 0xb6,
|
||||
0x67, 0xba, 0xaa, 0x71, 0x94, 0xd9, 0x7c, 0x02, 0x2e, 0xd2, 0x34, 0xf0, 0x68, 0xe4, 0x52, 0xb8,
|
||||
0x24, 0xc1, 0x9b, 0x05, 0xe0, 0x73, 0x6d, 0xd1, 0xec, 0x29, 0x62, 0x3e, 0x05, 0xd5, 0x94, 0x1c,
|
||||
0x06, 0x1e, 0x11, 0x2c, 0x81, 0x65, 0xc9, 0x37, 0x0b, 0xf8, 0xb7, 0x99, 0x47, 0x07, 0xe4, 0x90,
|
||||
0xf9, 0x12, 0x94, 0x49, 0xcf, 0x0d, 0x60, 0x45, 0xc2, 0x37, 0x0a, 0xe0, 0x6d, 0xfb, 0xd9, 0x2b,
|
||||
0xc5, 0xd9, 0xd7, 0x7e, 0x1f, 0xb7, 0x57, 0xd5, 0x20, 0xda, 0xdc, 0xeb, 0x37, 0x36, 0xf1, 0xbd,
|
||||
0x4d, 0x68, 0x38, 0x32, 0xc1, 0xdc, 0x03, 0x55, 0x3e, 0x8c, 0xdc, 0x83, 0x84, 0x45, 0x43, 0xb8,
|
||||
0xbc, 0xf0, 0x5d, 0x76, 0x33, 0x8f, 0xce, 0xac, 0xfd, 0x9f, 0xd9, 0x71, 0xf2, 0x24, 0xf3, 0x35,
|
||||
0x58, 0xd9, 0xa7, 0x44, 0x0c, 0x12, 0x0a, 0x57, 0x64, 0x68, 0xa3, 0x20, 0xf4, 0x85, 0x72, 0x2c,
|
||||
0x8e, 0xec, 0x3a, 0x59, 0xca, 0xe3, 0x47, 0x9f, 0xa6, 0xa3, 0x56, 0xfe, 0xe1, 0xbe, 0x4c, 0x47,
|
||||
0xad, 0xdb, 0xb9, 0xd9, 0x3a, 0xfa, 0x67, 0x4f, 0xe7, 0x76, 0xa3, 0xb9, 0x0e, 0xd6, 0xe6, 0x1e,
|
||||
0x39, 0x94, 0xc7, 0x33, 0x7b, 0xf7, 0xb3, 0x01, 0x96, 0x76, 0xb8, 0x6f, 0x7e, 0x00, 0x97, 0xcf,
|
||||
0xac, 0xd3, 0x2d, 0x5c, 0xb0, 0xdf, 0x78, 0x2e, 0xa5, 0x7e, 0xe7, 0x3c, 0xae, 0xac, 0xab, 0x59,
|
||||
0xfb, 0x31, 0x7f, 0xbe, 0xad, 0x07, 0xf5, 0xca, 0xc7, 0xe9, 0xa8, 0x65, 0xd8, 0x0f, 0xbf, 0x8f,
|
||||
0x91, 0x71, 0x32, 0x46, 0xc6, 0x9f, 0x31, 0x32, 0xbe, 0x4e, 0x50, 0xe9, 0x64, 0x82, 0x4a, 0xbf,
|
||||
0x26, 0xa8, 0xf4, 0x0e, 0x29, 0x82, 0x7b, 0x7d, 0x1c, 0xb0, 0x33, 0xc7, 0x94, 0x63, 0xec, 0x2d,
|
||||
0xcb, 0x7f, 0xe2, 0xee, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xb2, 0x37, 0x1a, 0xaf, 0x03,
|
||||
0x00, 0x00,
|
||||
// 649 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x4f, 0xd4, 0x40,
|
||||
0x18, 0xa6, 0x7c, 0xba, 0xc3, 0xc6, 0xd5, 0x41, 0x43, 0xd9, 0x60, 0xb3, 0xae, 0x46, 0x91, 0x48,
|
||||
0xcb, 0x22, 0xa2, 0x90, 0x90, 0xc8, 0x12, 0x0d, 0x1c, 0x88, 0xa6, 0x04, 0x0f, 0x5e, 0x36, 0xd3,
|
||||
0x76, 0xd8, 0x36, 0xd0, 0x4e, 0xd3, 0x19, 0x2a, 0x7b, 0x33, 0x1e, 0x3d, 0xf9, 0x47, 0x4c, 0x38,
|
||||
0xf0, 0x23, 0x8c, 0x17, 0x89, 0x27, 0xe3, 0xc9, 0xec, 0x1e, 0x36, 0xfe, 0x0b, 0xd3, 0x99, 0x7e,
|
||||
0xec, 0x47, 0x37, 0x31, 0x5e, 0x9a, 0x74, 0xde, 0xe7, 0x79, 0xde, 0x77, 0x9e, 0xf7, 0x69, 0xc1,
|
||||
0xa2, 0x49, 0xa8, 0x4b, 0xa8, 0x66, 0x12, 0x8f, 0x62, 0x8f, 0x9e, 0x51, 0x2d, 0xac, 0x69, 0xec,
|
||||
0x5c, 0xf5, 0x03, 0xc2, 0x08, 0x9c, 0x13, 0x55, 0x35, 0xad, 0xaa, 0x61, 0xad, 0x7c, 0x13, 0xb9,
|
||||
0x8e, 0x47, 0x34, 0xfe, 0x14, 0xb8, 0xf2, 0x82, 0xc0, 0x35, 0xf8, 0x9b, 0x16, 0x93, 0x44, 0x69,
|
||||
0x3e, 0x6e, 0xe0, 0xd2, 0x66, 0x24, 0xed, 0xd2, 0x66, 0x5c, 0x50, 0x4c, 0xe2, 0x62, 0x66, 0x1c,
|
||||
0x33, 0x8d, 0xb5, 0x7c, 0xcc, 0xfb, 0xfa, 0x28, 0x40, 0x6e, 0x42, 0x5c, 0x4c, 0xeb, 0xc8, 0x30,
|
||||
0x1d, 0x3e, 0x56, 0x84, 0x13, 0xd5, 0xea, 0x97, 0x49, 0x50, 0x3a, 0xa0, 0xcd, 0x23, 0xdf, 0x42,
|
||||
0x0c, 0xbf, 0xe1, 0x3c, 0xb8, 0x01, 0x0a, 0xe8, 0x8c, 0xd9, 0x24, 0x70, 0x58, 0x4b, 0x96, 0x2a,
|
||||
0xd2, 0x52, 0xa1, 0x2e, 0xff, 0xb8, 0x5c, 0xb9, 0x15, 0xcf, 0xb3, 0x63, 0x59, 0x01, 0xa6, 0xf4,
|
||||
0x90, 0x05, 0x8e, 0xd7, 0xd4, 0x33, 0x28, 0x5c, 0x07, 0x53, 0xc6, 0x29, 0x31, 0x4f, 0xe4, 0xf1,
|
||||
0x8a, 0xb4, 0x34, 0xbb, 0xa6, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x6b, 0x6a, 0x3d, 0xaa, 0x8b,
|
||||
0x36, 0xba, 0x00, 0xc3, 0x6d, 0x70, 0x0d, 0x87, 0x8e, 0x85, 0x3d, 0x13, 0xcb, 0x13, 0x9c, 0x78,
|
||||
0x37, 0x87, 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x42, 0x88, 0x4e, 0x1d, 0x0b,
|
||||
0x31, 0x12, 0xc8, 0x93, 0x9c, 0x5f, 0xcd, 0xe1, 0xbf, 0x4d, 0x30, 0xb1, 0x40, 0x46, 0x82, 0x7b,
|
||||
0x60, 0x32, 0x72, 0x46, 0x9e, 0xe2, 0xe4, 0x3b, 0x39, 0xe4, 0x9d, 0xfa, 0xee, 0xbe, 0xe0, 0xd5,
|
||||
0x6f, 0xff, 0xba, 0x5c, 0x29, 0x09, 0x23, 0x56, 0xa8, 0x75, 0x52, 0x59, 0x55, 0x9f, 0xae, 0xca,
|
||||
0x92, 0xce, 0x15, 0xe0, 0x11, 0x28, 0xd0, 0x96, 0x67, 0xda, 0x01, 0xf1, 0x5a, 0xf2, 0xf4, 0xc8,
|
||||
0x59, 0x0e, 0x13, 0x4c, 0xac, 0x39, 0x37, 0xac, 0x59, 0xd3, 0x33, 0x25, 0xf8, 0x1a, 0xcc, 0x1c,
|
||||
0x63, 0xc4, 0xce, 0x02, 0x2c, 0xcf, 0x70, 0xd1, 0x4a, 0x8e, 0xe8, 0x2b, 0x81, 0x18, 0x2d, 0xb9,
|
||||
0xa6, 0x27, 0x2a, 0x5b, 0x9b, 0x1f, 0xbb, 0x17, 0xcb, 0xd9, 0xe2, 0x3e, 0x75, 0x2f, 0x96, 0x1f,
|
||||
0x64, 0x60, 0xed, 0xbc, 0x27, 0xc5, 0x03, 0xd9, 0xa8, 0x2e, 0x80, 0xf9, 0x81, 0x23, 0x1d, 0x53,
|
||||
0x3f, 0x82, 0x57, 0xbf, 0x8f, 0xf3, 0x28, 0x1d, 0x62, 0xb6, 0x1b, 0x4d, 0xb7, 0xef, 0x1d, 0x93,
|
||||
0xff, 0x8e, 0xd2, 0x66, 0x4f, 0x28, 0xc6, 0x2b, 0x13, 0xfd, 0x7b, 0x89, 0xbc, 0x8e, 0xae, 0x7c,
|
||||
0xe0, 0x50, 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x13, 0x88, 0x87, 0xa0, 0x94, 0xee, 0x96, 0x36,
|
||||
0x6c, 0x44, 0x6d, 0x1e, 0xab, 0xa2, 0x7e, 0x3d, 0x3b, 0xde, 0x43, 0xd4, 0x86, 0x8f, 0xc0, 0x0d,
|
||||
0x3f, 0x20, 0x3e, 0xa1, 0x38, 0x68, 0x20, 0x31, 0x08, 0x0f, 0x50, 0x51, 0x2f, 0x25, 0xe7, 0xf1,
|
||||
0x7c, 0x70, 0x1b, 0xcc, 0x9e, 0x22, 0xca, 0x1a, 0x26, 0x71, 0x5d, 0x87, 0xc5, 0x49, 0x59, 0x1c,
|
||||
0x9e, 0x68, 0x97, 0xd7, 0xa3, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf7, 0xad, 0x8d, 0x61, 0xbf, 0xef,
|
||||
0x8d, 0xf6, 0x3b, 0x75, 0x2f, 0x36, 0xbb, 0xd7, 0xd0, 0xc4, 0xec, 0xb5, 0x3f, 0x12, 0x98, 0x38,
|
||||
0xa0, 0x4d, 0xf8, 0x1e, 0x14, 0xfb, 0xbe, 0xdd, 0xfb, 0x6a, 0xce, 0xaf, 0x46, 0x1d, 0x58, 0x59,
|
||||
0xf9, 0xf1, 0xbf, 0xa0, 0xd2, 0xc5, 0xce, 0x7d, 0x1b, 0x0c, 0xd3, 0xfa, 0x33, 0x68, 0x80, 0x62,
|
||||
0xdf, 0xa6, 0x47, 0x36, 0xee, 0x45, 0x8d, 0x6e, 0x9c, 0x77, 0xc9, 0xf2, 0xd4, 0x87, 0xee, 0xc5,
|
||||
0xb2, 0x54, 0x7f, 0xfe, 0xb5, 0xad, 0x48, 0x57, 0x6d, 0x45, 0xfa, 0xdd, 0x56, 0xa4, 0xcf, 0x1d,
|
||||
0x65, 0xec, 0xaa, 0xa3, 0x8c, 0xfd, 0xec, 0x28, 0x63, 0xef, 0x14, 0xa1, 0x46, 0xad, 0x13, 0xd5,
|
||||
0x21, 0x7d, 0x3e, 0xf2, 0xef, 0xc2, 0x98, 0xe6, 0x3f, 0xb9, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff,
|
||||
0xff, 0x65, 0xd1, 0xd8, 0x21, 0x9e, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -228,6 +359,8 @@ type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -247,11 +380,22 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) {
|
||||
out := new(MsgSetCometInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/SetCometInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
||||
// The authority is defined in the keeper.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// SetCometInfo defines how to set the comet info for the x/consensus module.
|
||||
SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||
@ -261,6 +405,9 @@ type UnimplementedMsgServer struct {
|
||||
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) SetCometInfo(ctx context.Context, req *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||
@ -284,6 +431,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSetCometInfo)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.consensus.v1.Msg/SetCometInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.consensus.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
@ -292,6 +457,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetCometInfo",
|
||||
Handler: _Msg_SetCometInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/consensus/v1/tx.proto",
|
||||
@ -422,6 +591,99 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) 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 *MsgSetCometInfo) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.LastCommit != nil {
|
||||
{
|
||||
size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.ValidatorsHash) > 0 {
|
||||
i -= len(m.ValidatorsHash)
|
||||
copy(dAtA[i:], m.ValidatorsHash)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorsHash)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Evidence) > 0 {
|
||||
for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(m.Authority) > 0 {
|
||||
i -= len(m.Authority)
|
||||
copy(dAtA[i:], m.Authority)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) 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 *MsgSetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovTx(v)
|
||||
base := offset
|
||||
@ -479,6 +741,46 @@ func (m *MsgUpdateParamsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfo) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Authority)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if len(m.Evidence) > 0 {
|
||||
for _, e := range m.Evidence {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
}
|
||||
l = len(m.ValidatorsHash)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.LastCommit != nil {
|
||||
l = m.LastCommit.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSetCometInfoResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func sovTx(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@ -833,6 +1135,276 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSetCometInfo) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSetCometInfo: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSetCometInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authority = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Evidence = append(m.Evidence, &v11.Misbehavior{})
|
||||
if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ValidatorsHash == nil {
|
||||
m.ValidatorsHash = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.LastCommit == nil {
|
||||
m.LastCommit = &v11.CommitInfo{}
|
||||
}
|
||||
if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSetCometInfoResponse) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgSetCometInfoResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipTx(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user