types

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: GPL-3.0 Imports: 44 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the name of the staking module
	ModuleName = "stake"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// RouterKey is the msg router key for the stake module
	RouterKey = ModuleName

	// DefaultLogIndexUnit represents the default unit for txHash + logIndex
	DefaultLogIndexUnit = 100000
)
View Source
const (
	MaxTotalVotingPower      = int64(math.MaxInt64) / 8
	PriorityWindowSizeFactor = 2
)

Variables

View Source
var (
	// ErrInvalidMsg is returned if the message is invalid
	ErrInvalidMsg = errorsmod.Register(ModuleName, 2, "invalid message")

	// ErrOldTx is returned if the respective stake related tx from L1 has already been processed
	ErrOldTx = errorsmod.Register(ModuleName, 3, "old tx, already processed")

	// ErrNoValidator is returned if the respective validator doesn't exist
	ErrNoValidator = errorsmod.Register(ModuleName, 4, "no respective validator found")

	// ErrNoSignerChange returned when the new signer address is same as old one
	ErrNoSignerChange = errorsmod.Register(ModuleName, 5, "new singer is same as old one")

	// ErrValUnbonded is returned when the respective validator is already unbonded
	ErrValUnbonded = errorsmod.Register(ModuleName, 6, "validator already unbonded")

	// ErrInvalidNonce is returned when the nonce is wrong
	ErrInvalidNonce = errorsmod.Register(ModuleName, 7, "invalid nonce")
)
View Source
var (
	EventTypeValidatorJoin = "validator-join"
	EventTypeSignerUpdate  = "signer-update"
	EventTypeStakeUpdate   = "stake-update"
	EventTypeValidatorExit = "validator-exit"

	AttributeKeySigner         = "signer"
	AttributeKeyValidatorID    = "validator-id"
	AttributeKeyValidatorNonce = "validator-nonce"

	AttributeValueCategory = ModuleName
)

stake module event types

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ValidatorsKey                   = []byte{0x21} // prefix for each key to a validator
	ValidatorSetKey                 = []byte{0x22} // prefix for each key for validator map
	CurrentValidatorSetKey          = []byte{0x23} // key to store current validator set
	StakeSequenceKey                = []byte{0x24} // prefix for each key for staking sequence map
	SignerKey                       = []byte{0x25} // prefix for signer address for signer map
	CurrentMilestoneValidatorSetKey = []byte{0x25} // Key to store current validator set for milestone
	LastBlockTxsKey                 = []byte{0x26} // key to store last block's txs
	PreviousBlockValidatorSetKey    = []byte{0x27} // key to store the previous block's validator set
)
View Source
var (
	ErrInvalidLengthLastBlockTxs        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLastBlockTxs          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLastBlockTxs = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthValidator        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowValidator          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EmptyPubKey = PubKey{}

EmptyPubKey represents an empty pub key

View Source
var Secp256k1Type = secp256k1.GenPrivKey().PubKey().Type()

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the x/stake interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/stake interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RegisterSideMsgServer

func RegisterSideMsgServer(sideCfg sidetxs.SideTxConfigurator, srv sidetxs.SideMsgServer)

func SetGenesisStateToAppState

func SetGenesisStateToAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage, validators []*Validator, currentValSet ValidatorSet) (map[string]json.RawMessage, error)

SetGenesisStateToAppState sets x/stake GenesisState into raw application genesis state.

Types

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
}

type CheckpointKeeper

type CheckpointKeeper interface {
	GetAckCount(ctx context.Context) (uint64, error)
}

CheckpointKeeper defines the checkpoint keeper contract used by x/stake module

type GenesisState

type GenesisState struct {
	Validators          []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
	CurrentValidatorSet ValidatorSet `protobuf:"bytes,2,opt,name=current_validator_set,json=currentValidatorSet,proto3" json:"current_validator_set"`
	StakingSequences    []string     `protobuf:"bytes,3,rep,name=staking_sequences,json=stakingSequences,proto3" json:"staking_sequences,omitempty"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState gets the raw genesis raw message for testing

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns x/stake GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(validators []*Validator,
	currentValSet ValidatorSet,
	stakingSequences []string,
) *GenesisState

NewGenesisState creates a new GenesisState instance

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetCurrentValidatorSet

func (m *GenesisState) GetCurrentValidatorSet() ValidatorSet

func (*GenesisState) GetStakingSequences

func (m *GenesisState) GetStakingSequences() []string

func (*GenesisState) GetValidators

func (m *GenesisState) GetValidators() []*Validator

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type LastBlockTxs

type LastBlockTxs struct {
	Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
}

func (*LastBlockTxs) Descriptor

func (*LastBlockTxs) Descriptor() ([]byte, []int)

func (*LastBlockTxs) GetTxs

func (m *LastBlockTxs) GetTxs() [][]byte

func (*LastBlockTxs) Marshal

func (m *LastBlockTxs) Marshal() (dAtA []byte, err error)

func (*LastBlockTxs) MarshalTo

func (m *LastBlockTxs) MarshalTo(dAtA []byte) (int, error)

func (*LastBlockTxs) MarshalToSizedBuffer

func (m *LastBlockTxs) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LastBlockTxs) ProtoMessage

func (*LastBlockTxs) ProtoMessage()

func (*LastBlockTxs) Reset

func (m *LastBlockTxs) Reset()

func (*LastBlockTxs) Size

func (m *LastBlockTxs) Size() (n int)

func (*LastBlockTxs) String

func (m *LastBlockTxs) String() string

func (*LastBlockTxs) Unmarshal

func (m *LastBlockTxs) Unmarshal(dAtA []byte) error

func (*LastBlockTxs) XXX_DiscardUnknown

func (m *LastBlockTxs) XXX_DiscardUnknown()

func (*LastBlockTxs) XXX_Marshal

func (m *LastBlockTxs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LastBlockTxs) XXX_Merge

func (m *LastBlockTxs) XXX_Merge(src proto.Message)

func (*LastBlockTxs) XXX_Size

func (m *LastBlockTxs) XXX_Size() int

func (*LastBlockTxs) XXX_Unmarshal

func (m *LastBlockTxs) XXX_Unmarshal(b []byte) error

type MinimalVal

type MinimalVal struct {
	ID          uint64         `json:"ID"`
	VotingPower uint64         `json:"power"` // TODO add 10^-18 here so that we don't overflow easily
	Signer      common.Address `json:"signer"`
}

MinimalVal is the minimal validator representation Used to send validator information to bor validator contract

type MsgClient

type MsgClient interface {
	// ValidatorJoin defines a method for a new validator to join
	ValidatorJoin(ctx context.Context, in *MsgValidatorJoin, opts ...grpc.CallOption) (*MsgValidatorJoinResponse, error)
	// StakeUpdate defines a method for updating an existing validator's stake.
	StakeUpdate(ctx context.Context, in *MsgStakeUpdate, opts ...grpc.CallOption) (*MsgStakeUpdateResponse, error)
	// SignerUpdate defines a method for updating an existing validator's signer.
	SignerUpdate(ctx context.Context, in *MsgSignerUpdate, opts ...grpc.CallOption) (*MsgSignerUpdateResponse, error)
	// ValidatorExit defines a method for exiting an existing validator
	ValidatorExit(ctx context.Context, in *MsgValidatorExit, opts ...grpc.CallOption) (*MsgValidatorExitResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// ValidatorJoin defines a method for a new validator to join
	ValidatorJoin(context.Context, *MsgValidatorJoin) (*MsgValidatorJoinResponse, error)
	// StakeUpdate defines a method for updating an existing validator's stake.
	StakeUpdate(context.Context, *MsgStakeUpdate) (*MsgStakeUpdateResponse, error)
	// SignerUpdate defines a method for updating an existing validator's signer.
	SignerUpdate(context.Context, *MsgSignerUpdate) (*MsgSignerUpdateResponse, error)
	// ValidatorExit defines a method for exiting an existing validator
	ValidatorExit(context.Context, *MsgValidatorExit) (*MsgValidatorExitResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSignerUpdate

type MsgSignerUpdate struct {
	From            string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	ValId           uint64 `protobuf:"varint,2,opt,name=val_id,json=valId,proto3" json:"val_id,omitempty"`
	NewSignerPubKey []byte `protobuf:"bytes,3,opt,name=new_signer_pub_key,json=newSignerPubKey,proto3" json:"new_signer_pub_key,omitempty"`
	TxHash          []byte `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	LogIndex        uint64 `protobuf:"varint,5,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
	BlockNumber     uint64 `protobuf:"varint,6,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	Nonce           uint64 `protobuf:"varint,7,opt,name=nonce,proto3" json:"nonce,omitempty"`
}

func NewMsgSignerUpdate

func NewMsgSignerUpdate(from string, id uint64,
	pubKey []byte, txHash []byte, logIndex uint64,
	blockNumber uint64, nonce uint64,
) (*MsgSignerUpdate, error)

NewMsgSignerUpdate creates a new MsgSignerUpdate instance.

func (*MsgSignerUpdate) Descriptor

func (*MsgSignerUpdate) Descriptor() ([]byte, []int)

func (*MsgSignerUpdate) GetBlockNumber

func (m *MsgSignerUpdate) GetBlockNumber() uint64

func (*MsgSignerUpdate) GetFrom

func (m *MsgSignerUpdate) GetFrom() string

func (*MsgSignerUpdate) GetLogIndex

func (m *MsgSignerUpdate) GetLogIndex() uint64

func (*MsgSignerUpdate) GetNewSignerPubKey

func (m *MsgSignerUpdate) GetNewSignerPubKey() []byte

func (*MsgSignerUpdate) GetNonce

func (m *MsgSignerUpdate) GetNonce() uint64

func (*MsgSignerUpdate) GetTxHash

func (m *MsgSignerUpdate) GetTxHash() []byte

func (*MsgSignerUpdate) GetValId

func (m *MsgSignerUpdate) GetValId() uint64

func (*MsgSignerUpdate) Marshal

func (m *MsgSignerUpdate) Marshal() (dAtA []byte, err error)

func (*MsgSignerUpdate) MarshalTo

func (m *MsgSignerUpdate) MarshalTo(dAtA []byte) (int, error)

func (*MsgSignerUpdate) MarshalToSizedBuffer

func (m *MsgSignerUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSignerUpdate) ProtoMessage

func (*MsgSignerUpdate) ProtoMessage()

func (*MsgSignerUpdate) Reset

func (m *MsgSignerUpdate) Reset()

func (*MsgSignerUpdate) Size

func (m *MsgSignerUpdate) Size() (n int)

func (*MsgSignerUpdate) String

func (m *MsgSignerUpdate) String() string

func (*MsgSignerUpdate) Unmarshal

func (m *MsgSignerUpdate) Unmarshal(dAtA []byte) error

func (MsgSignerUpdate) Validate

func (msg MsgSignerUpdate) Validate(ac address.Codec) error

Validate validates the signer update msg before it is executed

func (*MsgSignerUpdate) XXX_DiscardUnknown

func (m *MsgSignerUpdate) XXX_DiscardUnknown()

func (*MsgSignerUpdate) XXX_Marshal

func (m *MsgSignerUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSignerUpdate) XXX_Merge

func (m *MsgSignerUpdate) XXX_Merge(src proto.Message)

func (*MsgSignerUpdate) XXX_Size

func (m *MsgSignerUpdate) XXX_Size() int

func (*MsgSignerUpdate) XXX_Unmarshal

func (m *MsgSignerUpdate) XXX_Unmarshal(b []byte) error

type MsgSignerUpdateResponse

type MsgSignerUpdateResponse struct {
}

func (*MsgSignerUpdateResponse) Descriptor

func (*MsgSignerUpdateResponse) Descriptor() ([]byte, []int)

func (*MsgSignerUpdateResponse) Marshal

func (m *MsgSignerUpdateResponse) Marshal() (dAtA []byte, err error)

func (*MsgSignerUpdateResponse) MarshalTo

func (m *MsgSignerUpdateResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSignerUpdateResponse) MarshalToSizedBuffer

func (m *MsgSignerUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSignerUpdateResponse) ProtoMessage

func (*MsgSignerUpdateResponse) ProtoMessage()

func (*MsgSignerUpdateResponse) Reset

func (m *MsgSignerUpdateResponse) Reset()

func (*MsgSignerUpdateResponse) Size

func (m *MsgSignerUpdateResponse) Size() (n int)

func (*MsgSignerUpdateResponse) String

func (m *MsgSignerUpdateResponse) String() string

func (*MsgSignerUpdateResponse) Unmarshal

func (m *MsgSignerUpdateResponse) Unmarshal(dAtA []byte) error

func (*MsgSignerUpdateResponse) XXX_DiscardUnknown

func (m *MsgSignerUpdateResponse) XXX_DiscardUnknown()

func (*MsgSignerUpdateResponse) XXX_Marshal

func (m *MsgSignerUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSignerUpdateResponse) XXX_Merge

func (m *MsgSignerUpdateResponse) XXX_Merge(src proto.Message)

func (*MsgSignerUpdateResponse) XXX_Size

func (m *MsgSignerUpdateResponse) XXX_Size() int

func (*MsgSignerUpdateResponse) XXX_Unmarshal

func (m *MsgSignerUpdateResponse) XXX_Unmarshal(b []byte) error

type MsgStakeUpdate

type MsgStakeUpdate struct {
	From        string                `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	ValId       uint64                `protobuf:"varint,2,opt,name=val_id,json=valId,proto3" json:"val_id,omitempty"`
	NewAmount   cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=new_amount,json=newAmount,proto3,customtype=cosmossdk.io/math.Int" json:"new_amount"`
	TxHash      []byte                `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	LogIndex    uint64                `protobuf:"varint,5,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
	BlockNumber uint64                `protobuf:"varint,6,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	Nonce       uint64                `protobuf:"varint,7,opt,name=nonce,proto3" json:"nonce,omitempty"`
}

func NewMsgStakeUpdate

func NewMsgStakeUpdate(from string, id uint64,
	newAmount math.Int, txHash []byte, logIndex uint64,
	blockNumber uint64, nonce uint64,
) (*MsgStakeUpdate, error)

NewMsgStakeUpdate creates a new MsgStakeUpdate instance

func (*MsgStakeUpdate) Descriptor

func (*MsgStakeUpdate) Descriptor() ([]byte, []int)

func (*MsgStakeUpdate) GetBlockNumber

func (m *MsgStakeUpdate) GetBlockNumber() uint64

func (*MsgStakeUpdate) GetFrom

func (m *MsgStakeUpdate) GetFrom() string

func (*MsgStakeUpdate) GetLogIndex

func (m *MsgStakeUpdate) GetLogIndex() uint64

func (*MsgStakeUpdate) GetNonce

func (m *MsgStakeUpdate) GetNonce() uint64

func (*MsgStakeUpdate) GetTxHash

func (m *MsgStakeUpdate) GetTxHash() []byte

func (*MsgStakeUpdate) GetValId

func (m *MsgStakeUpdate) GetValId() uint64

func (*MsgStakeUpdate) Marshal

func (m *MsgStakeUpdate) Marshal() (dAtA []byte, err error)

func (*MsgStakeUpdate) MarshalTo

func (m *MsgStakeUpdate) MarshalTo(dAtA []byte) (int, error)

func (*MsgStakeUpdate) MarshalToSizedBuffer

func (m *MsgStakeUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgStakeUpdate) ProtoMessage

func (*MsgStakeUpdate) ProtoMessage()

func (*MsgStakeUpdate) Reset

func (m *MsgStakeUpdate) Reset()

func (*MsgStakeUpdate) Size

func (m *MsgStakeUpdate) Size() (n int)

func (*MsgStakeUpdate) String

func (m *MsgStakeUpdate) String() string

func (*MsgStakeUpdate) Unmarshal

func (m *MsgStakeUpdate) Unmarshal(dAtA []byte) error

func (MsgStakeUpdate) Validate

func (msg MsgStakeUpdate) Validate(ac address.Codec) error

Validate validates the stake update msg before it is executed

func (*MsgStakeUpdate) XXX_DiscardUnknown

func (m *MsgStakeUpdate) XXX_DiscardUnknown()

func (*MsgStakeUpdate) XXX_Marshal

func (m *MsgStakeUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgStakeUpdate) XXX_Merge

func (m *MsgStakeUpdate) XXX_Merge(src proto.Message)

func (*MsgStakeUpdate) XXX_Size

func (m *MsgStakeUpdate) XXX_Size() int

func (*MsgStakeUpdate) XXX_Unmarshal

func (m *MsgStakeUpdate) XXX_Unmarshal(b []byte) error

type MsgStakeUpdateResponse

type MsgStakeUpdateResponse struct {
}

func (*MsgStakeUpdateResponse) Descriptor

func (*MsgStakeUpdateResponse) Descriptor() ([]byte, []int)

func (*MsgStakeUpdateResponse) Marshal

func (m *MsgStakeUpdateResponse) Marshal() (dAtA []byte, err error)

func (*MsgStakeUpdateResponse) MarshalTo

func (m *MsgStakeUpdateResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgStakeUpdateResponse) MarshalToSizedBuffer

func (m *MsgStakeUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgStakeUpdateResponse) ProtoMessage

func (*MsgStakeUpdateResponse) ProtoMessage()

func (*MsgStakeUpdateResponse) Reset

func (m *MsgStakeUpdateResponse) Reset()

func (*MsgStakeUpdateResponse) Size

func (m *MsgStakeUpdateResponse) Size() (n int)

func (*MsgStakeUpdateResponse) String

func (m *MsgStakeUpdateResponse) String() string

func (*MsgStakeUpdateResponse) Unmarshal

func (m *MsgStakeUpdateResponse) Unmarshal(dAtA []byte) error

func (*MsgStakeUpdateResponse) XXX_DiscardUnknown

func (m *MsgStakeUpdateResponse) XXX_DiscardUnknown()

func (*MsgStakeUpdateResponse) XXX_Marshal

func (m *MsgStakeUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgStakeUpdateResponse) XXX_Merge

func (m *MsgStakeUpdateResponse) XXX_Merge(src proto.Message)

func (*MsgStakeUpdateResponse) XXX_Size

func (m *MsgStakeUpdateResponse) XXX_Size() int

func (*MsgStakeUpdateResponse) XXX_Unmarshal

func (m *MsgStakeUpdateResponse) XXX_Unmarshal(b []byte) error

type MsgValidatorExit

type MsgValidatorExit struct {
	From              string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	ValId             uint64 `protobuf:"varint,2,opt,name=val_id,json=valId,proto3" json:"val_id,omitempty"`
	DeactivationEpoch uint64 `protobuf:"varint,3,opt,name=deactivation_epoch,json=deactivationEpoch,proto3" json:"deactivation_epoch,omitempty"`
	TxHash            []byte `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	LogIndex          uint64 `protobuf:"varint,5,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
	BlockNumber       uint64 `protobuf:"varint,6,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	Nonce             uint64 `protobuf:"varint,7,opt,name=nonce,proto3" json:"nonce,omitempty"`
}

func NewMsgValidatorExit

func NewMsgValidatorExit(
	from string, id uint64, deactivationEpoch uint64,
	txHash []byte, logIndex uint64,
	blockNumber uint64, nonce uint64,
) (*MsgValidatorExit, error)

NewMsgValidatorExit creates a new MsgValidatorExit instance.

func (*MsgValidatorExit) Descriptor

func (*MsgValidatorExit) Descriptor() ([]byte, []int)

func (*MsgValidatorExit) GetBlockNumber

func (m *MsgValidatorExit) GetBlockNumber() uint64

func (*MsgValidatorExit) GetDeactivationEpoch

func (m *MsgValidatorExit) GetDeactivationEpoch() uint64

func (*MsgValidatorExit) GetFrom

func (m *MsgValidatorExit) GetFrom() string

func (*MsgValidatorExit) GetLogIndex

func (m *MsgValidatorExit) GetLogIndex() uint64

func (*MsgValidatorExit) GetNonce

func (m *MsgValidatorExit) GetNonce() uint64

func (*MsgValidatorExit) GetTxHash

func (m *MsgValidatorExit) GetTxHash() []byte

func (*MsgValidatorExit) GetValId

func (m *MsgValidatorExit) GetValId() uint64

func (*MsgValidatorExit) Marshal

func (m *MsgValidatorExit) Marshal() (dAtA []byte, err error)

func (*MsgValidatorExit) MarshalTo

func (m *MsgValidatorExit) MarshalTo(dAtA []byte) (int, error)

func (*MsgValidatorExit) MarshalToSizedBuffer

func (m *MsgValidatorExit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgValidatorExit) ProtoMessage

func (*MsgValidatorExit) ProtoMessage()

func (*MsgValidatorExit) Reset

func (m *MsgValidatorExit) Reset()

func (*MsgValidatorExit) Size

func (m *MsgValidatorExit) Size() (n int)

func (*MsgValidatorExit) String

func (m *MsgValidatorExit) String() string

func (*MsgValidatorExit) Unmarshal

func (m *MsgValidatorExit) Unmarshal(dAtA []byte) error

func (MsgValidatorExit) Validate

func (msg MsgValidatorExit) Validate(ac address.Codec) error

Validate validates the validator exit msg before it is executed

func (*MsgValidatorExit) XXX_DiscardUnknown

func (m *MsgValidatorExit) XXX_DiscardUnknown()

func (*MsgValidatorExit) XXX_Marshal

func (m *MsgValidatorExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgValidatorExit) XXX_Merge

func (m *MsgValidatorExit) XXX_Merge(src proto.Message)

func (*MsgValidatorExit) XXX_Size

func (m *MsgValidatorExit) XXX_Size() int

func (*MsgValidatorExit) XXX_Unmarshal

func (m *MsgValidatorExit) XXX_Unmarshal(b []byte) error

type MsgValidatorExitResponse

type MsgValidatorExitResponse struct {
}

func (*MsgValidatorExitResponse) Descriptor

func (*MsgValidatorExitResponse) Descriptor() ([]byte, []int)

func (*MsgValidatorExitResponse) Marshal

func (m *MsgValidatorExitResponse) Marshal() (dAtA []byte, err error)

func (*MsgValidatorExitResponse) MarshalTo

func (m *MsgValidatorExitResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgValidatorExitResponse) MarshalToSizedBuffer

func (m *MsgValidatorExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgValidatorExitResponse) ProtoMessage

func (*MsgValidatorExitResponse) ProtoMessage()

func (*MsgValidatorExitResponse) Reset

func (m *MsgValidatorExitResponse) Reset()

func (*MsgValidatorExitResponse) Size

func (m *MsgValidatorExitResponse) Size() (n int)

func (*MsgValidatorExitResponse) String

func (m *MsgValidatorExitResponse) String() string

func (*MsgValidatorExitResponse) Unmarshal

func (m *MsgValidatorExitResponse) Unmarshal(dAtA []byte) error

func (*MsgValidatorExitResponse) XXX_DiscardUnknown

func (m *MsgValidatorExitResponse) XXX_DiscardUnknown()

func (*MsgValidatorExitResponse) XXX_Marshal

func (m *MsgValidatorExitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgValidatorExitResponse) XXX_Merge

func (m *MsgValidatorExitResponse) XXX_Merge(src proto.Message)

func (*MsgValidatorExitResponse) XXX_Size

func (m *MsgValidatorExitResponse) XXX_Size() int

func (*MsgValidatorExitResponse) XXX_Unmarshal

func (m *MsgValidatorExitResponse) XXX_Unmarshal(b []byte) error

type MsgValidatorJoin

type MsgValidatorJoin struct {
	From            string                `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	ValId           uint64                `protobuf:"varint,2,opt,name=val_id,json=valId,proto3" json:"val_id,omitempty"`
	ActivationEpoch uint64                `protobuf:"varint,3,opt,name=activation_epoch,json=activationEpoch,proto3" json:"activation_epoch,omitempty"`
	Amount          cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	SignerPubKey    []byte                `protobuf:"bytes,5,opt,name=signer_pub_key,json=signerPubKey,proto3" json:"signer_pub_key,omitempty"`
	TxHash          []byte                `protobuf:"bytes,6,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	LogIndex        uint64                `protobuf:"varint,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
	BlockNumber     uint64                `protobuf:"varint,8,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	Nonce           uint64                `protobuf:"varint,9,opt,name=nonce,proto3" json:"nonce,omitempty"`
}

MsgValidatorJoin defines a message for a new validator to join the network

func NewMsgValidatorJoin

func NewMsgValidatorJoin(
	from string, id uint64, activationEpoch uint64,
	amount math.Int, pubKey cryptotypes.PubKey, txHash []byte, logIndex uint64,
	blockNumber uint64, nonce uint64,
) (*MsgValidatorJoin, error)

NewMsgValidatorJoin creates a new MsgCreateValidator instance.

func (*MsgValidatorJoin) Descriptor

func (*MsgValidatorJoin) Descriptor() ([]byte, []int)

func (*MsgValidatorJoin) GetActivationEpoch

func (m *MsgValidatorJoin) GetActivationEpoch() uint64

func (*MsgValidatorJoin) GetBlockNumber

func (m *MsgValidatorJoin) GetBlockNumber() uint64

func (*MsgValidatorJoin) GetFrom

func (m *MsgValidatorJoin) GetFrom() string

func (*MsgValidatorJoin) GetLogIndex

func (m *MsgValidatorJoin) GetLogIndex() uint64

func (*MsgValidatorJoin) GetNonce

func (m *MsgValidatorJoin) GetNonce() uint64

func (*MsgValidatorJoin) GetSignerPubKey

func (m *MsgValidatorJoin) GetSignerPubKey() []byte

func (*MsgValidatorJoin) GetTxHash

func (m *MsgValidatorJoin) GetTxHash() []byte

func (*MsgValidatorJoin) GetValId

func (m *MsgValidatorJoin) GetValId() uint64

func (*MsgValidatorJoin) Marshal

func (m *MsgValidatorJoin) Marshal() (dAtA []byte, err error)

func (*MsgValidatorJoin) MarshalTo

func (m *MsgValidatorJoin) MarshalTo(dAtA []byte) (int, error)

func (*MsgValidatorJoin) MarshalToSizedBuffer

func (m *MsgValidatorJoin) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgValidatorJoin) ProtoMessage

func (*MsgValidatorJoin) ProtoMessage()

func (*MsgValidatorJoin) Reset

func (m *MsgValidatorJoin) Reset()

func (*MsgValidatorJoin) Size

func (m *MsgValidatorJoin) Size() (n int)

func (*MsgValidatorJoin) String

func (m *MsgValidatorJoin) String() string

func (*MsgValidatorJoin) Unmarshal

func (m *MsgValidatorJoin) Unmarshal(dAtA []byte) error

func (MsgValidatorJoin) Validate

func (msg MsgValidatorJoin) Validate(ac address.Codec) error

Validate validates the validator join msg before it is executed

func (*MsgValidatorJoin) XXX_DiscardUnknown

func (m *MsgValidatorJoin) XXX_DiscardUnknown()

func (*MsgValidatorJoin) XXX_Marshal

func (m *MsgValidatorJoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgValidatorJoin) XXX_Merge

func (m *MsgValidatorJoin) XXX_Merge(src proto.Message)

func (*MsgValidatorJoin) XXX_Size

func (m *MsgValidatorJoin) XXX_Size() int

func (*MsgValidatorJoin) XXX_Unmarshal

func (m *MsgValidatorJoin) XXX_Unmarshal(b []byte) error

type MsgValidatorJoinResponse

type MsgValidatorJoinResponse struct {
}

func (*MsgValidatorJoinResponse) Descriptor

func (*MsgValidatorJoinResponse) Descriptor() ([]byte, []int)

func (*MsgValidatorJoinResponse) Marshal

func (m *MsgValidatorJoinResponse) Marshal() (dAtA []byte, err error)

func (*MsgValidatorJoinResponse) MarshalTo

func (m *MsgValidatorJoinResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgValidatorJoinResponse) MarshalToSizedBuffer

func (m *MsgValidatorJoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgValidatorJoinResponse) ProtoMessage

func (*MsgValidatorJoinResponse) ProtoMessage()

func (*MsgValidatorJoinResponse) Reset

func (m *MsgValidatorJoinResponse) Reset()

func (*MsgValidatorJoinResponse) Size

func (m *MsgValidatorJoinResponse) Size() (n int)

func (*MsgValidatorJoinResponse) String

func (m *MsgValidatorJoinResponse) String() string

func (*MsgValidatorJoinResponse) Unmarshal

func (m *MsgValidatorJoinResponse) Unmarshal(dAtA []byte) error

func (*MsgValidatorJoinResponse) XXX_DiscardUnknown

func (m *MsgValidatorJoinResponse) XXX_DiscardUnknown()

func (*MsgValidatorJoinResponse) XXX_Marshal

func (m *MsgValidatorJoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgValidatorJoinResponse) XXX_Merge

func (m *MsgValidatorJoinResponse) XXX_Merge(src proto.Message)

func (*MsgValidatorJoinResponse) XXX_Size

func (m *MsgValidatorJoinResponse) XXX_Size() int

func (*MsgValidatorJoinResponse) XXX_Unmarshal

func (m *MsgValidatorJoinResponse) XXX_Unmarshal(b []byte) error

type PubKey

type PubKey [65]byte

type QueryClient

type QueryClient interface {
	// GetCurrentValidatorSet queries for the current validator set
	GetCurrentValidatorSet(ctx context.Context, in *QueryCurrentValidatorSetRequest, opts ...grpc.CallOption) (*QueryCurrentValidatorSetResponse, error)
	// GetSignerByAddress queries validator info for a given validator address
	GetSignerByAddress(ctx context.Context, in *QuerySignerRequest, opts ...grpc.CallOption) (*QuerySignerResponse, error)
	// GetValidatorById queries validator info for a given validator id
	GetValidatorById(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error)
	// GetValidatorStatusByAddress queries validator status for given validator
	// val_address
	GetValidatorStatusByAddress(ctx context.Context, in *QueryValidatorStatusRequest, opts ...grpc.CallOption) (*QueryValidatorStatusResponse, error)
	// GetTotalPower queries the total power of a validator set
	GetTotalPower(ctx context.Context, in *QueryTotalPowerRequest, opts ...grpc.CallOption) (*QueryTotalPowerResponse, error)
	// IsStakeTxOld queries for the staking sequence
	IsStakeTxOld(ctx context.Context, in *QueryStakeIsOldTxRequest, opts ...grpc.CallOption) (*QueryStakeIsOldTxResponse, error)
	// GetProposersByTimes queries for the proposers by Tendermint iterations
	GetProposersByTimes(ctx context.Context, in *QueryProposersRequest, opts ...grpc.CallOption) (*QueryProposersResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryCurrentValidatorSetRequest

type QueryCurrentValidatorSetRequest struct {
}

func (*QueryCurrentValidatorSetRequest) Descriptor

func (*QueryCurrentValidatorSetRequest) Descriptor() ([]byte, []int)

func (*QueryCurrentValidatorSetRequest) Marshal

func (m *QueryCurrentValidatorSetRequest) Marshal() (dAtA []byte, err error)

func (*QueryCurrentValidatorSetRequest) MarshalTo

func (m *QueryCurrentValidatorSetRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryCurrentValidatorSetRequest) MarshalToSizedBuffer

func (m *QueryCurrentValidatorSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCurrentValidatorSetRequest) ProtoMessage

func (*QueryCurrentValidatorSetRequest) ProtoMessage()

func (*QueryCurrentValidatorSetRequest) Reset

func (*QueryCurrentValidatorSetRequest) Size

func (m *QueryCurrentValidatorSetRequest) Size() (n int)

func (*QueryCurrentValidatorSetRequest) String

func (*QueryCurrentValidatorSetRequest) Unmarshal

func (m *QueryCurrentValidatorSetRequest) Unmarshal(dAtA []byte) error

func (*QueryCurrentValidatorSetRequest) XXX_DiscardUnknown

func (m *QueryCurrentValidatorSetRequest) XXX_DiscardUnknown()

func (*QueryCurrentValidatorSetRequest) XXX_Marshal

func (m *QueryCurrentValidatorSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCurrentValidatorSetRequest) XXX_Merge

func (m *QueryCurrentValidatorSetRequest) XXX_Merge(src proto.Message)

func (*QueryCurrentValidatorSetRequest) XXX_Size

func (m *QueryCurrentValidatorSetRequest) XXX_Size() int

func (*QueryCurrentValidatorSetRequest) XXX_Unmarshal

func (m *QueryCurrentValidatorSetRequest) XXX_Unmarshal(b []byte) error

type QueryCurrentValidatorSetResponse

type QueryCurrentValidatorSetResponse struct {
	ValidatorSet ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set"`
}

func (*QueryCurrentValidatorSetResponse) Descriptor

func (*QueryCurrentValidatorSetResponse) Descriptor() ([]byte, []int)

func (*QueryCurrentValidatorSetResponse) GetValidatorSet

func (m *QueryCurrentValidatorSetResponse) GetValidatorSet() ValidatorSet

func (*QueryCurrentValidatorSetResponse) Marshal

func (m *QueryCurrentValidatorSetResponse) Marshal() (dAtA []byte, err error)

func (*QueryCurrentValidatorSetResponse) MarshalTo

func (m *QueryCurrentValidatorSetResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryCurrentValidatorSetResponse) MarshalToSizedBuffer

func (m *QueryCurrentValidatorSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCurrentValidatorSetResponse) ProtoMessage

func (*QueryCurrentValidatorSetResponse) ProtoMessage()

func (*QueryCurrentValidatorSetResponse) Reset

func (*QueryCurrentValidatorSetResponse) Size

func (m *QueryCurrentValidatorSetResponse) Size() (n int)

func (*QueryCurrentValidatorSetResponse) String

func (*QueryCurrentValidatorSetResponse) Unmarshal

func (m *QueryCurrentValidatorSetResponse) Unmarshal(dAtA []byte) error

func (*QueryCurrentValidatorSetResponse) XXX_DiscardUnknown

func (m *QueryCurrentValidatorSetResponse) XXX_DiscardUnknown()

func (*QueryCurrentValidatorSetResponse) XXX_Marshal

func (m *QueryCurrentValidatorSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCurrentValidatorSetResponse) XXX_Merge

func (*QueryCurrentValidatorSetResponse) XXX_Size

func (m *QueryCurrentValidatorSetResponse) XXX_Size() int

func (*QueryCurrentValidatorSetResponse) XXX_Unmarshal

func (m *QueryCurrentValidatorSetResponse) XXX_Unmarshal(b []byte) error

type QueryProposersRequest

type QueryProposersRequest struct {
	Times uint64 `protobuf:"varint,1,opt,name=times,proto3" json:"times,omitempty"`
}

func (*QueryProposersRequest) Descriptor

func (*QueryProposersRequest) Descriptor() ([]byte, []int)

func (*QueryProposersRequest) GetTimes

func (m *QueryProposersRequest) GetTimes() uint64

func (*QueryProposersRequest) Marshal

func (m *QueryProposersRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposersRequest) MarshalTo

func (m *QueryProposersRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposersRequest) MarshalToSizedBuffer

func (m *QueryProposersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposersRequest) ProtoMessage

func (*QueryProposersRequest) ProtoMessage()

func (*QueryProposersRequest) Reset

func (m *QueryProposersRequest) Reset()

func (*QueryProposersRequest) Size

func (m *QueryProposersRequest) Size() (n int)

func (*QueryProposersRequest) String

func (m *QueryProposersRequest) String() string

func (*QueryProposersRequest) Unmarshal

func (m *QueryProposersRequest) Unmarshal(dAtA []byte) error

func (*QueryProposersRequest) XXX_DiscardUnknown

func (m *QueryProposersRequest) XXX_DiscardUnknown()

func (*QueryProposersRequest) XXX_Marshal

func (m *QueryProposersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposersRequest) XXX_Merge

func (m *QueryProposersRequest) XXX_Merge(src proto.Message)

func (*QueryProposersRequest) XXX_Size

func (m *QueryProposersRequest) XXX_Size() int

func (*QueryProposersRequest) XXX_Unmarshal

func (m *QueryProposersRequest) XXX_Unmarshal(b []byte) error

type QueryProposersResponse

type QueryProposersResponse struct {
	Proposers []Validator `protobuf:"bytes,1,rep,name=proposers,proto3" json:"proposers"`
}

func (*QueryProposersResponse) Descriptor

func (*QueryProposersResponse) Descriptor() ([]byte, []int)

func (*QueryProposersResponse) GetProposers

func (m *QueryProposersResponse) GetProposers() []Validator

func (*QueryProposersResponse) Marshal

func (m *QueryProposersResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposersResponse) MarshalTo

func (m *QueryProposersResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposersResponse) MarshalToSizedBuffer

func (m *QueryProposersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposersResponse) ProtoMessage

func (*QueryProposersResponse) ProtoMessage()

func (*QueryProposersResponse) Reset

func (m *QueryProposersResponse) Reset()

func (*QueryProposersResponse) Size

func (m *QueryProposersResponse) Size() (n int)

func (*QueryProposersResponse) String

func (m *QueryProposersResponse) String() string

func (*QueryProposersResponse) Unmarshal

func (m *QueryProposersResponse) Unmarshal(dAtA []byte) error

func (*QueryProposersResponse) XXX_DiscardUnknown

func (m *QueryProposersResponse) XXX_DiscardUnknown()

func (*QueryProposersResponse) XXX_Marshal

func (m *QueryProposersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposersResponse) XXX_Merge

func (m *QueryProposersResponse) XXX_Merge(src proto.Message)

func (*QueryProposersResponse) XXX_Size

func (m *QueryProposersResponse) XXX_Size() int

func (*QueryProposersResponse) XXX_Unmarshal

func (m *QueryProposersResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// GetCurrentValidatorSet queries for the current validator set
	GetCurrentValidatorSet(context.Context, *QueryCurrentValidatorSetRequest) (*QueryCurrentValidatorSetResponse, error)
	// GetSignerByAddress queries validator info for a given validator address
	GetSignerByAddress(context.Context, *QuerySignerRequest) (*QuerySignerResponse, error)
	// GetValidatorById queries validator info for a given validator id
	GetValidatorById(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error)
	// GetValidatorStatusByAddress queries validator status for given validator
	// val_address
	GetValidatorStatusByAddress(context.Context, *QueryValidatorStatusRequest) (*QueryValidatorStatusResponse, error)
	// GetTotalPower queries the total power of a validator set
	GetTotalPower(context.Context, *QueryTotalPowerRequest) (*QueryTotalPowerResponse, error)
	// IsStakeTxOld queries for the staking sequence
	IsStakeTxOld(context.Context, *QueryStakeIsOldTxRequest) (*QueryStakeIsOldTxResponse, error)
	// GetProposersByTimes queries for the proposers by Tendermint iterations
	GetProposersByTimes(context.Context, *QueryProposersRequest) (*QueryProposersResponse, error)
}

QueryServer is the server API for Query service.

type QuerySignerRequest

type QuerySignerRequest struct {
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
}

func (*QuerySignerRequest) Descriptor

func (*QuerySignerRequest) Descriptor() ([]byte, []int)

func (*QuerySignerRequest) GetValAddress

func (m *QuerySignerRequest) GetValAddress() string

func (*QuerySignerRequest) Marshal

func (m *QuerySignerRequest) Marshal() (dAtA []byte, err error)

func (*QuerySignerRequest) MarshalTo

func (m *QuerySignerRequest) MarshalTo(dAtA []byte) (int, error)

func (*QuerySignerRequest) MarshalToSizedBuffer

func (m *QuerySignerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QuerySignerRequest) ProtoMessage

func (*QuerySignerRequest) ProtoMessage()

func (*QuerySignerRequest) Reset

func (m *QuerySignerRequest) Reset()

func (*QuerySignerRequest) Size

func (m *QuerySignerRequest) Size() (n int)

func (*QuerySignerRequest) String

func (m *QuerySignerRequest) String() string

func (*QuerySignerRequest) Unmarshal

func (m *QuerySignerRequest) Unmarshal(dAtA []byte) error

func (*QuerySignerRequest) XXX_DiscardUnknown

func (m *QuerySignerRequest) XXX_DiscardUnknown()

func (*QuerySignerRequest) XXX_Marshal

func (m *QuerySignerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuerySignerRequest) XXX_Merge

func (m *QuerySignerRequest) XXX_Merge(src proto.Message)

func (*QuerySignerRequest) XXX_Size

func (m *QuerySignerRequest) XXX_Size() int

func (*QuerySignerRequest) XXX_Unmarshal

func (m *QuerySignerRequest) XXX_Unmarshal(b []byte) error

type QuerySignerResponse

type QuerySignerResponse struct {
	Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
}

func (*QuerySignerResponse) Descriptor

func (*QuerySignerResponse) Descriptor() ([]byte, []int)

func (*QuerySignerResponse) GetValidator

func (m *QuerySignerResponse) GetValidator() Validator

func (*QuerySignerResponse) Marshal

func (m *QuerySignerResponse) Marshal() (dAtA []byte, err error)

func (*QuerySignerResponse) MarshalTo

func (m *QuerySignerResponse) MarshalTo(dAtA []byte) (int, error)

func (*QuerySignerResponse) MarshalToSizedBuffer

func (m *QuerySignerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QuerySignerResponse) ProtoMessage

func (*QuerySignerResponse) ProtoMessage()

func (*QuerySignerResponse) Reset

func (m *QuerySignerResponse) Reset()

func (*QuerySignerResponse) Size

func (m *QuerySignerResponse) Size() (n int)

func (*QuerySignerResponse) String

func (m *QuerySignerResponse) String() string

func (*QuerySignerResponse) Unmarshal

func (m *QuerySignerResponse) Unmarshal(dAtA []byte) error

func (*QuerySignerResponse) XXX_DiscardUnknown

func (m *QuerySignerResponse) XXX_DiscardUnknown()

func (*QuerySignerResponse) XXX_Marshal

func (m *QuerySignerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuerySignerResponse) XXX_Merge

func (m *QuerySignerResponse) XXX_Merge(src proto.Message)

func (*QuerySignerResponse) XXX_Size

func (m *QuerySignerResponse) XXX_Size() int

func (*QuerySignerResponse) XXX_Unmarshal

func (m *QuerySignerResponse) XXX_Unmarshal(b []byte) error

type QueryStakeIsOldTxRequest

type QueryStakeIsOldTxRequest struct {
	TxHash   string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	LogIndex uint64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
}

func (*QueryStakeIsOldTxRequest) Descriptor

func (*QueryStakeIsOldTxRequest) Descriptor() ([]byte, []int)

func (*QueryStakeIsOldTxRequest) GetLogIndex

func (m *QueryStakeIsOldTxRequest) GetLogIndex() uint64

func (*QueryStakeIsOldTxRequest) GetTxHash

func (m *QueryStakeIsOldTxRequest) GetTxHash() string

func (*QueryStakeIsOldTxRequest) Marshal

func (m *QueryStakeIsOldTxRequest) Marshal() (dAtA []byte, err error)

func (*QueryStakeIsOldTxRequest) MarshalTo

func (m *QueryStakeIsOldTxRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryStakeIsOldTxRequest) MarshalToSizedBuffer

func (m *QueryStakeIsOldTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStakeIsOldTxRequest) ProtoMessage

func (*QueryStakeIsOldTxRequest) ProtoMessage()

func (*QueryStakeIsOldTxRequest) Reset

func (m *QueryStakeIsOldTxRequest) Reset()

func (*QueryStakeIsOldTxRequest) Size

func (m *QueryStakeIsOldTxRequest) Size() (n int)

func (*QueryStakeIsOldTxRequest) String

func (m *QueryStakeIsOldTxRequest) String() string

func (*QueryStakeIsOldTxRequest) Unmarshal

func (m *QueryStakeIsOldTxRequest) Unmarshal(dAtA []byte) error

func (*QueryStakeIsOldTxRequest) XXX_DiscardUnknown

func (m *QueryStakeIsOldTxRequest) XXX_DiscardUnknown()

func (*QueryStakeIsOldTxRequest) XXX_Marshal

func (m *QueryStakeIsOldTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStakeIsOldTxRequest) XXX_Merge

func (m *QueryStakeIsOldTxRequest) XXX_Merge(src proto.Message)

func (*QueryStakeIsOldTxRequest) XXX_Size

func (m *QueryStakeIsOldTxRequest) XXX_Size() int

func (*QueryStakeIsOldTxRequest) XXX_Unmarshal

func (m *QueryStakeIsOldTxRequest) XXX_Unmarshal(b []byte) error

type QueryStakeIsOldTxResponse

type QueryStakeIsOldTxResponse struct {
	IsOld bool `protobuf:"varint,1,opt,name=is_old,json=isOld,proto3" json:"is_old,omitempty"`
}

func (*QueryStakeIsOldTxResponse) Descriptor

func (*QueryStakeIsOldTxResponse) Descriptor() ([]byte, []int)

func (*QueryStakeIsOldTxResponse) GetIsOld

func (m *QueryStakeIsOldTxResponse) GetIsOld() bool

func (*QueryStakeIsOldTxResponse) Marshal

func (m *QueryStakeIsOldTxResponse) Marshal() (dAtA []byte, err error)

func (*QueryStakeIsOldTxResponse) MarshalTo

func (m *QueryStakeIsOldTxResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryStakeIsOldTxResponse) MarshalToSizedBuffer

func (m *QueryStakeIsOldTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStakeIsOldTxResponse) ProtoMessage

func (*QueryStakeIsOldTxResponse) ProtoMessage()

func (*QueryStakeIsOldTxResponse) Reset

func (m *QueryStakeIsOldTxResponse) Reset()

func (*QueryStakeIsOldTxResponse) Size

func (m *QueryStakeIsOldTxResponse) Size() (n int)

func (*QueryStakeIsOldTxResponse) String

func (m *QueryStakeIsOldTxResponse) String() string

func (*QueryStakeIsOldTxResponse) Unmarshal

func (m *QueryStakeIsOldTxResponse) Unmarshal(dAtA []byte) error

func (*QueryStakeIsOldTxResponse) XXX_DiscardUnknown

func (m *QueryStakeIsOldTxResponse) XXX_DiscardUnknown()

func (*QueryStakeIsOldTxResponse) XXX_Marshal

func (m *QueryStakeIsOldTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStakeIsOldTxResponse) XXX_Merge

func (m *QueryStakeIsOldTxResponse) XXX_Merge(src proto.Message)

func (*QueryStakeIsOldTxResponse) XXX_Size

func (m *QueryStakeIsOldTxResponse) XXX_Size() int

func (*QueryStakeIsOldTxResponse) XXX_Unmarshal

func (m *QueryStakeIsOldTxResponse) XXX_Unmarshal(b []byte) error

type QueryTotalPowerRequest

type QueryTotalPowerRequest struct {
}

func (*QueryTotalPowerRequest) Descriptor

func (*QueryTotalPowerRequest) Descriptor() ([]byte, []int)

func (*QueryTotalPowerRequest) Marshal

func (m *QueryTotalPowerRequest) Marshal() (dAtA []byte, err error)

func (*QueryTotalPowerRequest) MarshalTo

func (m *QueryTotalPowerRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalPowerRequest) MarshalToSizedBuffer

func (m *QueryTotalPowerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalPowerRequest) ProtoMessage

func (*QueryTotalPowerRequest) ProtoMessage()

func (*QueryTotalPowerRequest) Reset

func (m *QueryTotalPowerRequest) Reset()

func (*QueryTotalPowerRequest) Size

func (m *QueryTotalPowerRequest) Size() (n int)

func (*QueryTotalPowerRequest) String

func (m *QueryTotalPowerRequest) String() string

func (*QueryTotalPowerRequest) Unmarshal

func (m *QueryTotalPowerRequest) Unmarshal(dAtA []byte) error

func (*QueryTotalPowerRequest) XXX_DiscardUnknown

func (m *QueryTotalPowerRequest) XXX_DiscardUnknown()

func (*QueryTotalPowerRequest) XXX_Marshal

func (m *QueryTotalPowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalPowerRequest) XXX_Merge

func (m *QueryTotalPowerRequest) XXX_Merge(src proto.Message)

func (*QueryTotalPowerRequest) XXX_Size

func (m *QueryTotalPowerRequest) XXX_Size() int

func (*QueryTotalPowerRequest) XXX_Unmarshal

func (m *QueryTotalPowerRequest) XXX_Unmarshal(b []byte) error

type QueryTotalPowerResponse

type QueryTotalPowerResponse struct {
	TotalPower int64 `protobuf:"varint,1,opt,name=total_power,json=totalPower,proto3" json:"total_power,omitempty"`
}

func (*QueryTotalPowerResponse) Descriptor

func (*QueryTotalPowerResponse) Descriptor() ([]byte, []int)

func (*QueryTotalPowerResponse) GetTotalPower

func (m *QueryTotalPowerResponse) GetTotalPower() int64

func (*QueryTotalPowerResponse) Marshal

func (m *QueryTotalPowerResponse) Marshal() (dAtA []byte, err error)

func (*QueryTotalPowerResponse) MarshalTo

func (m *QueryTotalPowerResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalPowerResponse) MarshalToSizedBuffer

func (m *QueryTotalPowerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalPowerResponse) ProtoMessage

func (*QueryTotalPowerResponse) ProtoMessage()

func (*QueryTotalPowerResponse) Reset

func (m *QueryTotalPowerResponse) Reset()

func (*QueryTotalPowerResponse) Size

func (m *QueryTotalPowerResponse) Size() (n int)

func (*QueryTotalPowerResponse) String

func (m *QueryTotalPowerResponse) String() string

func (*QueryTotalPowerResponse) Unmarshal

func (m *QueryTotalPowerResponse) Unmarshal(dAtA []byte) error

func (*QueryTotalPowerResponse) XXX_DiscardUnknown

func (m *QueryTotalPowerResponse) XXX_DiscardUnknown()

func (*QueryTotalPowerResponse) XXX_Marshal

func (m *QueryTotalPowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalPowerResponse) XXX_Merge

func (m *QueryTotalPowerResponse) XXX_Merge(src proto.Message)

func (*QueryTotalPowerResponse) XXX_Size

func (m *QueryTotalPowerResponse) XXX_Size() int

func (*QueryTotalPowerResponse) XXX_Unmarshal

func (m *QueryTotalPowerResponse) XXX_Unmarshal(b []byte) error

type QueryValidatorRequest

type QueryValidatorRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*QueryValidatorRequest) Descriptor

func (*QueryValidatorRequest) Descriptor() ([]byte, []int)

func (*QueryValidatorRequest) GetId

func (m *QueryValidatorRequest) GetId() uint64

func (*QueryValidatorRequest) Marshal

func (m *QueryValidatorRequest) Marshal() (dAtA []byte, err error)

func (*QueryValidatorRequest) MarshalTo

func (m *QueryValidatorRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryValidatorRequest) MarshalToSizedBuffer

func (m *QueryValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidatorRequest) ProtoMessage

func (*QueryValidatorRequest) ProtoMessage()

func (*QueryValidatorRequest) Reset

func (m *QueryValidatorRequest) Reset()

func (*QueryValidatorRequest) Size

func (m *QueryValidatorRequest) Size() (n int)

func (*QueryValidatorRequest) String

func (m *QueryValidatorRequest) String() string

func (*QueryValidatorRequest) Unmarshal

func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error

func (*QueryValidatorRequest) XXX_DiscardUnknown

func (m *QueryValidatorRequest) XXX_DiscardUnknown()

func (*QueryValidatorRequest) XXX_Marshal

func (m *QueryValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryValidatorRequest) XXX_Merge

func (m *QueryValidatorRequest) XXX_Merge(src proto.Message)

func (*QueryValidatorRequest) XXX_Size

func (m *QueryValidatorRequest) XXX_Size() int

func (*QueryValidatorRequest) XXX_Unmarshal

func (m *QueryValidatorRequest) XXX_Unmarshal(b []byte) error

type QueryValidatorResponse

type QueryValidatorResponse struct {
	Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
}

func (*QueryValidatorResponse) Descriptor

func (*QueryValidatorResponse) Descriptor() ([]byte, []int)

func (*QueryValidatorResponse) GetValidator

func (m *QueryValidatorResponse) GetValidator() Validator

func (*QueryValidatorResponse) Marshal

func (m *QueryValidatorResponse) Marshal() (dAtA []byte, err error)

func (*QueryValidatorResponse) MarshalTo

func (m *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryValidatorResponse) MarshalToSizedBuffer

func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidatorResponse) ProtoMessage

func (*QueryValidatorResponse) ProtoMessage()

func (*QueryValidatorResponse) Reset

func (m *QueryValidatorResponse) Reset()

func (*QueryValidatorResponse) Size

func (m *QueryValidatorResponse) Size() (n int)

func (*QueryValidatorResponse) String

func (m *QueryValidatorResponse) String() string

func (*QueryValidatorResponse) Unmarshal

func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error

func (*QueryValidatorResponse) XXX_DiscardUnknown

func (m *QueryValidatorResponse) XXX_DiscardUnknown()

func (*QueryValidatorResponse) XXX_Marshal

func (m *QueryValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryValidatorResponse) XXX_Merge

func (m *QueryValidatorResponse) XXX_Merge(src proto.Message)

func (*QueryValidatorResponse) XXX_Size

func (m *QueryValidatorResponse) XXX_Size() int

func (*QueryValidatorResponse) XXX_Unmarshal

func (m *QueryValidatorResponse) XXX_Unmarshal(b []byte) error

type QueryValidatorStatusRequest

type QueryValidatorStatusRequest struct {
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
}

func (*QueryValidatorStatusRequest) Descriptor

func (*QueryValidatorStatusRequest) Descriptor() ([]byte, []int)

func (*QueryValidatorStatusRequest) GetValAddress

func (m *QueryValidatorStatusRequest) GetValAddress() string

func (*QueryValidatorStatusRequest) Marshal

func (m *QueryValidatorStatusRequest) Marshal() (dAtA []byte, err error)

func (*QueryValidatorStatusRequest) MarshalTo

func (m *QueryValidatorStatusRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryValidatorStatusRequest) MarshalToSizedBuffer

func (m *QueryValidatorStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidatorStatusRequest) ProtoMessage

func (*QueryValidatorStatusRequest) ProtoMessage()

func (*QueryValidatorStatusRequest) Reset

func (m *QueryValidatorStatusRequest) Reset()

func (*QueryValidatorStatusRequest) Size

func (m *QueryValidatorStatusRequest) Size() (n int)

func (*QueryValidatorStatusRequest) String

func (m *QueryValidatorStatusRequest) String() string

func (*QueryValidatorStatusRequest) Unmarshal

func (m *QueryValidatorStatusRequest) Unmarshal(dAtA []byte) error

func (*QueryValidatorStatusRequest) XXX_DiscardUnknown

func (m *QueryValidatorStatusRequest) XXX_DiscardUnknown()

func (*QueryValidatorStatusRequest) XXX_Marshal

func (m *QueryValidatorStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryValidatorStatusRequest) XXX_Merge

func (m *QueryValidatorStatusRequest) XXX_Merge(src proto.Message)

func (*QueryValidatorStatusRequest) XXX_Size

func (m *QueryValidatorStatusRequest) XXX_Size() int

func (*QueryValidatorStatusRequest) XXX_Unmarshal

func (m *QueryValidatorStatusRequest) XXX_Unmarshal(b []byte) error

type QueryValidatorStatusResponse

type QueryValidatorStatusResponse struct {
	IsOld bool `protobuf:"varint,1,opt,name=is_old,json=isOld,proto3" json:"is_old,omitempty"`
}

func (*QueryValidatorStatusResponse) Descriptor

func (*QueryValidatorStatusResponse) Descriptor() ([]byte, []int)

func (*QueryValidatorStatusResponse) GetIsOld

func (m *QueryValidatorStatusResponse) GetIsOld() bool

func (*QueryValidatorStatusResponse) Marshal

func (m *QueryValidatorStatusResponse) Marshal() (dAtA []byte, err error)

func (*QueryValidatorStatusResponse) MarshalTo

func (m *QueryValidatorStatusResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryValidatorStatusResponse) MarshalToSizedBuffer

func (m *QueryValidatorStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidatorStatusResponse) ProtoMessage

func (*QueryValidatorStatusResponse) ProtoMessage()

func (*QueryValidatorStatusResponse) Reset

func (m *QueryValidatorStatusResponse) Reset()

func (*QueryValidatorStatusResponse) Size

func (m *QueryValidatorStatusResponse) Size() (n int)

func (*QueryValidatorStatusResponse) String

func (*QueryValidatorStatusResponse) Unmarshal

func (m *QueryValidatorStatusResponse) Unmarshal(dAtA []byte) error

func (*QueryValidatorStatusResponse) XXX_DiscardUnknown

func (m *QueryValidatorStatusResponse) XXX_DiscardUnknown()

func (*QueryValidatorStatusResponse) XXX_Marshal

func (m *QueryValidatorStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryValidatorStatusResponse) XXX_Merge

func (m *QueryValidatorStatusResponse) XXX_Merge(src proto.Message)

func (*QueryValidatorStatusResponse) XXX_Size

func (m *QueryValidatorStatusResponse) XXX_Size() int

func (*QueryValidatorStatusResponse) XXX_Unmarshal

func (m *QueryValidatorStatusResponse) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SignerUpdate

func (*UnimplementedMsgServer) StakeUpdate

func (*UnimplementedMsgServer) ValidatorExit

func (*UnimplementedMsgServer) ValidatorJoin

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetCurrentValidatorSet

func (*UnimplementedQueryServer) GetProposersByTimes

func (*UnimplementedQueryServer) GetSignerByAddress

func (*UnimplementedQueryServer) GetTotalPower

func (*UnimplementedQueryServer) GetValidatorById

func (*UnimplementedQueryServer) GetValidatorStatusByAddress

func (*UnimplementedQueryServer) IsStakeTxOld

type Validator

type Validator struct {
	ValId            uint64 `protobuf:"varint,1,opt,name=val_id,json=valId,proto3" json:"val_id,omitempty"`
	StartEpoch       uint64 `protobuf:"varint,2,opt,name=start_epoch,json=startEpoch,proto3" json:"start_epoch,omitempty"`
	EndEpoch         uint64 `protobuf:"varint,3,opt,name=end_epoch,json=endEpoch,proto3" json:"end_epoch,omitempty"`
	Nonce            uint64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"`
	VotingPower      int64  `protobuf:"varint,5,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
	PubKey           []byte `protobuf:"bytes,6,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
	Signer           string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"`
	LastUpdated      string `protobuf:"bytes,8,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	Jailed           bool   `protobuf:"varint,9,opt,name=jailed,proto3" json:"jailed,omitempty"`
	ProposerPriority int64  `protobuf:"varint,10,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"`
}

func GetUpdatedValidators

func GetUpdatedValidators(
	currentSet *ValidatorSet,
	validators []*Validator,
	ackCount uint64,
) []*Validator

GetUpdatedValidators updates validators in validator set

func NewValidator

func NewValidator(
	id uint64,
	startEpoch uint64,
	endEpoch uint64,
	nonce uint64,
	power int64,
	pubKey cryptotypes.PubKey,
	signer string,
) (*Validator, error)

NewValidator func creates a new validator

func SortValidatorByAddress

func SortValidatorByAddress(a []Validator) []Validator

SortValidatorByAddress sorts a slice of validators by address to sort it we compare the values of signer field

func (*Validator) Bytes

func (v *Validator) Bytes() []byte

Bytes computes the unique encoding of a validator with a given voting power. These are the bytes that gets hashed in consensus. It excludes address as it's redundant with the pubKey. This also excludes ProposerPriority which changes every round.

func (Validator) CmtConsPublicKey

func (v Validator) CmtConsPublicKey() (cmtprotocrypto.PublicKey, error)

CmtConsPublicKey casts Validator.ConsensusPubkey to cmtprotocrypto.PubKey.

func (*Validator) CompareProposerPriority

func (v *Validator) CompareProposerPriority(other *Validator) *Validator

CompareProposerPriority returns the one with higher ProposerPriority.

func (Validator) ConsPubKey

func (v Validator) ConsPubKey() ([]byte, error)

ConsPubKey returns the validator PubKey as a cryptotypes.PubKey.

func (*Validator) Copy

func (v *Validator) Copy() *Validator

Copy creates a new copy of the validator, so we can mutate accum

func (*Validator) Descriptor

func (*Validator) Descriptor() ([]byte, []int)

func (*Validator) Equal

func (this *Validator) Equal(that interface{}) bool

func (*Validator) GetBondedTokens

func (v *Validator) GetBondedTokens() math.Int

GetBondedTokens implements types.ValidatorI.

func (*Validator) GetCommission

func (*Validator) GetCommission() math.LegacyDec

GetCommission implements types.ValidatorI.

func (*Validator) GetConsAddr

func (*Validator) GetConsAddr() ([]byte, error)

GetConsAddr implements types.ValidatorI.

func (*Validator) GetConsensusPower

func (*Validator) GetConsensusPower(_ math.Int) int64

GetConsensusPower implements types.ValidatorI.

func (*Validator) GetDelegatorShares

func (*Validator) GetDelegatorShares() math.LegacyDec

GetDelegatorShares implements types.ValidatorI.

func (*Validator) GetEndEpoch

func (m *Validator) GetEndEpoch() uint64

func (*Validator) GetJailed

func (m *Validator) GetJailed() bool

func (*Validator) GetLastUpdated

func (m *Validator) GetLastUpdated() string

func (*Validator) GetMinSelfDelegation

func (*Validator) GetMinSelfDelegation() math.Int

GetMinSelfDelegation implements types.ValidatorI.

func (*Validator) GetMoniker

func (*Validator) GetMoniker() string

GetMoniker implements types.ValidatorI.

func (*Validator) GetNonce

func (m *Validator) GetNonce() uint64

func (*Validator) GetOperator

func (v *Validator) GetOperator() string

GetOperator implements types.ValidatorI.

func (*Validator) GetProposerPriority

func (m *Validator) GetProposerPriority() int64

func (*Validator) GetPubKey

func (m *Validator) GetPubKey() []byte

func (*Validator) GetSigner

func (m *Validator) GetSigner() string

func (*Validator) GetStartEpoch

func (m *Validator) GetStartEpoch() uint64

func (*Validator) GetStatus

func (*Validator) GetStatus() cosmosTypes.BondStatus

GetStatus implements types.ValidatorI.

func (*Validator) GetTokens

func (*Validator) GetTokens() math.Int

GetTokens implements types.ValidatorI.

func (*Validator) GetValId

func (m *Validator) GetValId() uint64

func (*Validator) GetVotingPower

func (m *Validator) GetVotingPower() int64

func (*Validator) IsBonded

func (*Validator) IsBonded() bool

IsBonded implements types.ValidatorI.

func (*Validator) IsCurrentValidator

func (v *Validator) IsCurrentValidator(ackCount uint64) bool

IsCurrentValidator checks if validator is in current validator set

func (*Validator) IsJailed

func (*Validator) IsJailed() bool

IsJailed implements types.ValidatorI.

func (*Validator) IsUnbonded

func (*Validator) IsUnbonded() bool

IsUnbonded implements types.ValidatorI.

func (*Validator) IsUnbonding

func (*Validator) IsUnbonding() bool

IsUnbonding implements types.ValidatorI.

func (*Validator) Marshal

func (m *Validator) Marshal() (dAtA []byte, err error)

func (*Validator) MarshalTo

func (m *Validator) MarshalTo(dAtA []byte) (int, error)

func (*Validator) MarshalToSizedBuffer

func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Validator) MinimalVal

func (v *Validator) MinimalVal() MinimalVal

MinimalVal returns block number of last validator update

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) Reset

func (m *Validator) Reset()

func (*Validator) SharesFromTokens

func (*Validator) SharesFromTokens(_ math.Int) (math.LegacyDec, error)

SharesFromTokens implements types.ValidatorI.

func (*Validator) SharesFromTokensTruncated

func (*Validator) SharesFromTokensTruncated(_ math.Int) (math.LegacyDec, error)

SharesFromTokensTruncated implements types.ValidatorI.

func (*Validator) Size

func (m *Validator) Size() (n int)

func (*Validator) String

func (m *Validator) String() string

func (*Validator) TmConsPublicKey

func (*Validator) TmConsPublicKey() (cosmosCryto.PublicKey, error)

TmConsPublicKey implements types.ValidatorI.

func (*Validator) TokensFromShares

func (*Validator) TokensFromShares(_ math.LegacyDec) math.LegacyDec

TokensFromShares implements types.ValidatorI.

func (*Validator) TokensFromSharesRoundUp

func (*Validator) TokensFromSharesRoundUp(_ math.LegacyDec) math.LegacyDec

TokensFromSharesRoundUp implements types.ValidatorI.

func (*Validator) TokensFromSharesTruncated

func (*Validator) TokensFromSharesTruncated(_ math.LegacyDec) math.LegacyDec

func (*Validator) Unmarshal

func (m *Validator) Unmarshal(dAtA []byte) error

func (*Validator) UpdatedAt

func (v *Validator) UpdatedAt() string

UpdatedAt returns block number of last validator update

func (*Validator) ValidateBasic

func (v *Validator) ValidateBasic() bool

ValidateBasic validates a validator struct

func (*Validator) XXX_DiscardUnknown

func (m *Validator) XXX_DiscardUnknown()

func (*Validator) XXX_Marshal

func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Validator) XXX_Merge

func (m *Validator) XXX_Merge(src proto.Message)

func (*Validator) XXX_Size

func (m *Validator) XXX_Size() int

func (*Validator) XXX_Unmarshal

func (m *Validator) XXX_Unmarshal(b []byte) error

type ValidatorSet

type ValidatorSet struct {
	Validators       []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
	Proposer         *Validator   `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
	TotalVotingPower int64        `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
}

func NewValidatorSet

func NewValidatorSet(validators []*Validator) *ValidatorSet

NewValidatorSet initializes a ValidatorSet by copying over the values from `validators`, a list of Validators. If validators is nil or empty, the new ValidatorSet will have an empty list of Validators. The addresses of validators in `validators` must be unique otherwise the function panics.

func (*ValidatorSet) Copy

func (vals *ValidatorSet) Copy() *ValidatorSet

Copy each validator into a new ValidatorSet.

func (*ValidatorSet) CopyIncrementProposerPriority

func (vals *ValidatorSet) CopyIncrementProposerPriority(times int) *ValidatorSet

CopyIncrementProposerPriority increments ProposerPriority and update the proposer on a copy, and return it.

func (*ValidatorSet) Descriptor

func (*ValidatorSet) Descriptor() ([]byte, []int)

func (*ValidatorSet) Equal

func (this *ValidatorSet) Equal(that interface{}) bool

func (*ValidatorSet) GetByAddress

func (vals *ValidatorSet) GetByAddress(address string) (index int, val *Validator)

GetByAddress returns an index of the validator with address and validator itself if found. Otherwise, -1 and nil are returned.

func (*ValidatorSet) GetByIndex

func (vals *ValidatorSet) GetByIndex(index int) (address string, val *Validator)

GetByIndex returns the validator's address and validator itself by index. It returns nil values if index is less than 0 or greater or equal to len(ValidatorSet.Validators).

func (*ValidatorSet) GetProposer

func (vals *ValidatorSet) GetProposer() (proposer *Validator)

GetProposer returns the current proposer. If the validator set is empty, nil is returned.

func (*ValidatorSet) GetTotalVotingPower

func (vals *ValidatorSet) GetTotalVotingPower() int64

GetTotalVotingPower returns the sum of the voting powers of all validators. It recomputes the total voting power if required.

func (*ValidatorSet) HasAddress

func (vals *ValidatorSet) HasAddress(address string) bool

HasAddress returns true if address given is in the validator set, false otherwise.

func (*ValidatorSet) IncrementProposerPriority

func (vals *ValidatorSet) IncrementProposerPriority(times int)

IncrementProposerPriority increments ProposerPriority of each validator and updates the proposer. Panics if validator set is empty. `times` must be positive.

func (*ValidatorSet) IsNilOrEmpty

func (vals *ValidatorSet) IsNilOrEmpty() bool

IsNilOrEmpty checks whether the validator set is empty or nil

func (*ValidatorSet) Iterate

func (vals *ValidatorSet) Iterate(fn func(index int, val *Validator) bool)

Iterate will run the given function over the set.

func (*ValidatorSet) Len

func (vals *ValidatorSet) Len() int

Len returns the length of the validator set.

func (*ValidatorSet) Marshal

func (m *ValidatorSet) Marshal() (dAtA []byte, err error)

func (*ValidatorSet) MarshalTo

func (m *ValidatorSet) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorSet) MarshalToSizedBuffer

func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorSet) ProtoMessage

func (*ValidatorSet) ProtoMessage()

func (*ValidatorSet) RescalePriorities

func (vals *ValidatorSet) RescalePriorities(diffMax int64)

RescalePriorities rescales the priorities

func (*ValidatorSet) Reset

func (m *ValidatorSet) Reset()

func (*ValidatorSet) Size

func (m *ValidatorSet) Size() (n int)

func (*ValidatorSet) String

func (m *ValidatorSet) String() string

func (*ValidatorSet) Unmarshal

func (m *ValidatorSet) Unmarshal(dAtA []byte) error

func (*ValidatorSet) UpdateWithChangeSet

func (vals *ValidatorSet) UpdateWithChangeSet(changes []*Validator) error

UpdateWithChangeSet attempts to update the validator set with 'changes'. It performs the following steps:

  • validates the changes making sure there are no duplicates and splits them in updates and deletes
  • verifies that applying the changes will not result in errors
  • computes the total voting power BEFORE removals to ensure that in the next steps the priorities across old and newly added validators are fair
  • computes the priorities of new validators against the final set
  • applies the updates against the validator set
  • applies the removals against the validator set
  • performs scaling and centering of priority values

If an error is detected during verification steps, it is returned and the validator set is not changed.

func (*ValidatorSet) XXX_DiscardUnknown

func (m *ValidatorSet) XXX_DiscardUnknown()

func (*ValidatorSet) XXX_Marshal

func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorSet) XXX_Merge

func (m *ValidatorSet) XXX_Merge(src proto.Message)

func (*ValidatorSet) XXX_Size

func (m *ValidatorSet) XXX_Size() int

func (*ValidatorSet) XXX_Unmarshal

func (m *ValidatorSet) XXX_Unmarshal(b []byte) error

type ValidatorsByAddress

type ValidatorsByAddress []*Validator

ValidatorsByAddress sorts validators by address.

func (ValidatorsByAddress) Len

func (vals ValidatorsByAddress) Len() int

func (ValidatorsByAddress) Less

func (vals ValidatorsByAddress) Less(i, j int) bool

func (ValidatorsByAddress) Swap

func (vals ValidatorsByAddress) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL