types

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "metrix"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_metrix"

	// MetricsStorePrefix defines the prefix for the module's metrics store
	MetricsStorePrefix = "metrics"

	// HistoryStorePrefix defines the prefix for the module's historic relay data store
	HistoryStorePrefix = "history"

	// MessageNonceCacheStorePrefix defines the prefix for the module's message nonce cache store.
	MessageNonceCacheStorePrefix = "message-nonce"

	// MessageNonceCacheKey defines the key to access the singleton resource on the message nonce store.
	MessageNonceCacheKey CacheKey = "highest-message-nonce"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

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 (
	ErrInvalidLengthMetrix        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetrix          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetrix = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 ErrInvalidRequest = sdkerrors.Register(ModuleName, 1, "invalid request")

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

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)

Types

type CacheKey

type CacheKey string

func (CacheKey) Bytes

func (m CacheKey) Bytes() []byte

type Empty

type Empty struct {
}

Empty represents an empty message

func (*Empty) Descriptor

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

func (*Empty) Marshal

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

func (*Empty) MarshalTo

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

func (*Empty) MarshalToSizedBuffer

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) Size

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

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Unmarshal

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

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

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

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the paloma module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 HistoricRelayData

type HistoricRelayData struct {
	MessageId              uint64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	Success                bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	ExecutionSpeedInBlocks uint64 `` /* 132-byte string literal not displayed */
}

func (*HistoricRelayData) Descriptor

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

func (*HistoricRelayData) Equal

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

func (*HistoricRelayData) GetExecutionSpeedInBlocks

func (m *HistoricRelayData) GetExecutionSpeedInBlocks() uint64

func (*HistoricRelayData) GetMessageId

func (m *HistoricRelayData) GetMessageId() uint64

func (*HistoricRelayData) GetSuccess

func (m *HistoricRelayData) GetSuccess() bool

func (*HistoricRelayData) Marshal

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

func (*HistoricRelayData) MarshalTo

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

func (*HistoricRelayData) MarshalToSizedBuffer

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

func (*HistoricRelayData) ProtoMessage

func (*HistoricRelayData) ProtoMessage()

func (*HistoricRelayData) Reset

func (m *HistoricRelayData) Reset()

func (*HistoricRelayData) Size

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

func (*HistoricRelayData) String

func (m *HistoricRelayData) String() string

func (*HistoricRelayData) Unmarshal

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

func (*HistoricRelayData) XXX_DiscardUnknown

func (m *HistoricRelayData) XXX_DiscardUnknown()

func (*HistoricRelayData) XXX_Marshal

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

func (*HistoricRelayData) XXX_Merge

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

func (*HistoricRelayData) XXX_Size

func (m *HistoricRelayData) XXX_Size() int

func (*HistoricRelayData) XXX_Unmarshal

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

type Key

type Key []byte

func (Key) Bytes

func (k Key) Bytes() []byte

type MessageAttestedEvent

type MessageAttestedEvent struct {
	AssignedAtBlockHeight  math.Int
	HandledAtBlockHeight   math.Int
	Assignee               sdk.ValAddress
	MessageID              uint64
	WasRelayedSuccessfully bool
}

type MsgClient

type MsgClient interface {
}

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 {
}

MsgServer is the server API for Msg service.

type OnConsensusMessageAttestedListener

type OnConsensusMessageAttestedListener interface {
	OnConsensusMessageAttested(context.Context, MessageAttestedEvent)
}

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Validator queries the metrics of a validator participating in consensus.
	Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error)
	// Validator queries the metrics of a validator participating in consensus.
	Validators(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*QueryValidatorsResponse, error)
	// HistoricRelayData queries the historic relay data on record
	// for a given validator, which is used in performance scoring.
	HistoricRelayData(ctx context.Context, in *QueryHistoricRelayDataRequest, opts ...grpc.CallOption) (*QueryHistoricRelayDataResponse, 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 QueryHistoricRelayDataRequest

type QueryHistoricRelayDataRequest struct {
	// val_address holds the validator address of the validator you want to query
	// for.
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
}

QueryHistoricRelayDataRequest is the request type for the Query/HistoricRelayData RPC method.

func (*QueryHistoricRelayDataRequest) Descriptor

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

func (*QueryHistoricRelayDataRequest) GetValAddress

func (m *QueryHistoricRelayDataRequest) GetValAddress() string

func (*QueryHistoricRelayDataRequest) Marshal

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

func (*QueryHistoricRelayDataRequest) MarshalTo

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

func (*QueryHistoricRelayDataRequest) MarshalToSizedBuffer

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

func (*QueryHistoricRelayDataRequest) ProtoMessage

func (*QueryHistoricRelayDataRequest) ProtoMessage()

func (*QueryHistoricRelayDataRequest) Reset

func (m *QueryHistoricRelayDataRequest) Reset()

func (*QueryHistoricRelayDataRequest) Size

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

func (*QueryHistoricRelayDataRequest) String

func (*QueryHistoricRelayDataRequest) Unmarshal

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

func (*QueryHistoricRelayDataRequest) XXX_DiscardUnknown

func (m *QueryHistoricRelayDataRequest) XXX_DiscardUnknown()

func (*QueryHistoricRelayDataRequest) XXX_Marshal

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

func (*QueryHistoricRelayDataRequest) XXX_Merge

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

func (*QueryHistoricRelayDataRequest) XXX_Size

func (m *QueryHistoricRelayDataRequest) XXX_Size() int

func (*QueryHistoricRelayDataRequest) XXX_Unmarshal

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

type QueryHistoricRelayDataResponse

type QueryHistoricRelayDataResponse struct {
	// history contains the historic relay data for the queried validator.
	History ValidatorHistory `protobuf:"bytes,1,opt,name=history,proto3" json:"history"`
}

QueryHistoricRelayDataResponse is response type for the Query/HistoricRelayData RPC method.

func (*QueryHistoricRelayDataResponse) Descriptor

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

func (*QueryHistoricRelayDataResponse) GetHistory

func (*QueryHistoricRelayDataResponse) Marshal

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

func (*QueryHistoricRelayDataResponse) MarshalTo

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

func (*QueryHistoricRelayDataResponse) MarshalToSizedBuffer

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

func (*QueryHistoricRelayDataResponse) ProtoMessage

func (*QueryHistoricRelayDataResponse) ProtoMessage()

func (*QueryHistoricRelayDataResponse) Reset

func (m *QueryHistoricRelayDataResponse) Reset()

func (*QueryHistoricRelayDataResponse) Size

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

func (*QueryHistoricRelayDataResponse) String

func (*QueryHistoricRelayDataResponse) Unmarshal

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

func (*QueryHistoricRelayDataResponse) XXX_DiscardUnknown

func (m *QueryHistoricRelayDataResponse) XXX_DiscardUnknown()

func (*QueryHistoricRelayDataResponse) XXX_Marshal

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

func (*QueryHistoricRelayDataResponse) XXX_Merge

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

func (*QueryHistoricRelayDataResponse) XXX_Size

func (m *QueryHistoricRelayDataResponse) XXX_Size() int

func (*QueryHistoricRelayDataResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Validator queries the metrics of a validator participating in consensus.
	Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error)
	// Validator queries the metrics of a validator participating in consensus.
	Validators(context.Context, *Empty) (*QueryValidatorsResponse, error)
	// HistoricRelayData queries the historic relay data on record
	// for a given validator, which is used in performance scoring.
	HistoricRelayData(context.Context, *QueryHistoricRelayDataRequest) (*QueryHistoricRelayDataResponse, error)
}

QueryServer is the server API for Query service.

type QueryValidatorRequest

type QueryValidatorRequest struct {
	// val_address holds the validator address of the validator you want to query
	// for.
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
}

QueryValidatorRequest is the request type for the Query/Validator RPC method.

func (*QueryValidatorRequest) Descriptor

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

func (*QueryValidatorRequest) GetValAddress

func (m *QueryValidatorRequest) GetValAddress() string

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_metrics holds the collected metrics info of requested val cons
	// address
	ValMetrics ValidatorMetrics `protobuf:"bytes,1,opt,name=val_metrics,json=valMetrics,proto3" json:"val_metrics"`
}

QueryValidatorResponse is response type for the Query/Validator RPC method.

func (*QueryValidatorResponse) Descriptor

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

func (*QueryValidatorResponse) GetValMetrics

func (m *QueryValidatorResponse) GetValMetrics() ValidatorMetrics

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 QueryValidatorsResponse

type QueryValidatorsResponse struct {
	// validator_metrics holds the collected metrics info of all validators on
	// record
	ValMetrics []ValidatorMetrics `protobuf:"bytes,1,rep,name=val_metrics,json=valMetrics,proto3" json:"val_metrics"`
}

QueryValidatorsResponse is response type for the Query/Validators RPC method.

func (*QueryValidatorsResponse) Descriptor

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

func (*QueryValidatorsResponse) GetValMetrics

func (m *QueryValidatorsResponse) GetValMetrics() []ValidatorMetrics

func (*QueryValidatorsResponse) Marshal

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

func (*QueryValidatorsResponse) MarshalTo

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

func (*QueryValidatorsResponse) MarshalToSizedBuffer

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

func (*QueryValidatorsResponse) ProtoMessage

func (*QueryValidatorsResponse) ProtoMessage()

func (*QueryValidatorsResponse) Reset

func (m *QueryValidatorsResponse) Reset()

func (*QueryValidatorsResponse) Size

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

func (*QueryValidatorsResponse) String

func (m *QueryValidatorsResponse) String() string

func (*QueryValidatorsResponse) Unmarshal

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

func (*QueryValidatorsResponse) XXX_DiscardUnknown

func (m *QueryValidatorsResponse) XXX_DiscardUnknown()

func (*QueryValidatorsResponse) XXX_Marshal

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

func (*QueryValidatorsResponse) XXX_Merge

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

func (*QueryValidatorsResponse) XXX_Size

func (m *QueryValidatorsResponse) XXX_Size() int

func (*QueryValidatorsResponse) XXX_Unmarshal

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

type SlashingKeeper

type SlashingKeeper interface {
	SignedBlocksWindow(context.Context) (int64, error)
	IterateValidatorSigningInfos(context.Context, func(sdk.ConsAddress, slashingtypes.ValidatorSigningInfo) (stop bool)) error
}

type StakingKeeper

type StakingKeeper interface {
	GetValidator(context.Context, sdk.ValAddress) (stakingtypes.Validator, error)
	GetValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.Validator, error)
	IterateValidators(context.Context, func(int64, stakingtypes.ValidatorI) bool) error
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) HistoricRelayData

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Validator

func (*UnimplementedQueryServer) Validators

type ValidatorHistory

type ValidatorHistory struct {
	// validator address of a validator participating in consensus.
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
	// records contain records of the last `n` messages relayed by
	// the validator.
	// Records older than `n` are discared and no longer affect
	// performance scoring.
	Records []HistoricRelayData `protobuf:"bytes,2,rep,name=records,proto3" json:"records"`
}

func (*ValidatorHistory) Descriptor

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

func (*ValidatorHistory) GetRecords

func (m *ValidatorHistory) GetRecords() []HistoricRelayData

func (*ValidatorHistory) GetValAddress

func (m *ValidatorHistory) GetValAddress() string

func (*ValidatorHistory) Marshal

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

func (*ValidatorHistory) MarshalTo

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

func (*ValidatorHistory) MarshalToSizedBuffer

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

func (*ValidatorHistory) ProtoMessage

func (*ValidatorHistory) ProtoMessage()

func (*ValidatorHistory) Reset

func (m *ValidatorHistory) Reset()

func (*ValidatorHistory) Size

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

func (*ValidatorHistory) String

func (m *ValidatorHistory) String() string

func (*ValidatorHistory) Unmarshal

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

func (*ValidatorHistory) XXX_DiscardUnknown

func (m *ValidatorHistory) XXX_DiscardUnknown()

func (*ValidatorHistory) XXX_Marshal

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

func (*ValidatorHistory) XXX_Merge

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

func (*ValidatorHistory) XXX_Size

func (m *ValidatorHistory) XXX_Size() int

func (*ValidatorHistory) XXX_Unmarshal

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

type ValidatorMetrics

type ValidatorMetrics struct {
	// Validator address of a validator participating in consensus.
	ValAddress string `protobuf:"bytes,1,opt,name=val_address,json=valAddress,proto3" json:"val_address,omitempty"`
	// Percentage of validator uptime within the signed blocks window.
	// Higher is better ([0,1]).
	Uptime cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=uptime,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"uptime"`
	// Percent of validator's relay success rate over the last
	// params.relay_metrics_window messages. Higher is better ([0,1]).
	SuccessRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=success_rate,json=successRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"success_rate"`
	// A median value in ms of the relay execution time over the
	// last params.relay_metrics_window messages. Lower is better, 0 means
	// no collected data.
	ExecutionTime cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=execution_time,json=executionTime,proto3,customtype=cosmossdk.io/math.Int" json:"execution_time"`
	// The value of the relaying fee the relayer has specified for themselves.
	// Lower is better, 0 means no fee.
	Fee cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=fee,proto3,customtype=cosmossdk.io/math.Int" json:"fee"`
	// Artificial decimal value representing the total amount of optional support
	// features that this validator has enabled. Higher is better ([0,1]).
	FeatureSet cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=feature_set,json=featureSet,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"feature_set"`
}

ValidatorMetrics defines a validator's collected metrics to be used during relayer selection.

func (*ValidatorMetrics) Descriptor

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

func (*ValidatorMetrics) Equal

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

func (*ValidatorMetrics) GetValAddress

func (m *ValidatorMetrics) GetValAddress() string

func (*ValidatorMetrics) Marshal

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

func (*ValidatorMetrics) MarshalTo

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

func (*ValidatorMetrics) MarshalToSizedBuffer

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

func (*ValidatorMetrics) ProtoMessage

func (*ValidatorMetrics) ProtoMessage()

func (*ValidatorMetrics) Reset

func (m *ValidatorMetrics) Reset()

func (*ValidatorMetrics) Size

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

func (*ValidatorMetrics) String

func (m *ValidatorMetrics) String() string

func (*ValidatorMetrics) Unmarshal

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

func (*ValidatorMetrics) XXX_DiscardUnknown

func (m *ValidatorMetrics) XXX_DiscardUnknown()

func (*ValidatorMetrics) XXX_Marshal

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

func (*ValidatorMetrics) XXX_Merge

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

func (*ValidatorMetrics) XXX_Size

func (m *ValidatorMetrics) XXX_Size() int

func (*ValidatorMetrics) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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