validatorv1

package
v0.0.0-...-dd98aab Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

View Source
const (
	Msg_AddValidator_FullMethodName    = "/chora.validator.v1.Msg/AddValidator"
	Msg_RemoveValidator_FullMethodName = "/chora.validator.v1.Msg/RemoveValidator"
	Msg_UpdatePolicy_FullMethodName    = "/chora.validator.v1.Msg/UpdatePolicy"
	Msg_UpdateValidator_FullMethodName = "/chora.validator.v1.Msg/UpdateValidator"
)
View Source
const (
	Query_Policy_FullMethodName     = "/chora.validator.v1.Query/Policy"
	Query_Validator_FullMethodName  = "/chora.validator.v1.Query/Validator"
	Query_Validators_FullMethodName = "/chora.validator.v1.Query/Validators"
)

Variables

View Source
var File_chora_validator_v1_doc_proto protoreflect.FileDescriptor
View Source
var File_chora_validator_v1_events_proto protoreflect.FileDescriptor
View Source
var File_chora_validator_v1_msg_proto protoreflect.FileDescriptor
View Source
var File_chora_validator_v1_query_proto protoreflect.FileDescriptor
View Source
var File_chora_validator_v1_state_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chora.validator.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddValidator",
			Handler:    _Msg_AddValidator_Handler,
		},
		{
			MethodName: "RemoveValidator",
			Handler:    _Msg_RemoveValidator_Handler,
		},
		{
			MethodName: "UpdatePolicy",
			Handler:    _Msg_UpdatePolicy_Handler,
		},
		{
			MethodName: "UpdateValidator",
			Handler:    _Msg_UpdateValidator_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chora/validator/v1/msg.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chora.validator.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Policy",
			Handler:    _Query_Policy_Handler,
		},
		{
			MethodName: "Validator",
			Handler:    _Query_Validator_Handler,
		},
		{
			MethodName: "Validators",
			Handler:    _Query_Validators_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chora/validator/v1/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type EventAddValidator

type EventAddValidator struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

EventAddValidator is an event emitted when a validator is added.

func (*EventAddValidator) Descriptor deprecated

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

Deprecated: Use EventAddValidator.ProtoReflect.Descriptor instead.

func (*EventAddValidator) GetAddress

func (x *EventAddValidator) GetAddress() string

func (*EventAddValidator) ProtoMessage

func (*EventAddValidator) ProtoMessage()

func (*EventAddValidator) ProtoReflect

func (x *EventAddValidator) ProtoReflect() protoreflect.Message

func (*EventAddValidator) Reset

func (x *EventAddValidator) Reset()

func (*EventAddValidator) String

func (x *EventAddValidator) String() string

type EventMissedBlock

type EventMissedBlock struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

EventMissedBlock is an event emitted when a validator missed a block.

func (*EventMissedBlock) Descriptor deprecated

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

Deprecated: Use EventMissedBlock.ProtoReflect.Descriptor instead.

func (*EventMissedBlock) GetAddress

func (x *EventMissedBlock) GetAddress() string

func (*EventMissedBlock) ProtoMessage

func (*EventMissedBlock) ProtoMessage()

func (*EventMissedBlock) ProtoReflect

func (x *EventMissedBlock) ProtoReflect() protoreflect.Message

func (*EventMissedBlock) Reset

func (x *EventMissedBlock) Reset()

func (*EventMissedBlock) String

func (x *EventMissedBlock) String() string

type EventRemoveValidator

type EventRemoveValidator struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

EventRemoveValidator is an event emitted when a validator is removed.

func (*EventRemoveValidator) Descriptor deprecated

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

Deprecated: Use EventRemoveValidator.ProtoReflect.Descriptor instead.

func (*EventRemoveValidator) GetAddress

func (x *EventRemoveValidator) GetAddress() string

func (*EventRemoveValidator) ProtoMessage

func (*EventRemoveValidator) ProtoMessage()

func (*EventRemoveValidator) ProtoReflect

func (x *EventRemoveValidator) ProtoReflect() protoreflect.Message

func (*EventRemoveValidator) Reset

func (x *EventRemoveValidator) Reset()

func (*EventRemoveValidator) String

func (x *EventRemoveValidator) String() string

type EventUpdatePolicy

type EventUpdatePolicy struct {

	// signed_blocks_window is the window within which a validator is expected to
	// sign a block.
	SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	// min_signed_per_window is the minimum number of signed blocks per signed
	// blocks window.
	MinSignedPerWindow int64 `protobuf:"varint,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"`
	// contains filtered or unexported fields
}

EventUpdatePolicy is an event emitted when the policy is updated.

func (*EventUpdatePolicy) Descriptor deprecated

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

Deprecated: Use EventUpdatePolicy.ProtoReflect.Descriptor instead.

func (*EventUpdatePolicy) GetMinSignedPerWindow

func (x *EventUpdatePolicy) GetMinSignedPerWindow() int64

func (*EventUpdatePolicy) GetSignedBlocksWindow

func (x *EventUpdatePolicy) GetSignedBlocksWindow() int64

func (*EventUpdatePolicy) ProtoMessage

func (*EventUpdatePolicy) ProtoMessage()

func (*EventUpdatePolicy) ProtoReflect

func (x *EventUpdatePolicy) ProtoReflect() protoreflect.Message

func (*EventUpdatePolicy) Reset

func (x *EventUpdatePolicy) Reset()

func (*EventUpdatePolicy) String

func (x *EventUpdatePolicy) String() string

type EventUpdateValidator

type EventUpdateValidator struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

EventUpdateValidator is an event emitted when a validator is updated.

func (*EventUpdateValidator) Descriptor deprecated

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

Deprecated: Use EventUpdateValidator.ProtoReflect.Descriptor instead.

func (*EventUpdateValidator) GetAddress

func (x *EventUpdateValidator) GetAddress() string

func (*EventUpdateValidator) ProtoMessage

func (*EventUpdateValidator) ProtoMessage()

func (*EventUpdateValidator) ProtoReflect

func (x *EventUpdateValidator) ProtoReflect() protoreflect.Message

func (*EventUpdateValidator) Reset

func (x *EventUpdateValidator) Reset()

func (*EventUpdateValidator) String

func (x *EventUpdateValidator) String() string

type MsgAddValidator

type MsgAddValidator struct {

	// authority is the address of the authority.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// address is the address of the validator.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// operator is the address of the operator.
	Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
	// metadata is the metadata of the validator.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

MsgAddValidator is the Msg/AddValidator request type.

func (*MsgAddValidator) Descriptor deprecated

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

Deprecated: Use MsgAddValidator.ProtoReflect.Descriptor instead.

func (*MsgAddValidator) GetAddress

func (x *MsgAddValidator) GetAddress() string

func (*MsgAddValidator) GetAuthority

func (x *MsgAddValidator) GetAuthority() string

func (*MsgAddValidator) GetMetadata

func (x *MsgAddValidator) GetMetadata() string

func (*MsgAddValidator) GetOperator

func (x *MsgAddValidator) GetOperator() string

func (*MsgAddValidator) ProtoMessage

func (*MsgAddValidator) ProtoMessage()

func (*MsgAddValidator) ProtoReflect

func (x *MsgAddValidator) ProtoReflect() protoreflect.Message

func (*MsgAddValidator) Reset

func (x *MsgAddValidator) Reset()

func (*MsgAddValidator) String

func (x *MsgAddValidator) String() string

type MsgAddValidatorResponse

type MsgAddValidatorResponse struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

MsgAddValidatorResponse is the Msg/AddValidator response type.

func (*MsgAddValidatorResponse) Descriptor deprecated

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

Deprecated: Use MsgAddValidatorResponse.ProtoReflect.Descriptor instead.

func (*MsgAddValidatorResponse) GetAddress

func (x *MsgAddValidatorResponse) GetAddress() string

func (*MsgAddValidatorResponse) ProtoMessage

func (*MsgAddValidatorResponse) ProtoMessage()

func (*MsgAddValidatorResponse) ProtoReflect

func (x *MsgAddValidatorResponse) ProtoReflect() protoreflect.Message

func (*MsgAddValidatorResponse) Reset

func (x *MsgAddValidatorResponse) Reset()

func (*MsgAddValidatorResponse) String

func (x *MsgAddValidatorResponse) String() string

type MsgClient

type MsgClient interface {
	// AddValidator adds a validator (restricted to authority).
	AddValidator(ctx context.Context, in *MsgAddValidator, opts ...grpc.CallOption) (*MsgAddValidatorResponse, error)
	// RemoveValidator removes a validator (restricted to authority).
	RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error)
	// UpdatePolicy updates the policy (restricted to authority).
	UpdatePolicy(ctx context.Context, in *MsgUpdatePolicy, opts ...grpc.CallOption) (*MsgUpdatePolicyResponse, error)
	// UpdateValidator updates a validator (restricted to operator).
	UpdateValidator(ctx context.Context, in *MsgUpdateValidator, opts ...grpc.CallOption) (*MsgUpdateValidatorResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgRemoveValidator

type MsgRemoveValidator struct {

	// authority is the address of the authority.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// address is the address of the validator.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

MsgRemoveValidator is the Msg/RemoveValidator request type.

func (*MsgRemoveValidator) Descriptor deprecated

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

Deprecated: Use MsgRemoveValidator.ProtoReflect.Descriptor instead.

func (*MsgRemoveValidator) GetAddress

func (x *MsgRemoveValidator) GetAddress() string

func (*MsgRemoveValidator) GetAuthority

func (x *MsgRemoveValidator) GetAuthority() string

func (*MsgRemoveValidator) ProtoMessage

func (*MsgRemoveValidator) ProtoMessage()

func (*MsgRemoveValidator) ProtoReflect

func (x *MsgRemoveValidator) ProtoReflect() protoreflect.Message

func (*MsgRemoveValidator) Reset

func (x *MsgRemoveValidator) Reset()

func (*MsgRemoveValidator) String

func (x *MsgRemoveValidator) String() string

type MsgRemoveValidatorResponse

type MsgRemoveValidatorResponse struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

MsgRemoveValidatorResponse is the Msg/RemoveValidator response type.

func (*MsgRemoveValidatorResponse) Descriptor deprecated

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

Deprecated: Use MsgRemoveValidatorResponse.ProtoReflect.Descriptor instead.

func (*MsgRemoveValidatorResponse) GetAddress

func (x *MsgRemoveValidatorResponse) GetAddress() string

func (*MsgRemoveValidatorResponse) ProtoMessage

func (*MsgRemoveValidatorResponse) ProtoMessage()

func (*MsgRemoveValidatorResponse) ProtoReflect

func (*MsgRemoveValidatorResponse) Reset

func (x *MsgRemoveValidatorResponse) Reset()

func (*MsgRemoveValidatorResponse) String

func (x *MsgRemoveValidatorResponse) String() string

type MsgServer

type MsgServer interface {
	// AddValidator adds a validator (restricted to authority).
	AddValidator(context.Context, *MsgAddValidator) (*MsgAddValidatorResponse, error)
	// RemoveValidator removes a validator (restricted to authority).
	RemoveValidator(context.Context, *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error)
	// UpdatePolicy updates the policy (restricted to authority).
	UpdatePolicy(context.Context, *MsgUpdatePolicy) (*MsgUpdatePolicyResponse, error)
	// UpdateValidator updates a validator (restricted to operator).
	UpdateValidator(context.Context, *MsgUpdateValidator) (*MsgUpdateValidatorResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type MsgUpdatePolicy

type MsgUpdatePolicy struct {

	// authority is the address of the authority.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// signed_blocks_window is the window within which a validator is expected to
	// sign a block.
	SignedBlocksWindow int64 `protobuf:"varint,2,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	// min_signed_per_window is the minimum number of signed blocks per signed
	// blocks window.
	MinSignedPerWindow int64 `protobuf:"varint,3,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdatePolicy is the Msg/UpdatePolicy request type.

func (*MsgUpdatePolicy) Descriptor deprecated

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

Deprecated: Use MsgUpdatePolicy.ProtoReflect.Descriptor instead.

func (*MsgUpdatePolicy) GetAuthority

func (x *MsgUpdatePolicy) GetAuthority() string

func (*MsgUpdatePolicy) GetMinSignedPerWindow

func (x *MsgUpdatePolicy) GetMinSignedPerWindow() int64

func (*MsgUpdatePolicy) GetSignedBlocksWindow

func (x *MsgUpdatePolicy) GetSignedBlocksWindow() int64

func (*MsgUpdatePolicy) ProtoMessage

func (*MsgUpdatePolicy) ProtoMessage()

func (*MsgUpdatePolicy) ProtoReflect

func (x *MsgUpdatePolicy) ProtoReflect() protoreflect.Message

func (*MsgUpdatePolicy) Reset

func (x *MsgUpdatePolicy) Reset()

func (*MsgUpdatePolicy) String

func (x *MsgUpdatePolicy) String() string

type MsgUpdatePolicyResponse

type MsgUpdatePolicyResponse struct {

	// signed_blocks_window is the window within which a validator is expected to
	// sign a block.
	SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	// min_signed_per_window is the minimum number of signed blocks per signed
	// blocks window.
	MinSignedPerWindow int64 `protobuf:"varint,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdatePolicyResponse is the Msg/UpdatePolicy response type.

func (*MsgUpdatePolicyResponse) Descriptor deprecated

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

Deprecated: Use MsgUpdatePolicyResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdatePolicyResponse) GetMinSignedPerWindow

func (x *MsgUpdatePolicyResponse) GetMinSignedPerWindow() int64

func (*MsgUpdatePolicyResponse) GetSignedBlocksWindow

func (x *MsgUpdatePolicyResponse) GetSignedBlocksWindow() int64

func (*MsgUpdatePolicyResponse) ProtoMessage

func (*MsgUpdatePolicyResponse) ProtoMessage()

func (*MsgUpdatePolicyResponse) ProtoReflect

func (x *MsgUpdatePolicyResponse) ProtoReflect() protoreflect.Message

func (*MsgUpdatePolicyResponse) Reset

func (x *MsgUpdatePolicyResponse) Reset()

func (*MsgUpdatePolicyResponse) String

func (x *MsgUpdatePolicyResponse) String() string

type MsgUpdateValidator

type MsgUpdateValidator struct {

	// operator is the address of the operator.
	Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"`
	// address is the address of the validator.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// new_metadata is the new metadata of the validator.
	NewMetadata string `protobuf:"bytes,3,opt,name=new_metadata,json=newMetadata,proto3" json:"new_metadata,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdateValidator is the Msg/UpdateValidator request type.

func (*MsgUpdateValidator) Descriptor deprecated

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

Deprecated: Use MsgUpdateValidator.ProtoReflect.Descriptor instead.

func (*MsgUpdateValidator) GetAddress

func (x *MsgUpdateValidator) GetAddress() string

func (*MsgUpdateValidator) GetNewMetadata

func (x *MsgUpdateValidator) GetNewMetadata() string

func (*MsgUpdateValidator) GetOperator

func (x *MsgUpdateValidator) GetOperator() string

func (*MsgUpdateValidator) ProtoMessage

func (*MsgUpdateValidator) ProtoMessage()

func (*MsgUpdateValidator) ProtoReflect

func (x *MsgUpdateValidator) ProtoReflect() protoreflect.Message

func (*MsgUpdateValidator) Reset

func (x *MsgUpdateValidator) Reset()

func (*MsgUpdateValidator) String

func (x *MsgUpdateValidator) String() string

type MsgUpdateValidatorResponse

type MsgUpdateValidatorResponse struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdateValidatorResponse is the Msg/UpdateValidator response type.

func (*MsgUpdateValidatorResponse) Descriptor deprecated

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

Deprecated: Use MsgUpdateValidatorResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdateValidatorResponse) GetAddress

func (x *MsgUpdateValidatorResponse) GetAddress() string

func (*MsgUpdateValidatorResponse) ProtoMessage

func (*MsgUpdateValidatorResponse) ProtoMessage()

func (*MsgUpdateValidatorResponse) ProtoReflect

func (*MsgUpdateValidatorResponse) Reset

func (x *MsgUpdateValidatorResponse) Reset()

func (*MsgUpdateValidatorResponse) String

func (x *MsgUpdateValidatorResponse) String() string

type Policy

type Policy struct {

	// signed_blocks_window is the window within which a validator is expected to
	// sign a block.
	SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	// min_signed_per_window is the minimum number of signed blocks per signed
	// blocks window.
	MinSignedPerWindow int64 `protobuf:"varint,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"`
	// contains filtered or unexported fields
}

Policy defines a singleton table for the signing policy.

func (*Policy) Descriptor deprecated

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

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetMinSignedPerWindow

func (x *Policy) GetMinSignedPerWindow() int64

func (*Policy) GetSignedBlocksWindow

func (x *Policy) GetSignedBlocksWindow() int64

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

type PolicyTable

type PolicyTable interface {
	Get(ctx context.Context) (*Policy, error)
	Save(ctx context.Context, policy *Policy) error
}

singleton store

func NewPolicyTable

func NewPolicyTable(db ormtable.Schema) (PolicyTable, error)

type QueryClient

type QueryClient interface {
	// Policy queries the maximum number of missed blocks before a validator is
	// removed from the validator set.
	Policy(ctx context.Context, in *QueryPolicyRequest, opts ...grpc.CallOption) (*QueryPolicyResponse, error)
	// Validator queries a validator by address.
	Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error)
	// Validators queries all validators.
	Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryPolicyRequest

type QueryPolicyRequest struct {
	// contains filtered or unexported fields
}

QueryPolicyRequest is the Query/Policy request type.

func (*QueryPolicyRequest) Descriptor deprecated

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

Deprecated: Use QueryPolicyRequest.ProtoReflect.Descriptor instead.

func (*QueryPolicyRequest) ProtoMessage

func (*QueryPolicyRequest) ProtoMessage()

func (*QueryPolicyRequest) ProtoReflect

func (x *QueryPolicyRequest) ProtoReflect() protoreflect.Message

func (*QueryPolicyRequest) Reset

func (x *QueryPolicyRequest) Reset()

func (*QueryPolicyRequest) String

func (x *QueryPolicyRequest) String() string

type QueryPolicyResponse

type QueryPolicyResponse struct {

	// signed_blocks_window is the window within which a validator is expected to
	// sign a block.
	SignedBlocksWindow int64 `protobuf:"varint,1,opt,name=signed_blocks_window,json=signedBlocksWindow,proto3" json:"signed_blocks_window,omitempty"`
	// min_signed_per_window is the minimum number of signed blocks per signed
	// blocks window.
	MinSignedPerWindow int64 `protobuf:"varint,2,opt,name=min_signed_per_window,json=minSignedPerWindow,proto3" json:"min_signed_per_window,omitempty"`
	// contains filtered or unexported fields
}

QueryPolicyResponse is the Query/Policy response type.

func (*QueryPolicyResponse) Descriptor deprecated

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

Deprecated: Use QueryPolicyResponse.ProtoReflect.Descriptor instead.

func (*QueryPolicyResponse) GetMinSignedPerWindow

func (x *QueryPolicyResponse) GetMinSignedPerWindow() int64

func (*QueryPolicyResponse) GetSignedBlocksWindow

func (x *QueryPolicyResponse) GetSignedBlocksWindow() int64

func (*QueryPolicyResponse) ProtoMessage

func (*QueryPolicyResponse) ProtoMessage()

func (*QueryPolicyResponse) ProtoReflect

func (x *QueryPolicyResponse) ProtoReflect() protoreflect.Message

func (*QueryPolicyResponse) Reset

func (x *QueryPolicyResponse) Reset()

func (*QueryPolicyResponse) String

func (x *QueryPolicyResponse) String() string

type QueryServer

type QueryServer interface {
	// Policy queries the maximum number of missed blocks before a validator is
	// removed from the validator set.
	Policy(context.Context, *QueryPolicyRequest) (*QueryPolicyResponse, error)
	// Validator queries a validator by address.
	Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error)
	// Validators queries all validators.
	Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type QueryValidatorRequest

type QueryValidatorRequest struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

QueryValidatorRequest is the Query/Validator request type.

func (*QueryValidatorRequest) Descriptor deprecated

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

Deprecated: Use QueryValidatorRequest.ProtoReflect.Descriptor instead.

func (*QueryValidatorRequest) GetAddress

func (x *QueryValidatorRequest) GetAddress() string

func (*QueryValidatorRequest) ProtoMessage

func (*QueryValidatorRequest) ProtoMessage()

func (*QueryValidatorRequest) ProtoReflect

func (x *QueryValidatorRequest) ProtoReflect() protoreflect.Message

func (*QueryValidatorRequest) Reset

func (x *QueryValidatorRequest) Reset()

func (*QueryValidatorRequest) String

func (x *QueryValidatorRequest) String() string

type QueryValidatorResponse

type QueryValidatorResponse struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// metadata is the metadata of the validator.
	Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// missed_blocks is the number of missed blocks.
	MissedBlocks int64 `protobuf:"varint,3,opt,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks,omitempty"`
	// contains filtered or unexported fields
}

QueryValidatorResponse is the Query/Validator response type.

func (*QueryValidatorResponse) Descriptor deprecated

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

Deprecated: Use QueryValidatorResponse.ProtoReflect.Descriptor instead.

func (*QueryValidatorResponse) GetAddress

func (x *QueryValidatorResponse) GetAddress() string

func (*QueryValidatorResponse) GetMetadata

func (x *QueryValidatorResponse) GetMetadata() string

func (*QueryValidatorResponse) GetMissedBlocks

func (x *QueryValidatorResponse) GetMissedBlocks() int64

func (*QueryValidatorResponse) ProtoMessage

func (*QueryValidatorResponse) ProtoMessage()

func (*QueryValidatorResponse) ProtoReflect

func (x *QueryValidatorResponse) ProtoReflect() protoreflect.Message

func (*QueryValidatorResponse) Reset

func (x *QueryValidatorResponse) Reset()

func (*QueryValidatorResponse) String

func (x *QueryValidatorResponse) String() string

type QueryValidatorsRequest

type QueryValidatorsRequest struct {

	// pagination is the optional pagination of the request.
	Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryValidatorsRequest is the Query/Validators request type.

func (*QueryValidatorsRequest) Descriptor deprecated

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

Deprecated: Use QueryValidatorsRequest.ProtoReflect.Descriptor instead.

func (*QueryValidatorsRequest) GetPagination

func (x *QueryValidatorsRequest) GetPagination() *v1beta1.PageRequest

func (*QueryValidatorsRequest) ProtoMessage

func (*QueryValidatorsRequest) ProtoMessage()

func (*QueryValidatorsRequest) ProtoReflect

func (x *QueryValidatorsRequest) ProtoReflect() protoreflect.Message

func (*QueryValidatorsRequest) Reset

func (x *QueryValidatorsRequest) Reset()

func (*QueryValidatorsRequest) String

func (x *QueryValidatorsRequest) String() string

type QueryValidatorsResponse

type QueryValidatorsResponse struct {

	// validators is the list of validators.
	Validators []*QueryValidatorsResponse_Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
	// pagination is the pagination of the response.
	Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryValidatorsResponse is the Query/Validators response type.

func (*QueryValidatorsResponse) Descriptor deprecated

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

Deprecated: Use QueryValidatorsResponse.ProtoReflect.Descriptor instead.

func (*QueryValidatorsResponse) GetPagination

func (x *QueryValidatorsResponse) GetPagination() *v1beta1.PageResponse

func (*QueryValidatorsResponse) GetValidators

func (*QueryValidatorsResponse) ProtoMessage

func (*QueryValidatorsResponse) ProtoMessage()

func (*QueryValidatorsResponse) ProtoReflect

func (x *QueryValidatorsResponse) ProtoReflect() protoreflect.Message

func (*QueryValidatorsResponse) Reset

func (x *QueryValidatorsResponse) Reset()

func (*QueryValidatorsResponse) String

func (x *QueryValidatorsResponse) String() string

type QueryValidatorsResponse_Validator

type QueryValidatorsResponse_Validator struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// metadata is the metadata of the validator.
	Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// missed_blocks is the number of missed blocks.
	MissedBlocks int64 `protobuf:"varint,3,opt,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks,omitempty"`
	// contains filtered or unexported fields
}

Validator is the validator properties.

func (*QueryValidatorsResponse_Validator) Descriptor deprecated

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

Deprecated: Use QueryValidatorsResponse_Validator.ProtoReflect.Descriptor instead.

func (*QueryValidatorsResponse_Validator) GetAddress

func (x *QueryValidatorsResponse_Validator) GetAddress() string

func (*QueryValidatorsResponse_Validator) GetMetadata

func (x *QueryValidatorsResponse_Validator) GetMetadata() string

func (*QueryValidatorsResponse_Validator) GetMissedBlocks

func (x *QueryValidatorsResponse_Validator) GetMissedBlocks() int64

func (*QueryValidatorsResponse_Validator) ProtoMessage

func (*QueryValidatorsResponse_Validator) ProtoMessage()

func (*QueryValidatorsResponse_Validator) ProtoReflect

func (*QueryValidatorsResponse_Validator) Reset

func (*QueryValidatorsResponse_Validator) String

type StateStore

type StateStore interface {
	PolicyTable() PolicyTable
	ValidatorTable() ValidatorTable
	ValidatorSigningInfoTable() ValidatorSigningInfoTable
	// contains filtered or unexported methods
}

func NewStateStore

func NewStateStore(db ormtable.Schema) (StateStore, error)

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) AddValidator

func (UnimplementedMsgServer) RemoveValidator

func (UnimplementedMsgServer) UpdatePolicy

func (UnimplementedMsgServer) UpdateValidator

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Policy

func (UnimplementedQueryServer) Validator

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

type Validator

type Validator struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// operator is the address of the operator.
	Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	// metadata is the metadata of the validator.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Validator defines the table and properties of a validator.

func (*Validator) Descriptor deprecated

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

Deprecated: Use Validator.ProtoReflect.Descriptor instead.

func (*Validator) GetAddress

func (x *Validator) GetAddress() string

func (*Validator) GetMetadata

func (x *Validator) GetMetadata() string

func (*Validator) GetOperator

func (x *Validator) GetOperator() string

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) ProtoReflect

func (x *Validator) ProtoReflect() protoreflect.Message

func (*Validator) Reset

func (x *Validator) Reset()

func (*Validator) String

func (x *Validator) String() string

type ValidatorAddressIndexKey

type ValidatorAddressIndexKey struct {
	// contains filtered or unexported fields
}

func (ValidatorAddressIndexKey) WithAddress

func (this ValidatorAddressIndexKey) WithAddress(address string) ValidatorAddressIndexKey

type ValidatorIndexKey

type ValidatorIndexKey interface {
	// contains filtered or unexported methods
}

type ValidatorIterator

type ValidatorIterator struct {
	ormtable.Iterator
}

func (ValidatorIterator) Value

func (i ValidatorIterator) Value() (*Validator, error)

type ValidatorOperatorIndexKey

type ValidatorOperatorIndexKey struct {
	// contains filtered or unexported fields
}

func (ValidatorOperatorIndexKey) WithOperator

func (this ValidatorOperatorIndexKey) WithOperator(operator string) ValidatorOperatorIndexKey

type ValidatorPrimaryKey

type ValidatorPrimaryKey = ValidatorAddressIndexKey

primary key starting index..

type ValidatorSigningInfo

type ValidatorSigningInfo struct {

	// address is the address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// start_height is the validator start height.
	StartHeight int64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"`
	// index_offset is incremented every time a validator is bonded in a block.
	// This in conjunction with the signed_blocks_window param determines the
	// index in the missed block bitmap.
	IndexOffset int64 `protobuf:"varint,3,opt,name=index_offset,json=indexOffset,proto3" json:"index_offset,omitempty"`
	// missed_blocks contains missed blocks.
	MissedBlocks []*ValidatorSigningInfo_MissedBlock `protobuf:"bytes,4,rep,name=missed_blocks,json=missedBlocks,proto3" json:"missed_blocks,omitempty"`
	// missed_blocks_count is the number of missed blocks.
	MissedBlocksCount int64 `protobuf:"varint,5,opt,name=missed_blocks_count,json=missedBlocksCount,proto3" json:"missed_blocks_count,omitempty"`
	// contains filtered or unexported fields
}

ValidatorSigningInfo extends the table and properties of a validator.

func (*ValidatorSigningInfo) Descriptor deprecated

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

Deprecated: Use ValidatorSigningInfo.ProtoReflect.Descriptor instead.

func (*ValidatorSigningInfo) GetAddress

func (x *ValidatorSigningInfo) GetAddress() string

func (*ValidatorSigningInfo) GetIndexOffset

func (x *ValidatorSigningInfo) GetIndexOffset() int64

func (*ValidatorSigningInfo) GetMissedBlocks

func (*ValidatorSigningInfo) GetMissedBlocksCount

func (x *ValidatorSigningInfo) GetMissedBlocksCount() int64

func (*ValidatorSigningInfo) GetStartHeight

func (x *ValidatorSigningInfo) GetStartHeight() int64

func (*ValidatorSigningInfo) ProtoMessage

func (*ValidatorSigningInfo) ProtoMessage()

func (*ValidatorSigningInfo) ProtoReflect

func (x *ValidatorSigningInfo) ProtoReflect() protoreflect.Message

func (*ValidatorSigningInfo) Reset

func (x *ValidatorSigningInfo) Reset()

func (*ValidatorSigningInfo) String

func (x *ValidatorSigningInfo) String() string

type ValidatorSigningInfoAddressIndexKey

type ValidatorSigningInfoAddressIndexKey struct {
	// contains filtered or unexported fields
}

func (ValidatorSigningInfoAddressIndexKey) WithAddress

type ValidatorSigningInfoIndexKey

type ValidatorSigningInfoIndexKey interface {
	// contains filtered or unexported methods
}

type ValidatorSigningInfoIterator

type ValidatorSigningInfoIterator struct {
	ormtable.Iterator
}

func (ValidatorSigningInfoIterator) Value

type ValidatorSigningInfoPrimaryKey

type ValidatorSigningInfoPrimaryKey = ValidatorSigningInfoAddressIndexKey

primary key starting index..

type ValidatorSigningInfoTable

type ValidatorSigningInfoTable interface {
	Insert(ctx context.Context, validatorSigningInfo *ValidatorSigningInfo) error
	Update(ctx context.Context, validatorSigningInfo *ValidatorSigningInfo) error
	Save(ctx context.Context, validatorSigningInfo *ValidatorSigningInfo) error
	Delete(ctx context.Context, validatorSigningInfo *ValidatorSigningInfo) error
	Has(ctx context.Context, address string) (found bool, err error)
	// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
	Get(ctx context.Context, address string) (*ValidatorSigningInfo, error)
	List(ctx context.Context, prefixKey ValidatorSigningInfoIndexKey, opts ...ormlist.Option) (ValidatorSigningInfoIterator, error)
	ListRange(ctx context.Context, from, to ValidatorSigningInfoIndexKey, opts ...ormlist.Option) (ValidatorSigningInfoIterator, error)
	DeleteBy(ctx context.Context, prefixKey ValidatorSigningInfoIndexKey) error
	DeleteRange(ctx context.Context, from, to ValidatorSigningInfoIndexKey) error
	// contains filtered or unexported methods
}

func NewValidatorSigningInfoTable

func NewValidatorSigningInfoTable(db ormtable.Schema) (ValidatorSigningInfoTable, error)

type ValidatorSigningInfo_MissedBlock

type ValidatorSigningInfo_MissedBlock struct {

	// index is the height at which the block was missed.
	Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// missed is a boolean representing the missed block.
	Missed bool `protobuf:"varint,2,opt,name=missed,proto3" json:"missed,omitempty"`
	// contains filtered or unexported fields
}

MissedBlock represents a missed block.

func (*ValidatorSigningInfo_MissedBlock) Descriptor deprecated

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

Deprecated: Use ValidatorSigningInfo_MissedBlock.ProtoReflect.Descriptor instead.

func (*ValidatorSigningInfo_MissedBlock) GetIndex

func (*ValidatorSigningInfo_MissedBlock) GetMissed

func (x *ValidatorSigningInfo_MissedBlock) GetMissed() bool

func (*ValidatorSigningInfo_MissedBlock) ProtoMessage

func (*ValidatorSigningInfo_MissedBlock) ProtoMessage()

func (*ValidatorSigningInfo_MissedBlock) ProtoReflect

func (*ValidatorSigningInfo_MissedBlock) Reset

func (*ValidatorSigningInfo_MissedBlock) String

type ValidatorTable

type ValidatorTable interface {
	Insert(ctx context.Context, validator *Validator) error
	Update(ctx context.Context, validator *Validator) error
	Save(ctx context.Context, validator *Validator) error
	Delete(ctx context.Context, validator *Validator) error
	Has(ctx context.Context, address string) (found bool, err error)
	// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
	Get(ctx context.Context, address string) (*Validator, error)
	List(ctx context.Context, prefixKey ValidatorIndexKey, opts ...ormlist.Option) (ValidatorIterator, error)
	ListRange(ctx context.Context, from, to ValidatorIndexKey, opts ...ormlist.Option) (ValidatorIterator, error)
	DeleteBy(ctx context.Context, prefixKey ValidatorIndexKey) error
	DeleteRange(ctx context.Context, from, to ValidatorIndexKey) error
	// contains filtered or unexported methods
}

func NewValidatorTable

func NewValidatorTable(db ormtable.Schema) (ValidatorTable, error)

Jump to

Keyboard shortcuts

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