types

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the module name.
	ModuleName = "valsync"
)

Variables

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

Functions

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AttestKeeper added in v0.1.3

type AttestKeeper interface {
	ListAttestationsFrom(ctx context.Context, chainID uint64, confLevel uint32, offset uint64, max uint64) ([]*atypes.Attestation, error)
}

type GenesisState

type GenesisState struct {
}

GenesisState is an empty genesis state required to trigger valsync genesis logic only.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func (*GenesisState) Descriptor

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

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 QueryClient

type QueryClient interface {
	ValidatorSet(ctx context.Context, in *ValidatorSetRequest, opts ...grpc.CallOption) (*ValidatorSetResponse, 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 QueryServer

type QueryServer interface {
	ValidatorSet(context.Context, *ValidatorSetRequest) (*ValidatorSetResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper added in v0.1.3

type StakingKeeper interface {
	EndBlocker(ctx context.Context) ([]abci.ValidatorUpdate, error)
	GetLastValidators(ctx context.Context) ([]stypes.Validator, error)
}

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ValidatorSet

type ValSetSubscriber added in v0.1.4

type ValSetSubscriber interface {
	UpdateValidators(valset []abci.ValidatorUpdate)
}

type Validator

type Validator struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Power   int64  `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
}

func (*Validator) Descriptor

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

func (*Validator) GetAddress

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

func (*Validator) GetPower

func (m *Validator) GetPower() int64

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

func (*Validator) ProtoMessage()

func (*Validator) Reset

func (m *Validator) Reset()

func (*Validator) Size

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

func (*Validator) String

func (m *Validator) String() string

func (*Validator) Unmarshal

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

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 ValidatorProvider

type ValidatorProvider interface {
	ActiveSetByHeight(ctx context.Context, height uint64) (*ValidatorSetResponse, error)
}

ValidatorProvider is the interface that provides the active set of validators at a given height.

type ValidatorSetRequest

type ValidatorSetRequest struct {
	Id     uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Latest bool   `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"`
}

func (*ValidatorSetRequest) Descriptor

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

func (*ValidatorSetRequest) GetId

func (m *ValidatorSetRequest) GetId() uint64

func (*ValidatorSetRequest) GetLatest added in v0.1.3

func (m *ValidatorSetRequest) GetLatest() bool

func (*ValidatorSetRequest) Marshal

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

func (*ValidatorSetRequest) MarshalTo

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

func (*ValidatorSetRequest) MarshalToSizedBuffer

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

func (*ValidatorSetRequest) ProtoMessage

func (*ValidatorSetRequest) ProtoMessage()

func (*ValidatorSetRequest) Reset

func (m *ValidatorSetRequest) Reset()

func (*ValidatorSetRequest) Size

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

func (*ValidatorSetRequest) String

func (m *ValidatorSetRequest) String() string

func (*ValidatorSetRequest) Unmarshal

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

func (*ValidatorSetRequest) XXX_DiscardUnknown

func (m *ValidatorSetRequest) XXX_DiscardUnknown()

func (*ValidatorSetRequest) XXX_Marshal

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

func (*ValidatorSetRequest) XXX_Merge

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

func (*ValidatorSetRequest) XXX_Size

func (m *ValidatorSetRequest) XXX_Size() int

func (*ValidatorSetRequest) XXX_Unmarshal

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

type ValidatorSetResponse

type ValidatorSetResponse struct {
	Id              uint64       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedHeight   uint64       `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"`
	ActivatedHeight uint64       `protobuf:"varint,3,opt,name=activated_height,json=activatedHeight,proto3" json:"activated_height,omitempty"`
	Validators      []*Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators,omitempty"`
}

func (*ValidatorSetResponse) Descriptor

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

func (*ValidatorSetResponse) GetActivatedHeight

func (m *ValidatorSetResponse) GetActivatedHeight() uint64

func (*ValidatorSetResponse) GetCreatedHeight

func (m *ValidatorSetResponse) GetCreatedHeight() uint64

func (*ValidatorSetResponse) GetId

func (m *ValidatorSetResponse) GetId() uint64

func (*ValidatorSetResponse) GetValidators

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

func (*ValidatorSetResponse) Marshal

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

func (*ValidatorSetResponse) MarshalTo

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

func (*ValidatorSetResponse) MarshalToSizedBuffer

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

func (*ValidatorSetResponse) ProtoMessage

func (*ValidatorSetResponse) ProtoMessage()

func (*ValidatorSetResponse) Reset

func (m *ValidatorSetResponse) Reset()

func (*ValidatorSetResponse) Size

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

func (*ValidatorSetResponse) String

func (m *ValidatorSetResponse) String() string

func (*ValidatorSetResponse) Unmarshal

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

func (*ValidatorSetResponse) XXX_DiscardUnknown

func (m *ValidatorSetResponse) XXX_DiscardUnknown()

func (*ValidatorSetResponse) XXX_Marshal

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

func (*ValidatorSetResponse) XXX_Merge

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

func (*ValidatorSetResponse) XXX_Size

func (m *ValidatorSetResponse) XXX_Size() int

func (*ValidatorSetResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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