Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type RegisterPortalRequest
- type StakingKeeper
- type UnimplementedQueryServer
- type ValSetSubscriber
- type Validator
- func (v *Validator) CometAddress() (crypto.Address, error)
- func (v *Validator) CometPubkey() (k1.PubKey, error)
- func (*Validator) Descriptor() ([]byte, []int)
- func (v *Validator) EthereumAddress() (common.Address, error)
- func (m *Validator) GetConsensusPubkey() []byte
- func (m *Validator) GetPower() int64
- func (m *Validator) Marshal() (dAtA []byte, err error)
- func (m *Validator) MarshalTo(dAtA []byte) (int, error)
- func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Validator) ProtoMessage()
- func (m *Validator) Reset()
- func (m *Validator) Size() (n int)
- func (m *Validator) String() string
- func (m *Validator) Unmarshal(dAtA []byte) error
- func (m *Validator) XXX_DiscardUnknown()
- func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Validator) XXX_Merge(src proto.Message)
- func (m *Validator) XXX_Size() int
- func (m *Validator) XXX_Unmarshal(b []byte) error
- type ValidatorProvider
- type ValidatorSetRequest
- func (*ValidatorSetRequest) Descriptor() ([]byte, []int)
- func (m *ValidatorSetRequest) GetId() uint64
- func (m *ValidatorSetRequest) GetLatest() bool
- func (m *ValidatorSetRequest) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSetRequest) ProtoMessage()
- func (m *ValidatorSetRequest) Reset()
- func (m *ValidatorSetRequest) Size() (n int)
- func (m *ValidatorSetRequest) String() string
- func (m *ValidatorSetRequest) Unmarshal(dAtA []byte) error
- func (m *ValidatorSetRequest) XXX_DiscardUnknown()
- func (m *ValidatorSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSetRequest) XXX_Merge(src proto.Message)
- func (m *ValidatorSetRequest) XXX_Size() int
- func (m *ValidatorSetRequest) XXX_Unmarshal(b []byte) error
- type ValidatorSetResponse
- func (*ValidatorSetResponse) Descriptor() ([]byte, []int)
- func (m *ValidatorSetResponse) GetActivatedHeight() uint64
- func (m *ValidatorSetResponse) GetCreatedHeight() uint64
- func (m *ValidatorSetResponse) GetId() uint64
- func (m *ValidatorSetResponse) GetValidators() []*Validator
- func (v *ValidatorSetResponse) IsValidator(addr common.Address) (bool, error)
- func (m *ValidatorSetResponse) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSetResponse) ProtoMessage()
- func (m *ValidatorSetResponse) Reset()
- func (m *ValidatorSetResponse) Size() (n int)
- func (m *ValidatorSetResponse) String() string
- func (m *ValidatorSetResponse) Unmarshal(dAtA []byte) error
- func (m *ValidatorSetResponse) XXX_DiscardUnknown()
- func (m *ValidatorSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSetResponse) XXX_Merge(src proto.Message)
- func (m *ValidatorSetResponse) XXX_Size() int
- func (m *ValidatorSetResponse) XXX_Unmarshal(b []byte) error
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") )
View Source
var Query_serviceDesc = _Query_serviceDesc
Functions ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
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) 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 RegisterPortalRequest ¶
type StakingKeeper ¶
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) ValidatorSet ¶
func (*UnimplementedQueryServer) ValidatorSet(ctx context.Context, req *ValidatorSetRequest) (*ValidatorSetResponse, error)
type ValSetSubscriber ¶
type ValSetSubscriber interface {
UpdateValidatorSet(valset *ValidatorSetResponse) error
}
type Validator ¶
type Validator struct { ConsensusPubkey []byte `protobuf:"bytes,1,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty"` Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` }
func (*Validator) Descriptor ¶
func (*Validator) GetConsensusPubkey ¶
func (*Validator) MarshalToSizedBuffer ¶
func (*Validator) ProtoMessage ¶
func (*Validator) ProtoMessage()
func (*Validator) XXX_DiscardUnknown ¶
func (m *Validator) XXX_DiscardUnknown()
func (*Validator) XXX_Marshal ¶
func (*Validator) XXX_Unmarshal ¶
type ValidatorProvider ¶
type ValidatorProvider interface { ActiveSetByHeight(ctx context.Context, height uint64) (*ValidatorSetResponse, error) ValidatorSet(ctx context.Context, req *ValidatorSetRequest) (*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 ¶
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) IsValidator ¶
func (v *ValidatorSetResponse) IsValidator(addr common.Address) (bool, error)
IsValidator returns true if the provided address is a validator in the set.
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
Click to show internal directories.
Click to hide internal directories.