types

package
v0.0.0-...-3f2bb17 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT 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 = "pos"

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

	// GovModuleName duplicates the gov module's name to avoid a dependency with x/gov.
	// It should be synced with the gov module's name if it is ever changed.
	// See: https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/x/gov/types/keys.go#L9
	GovModuleName = "gov"

	// Event types
	EventTypeRecordSubmitted  = "record_submitted"
	EventTypeRecordVerified   = "record_verified"
	EventTypeValidatorSlashed = "validator_slashed"

	// Event attributes
	AttributeKeyRecordID    = "record_id"
	AttributeKeyValidator   = "validator"
	AttributeKeyVerifier    = "verifier"
	AttributeKeyApproved    = "approved"
	AttributeKeySlashAmount = "slash_amount"
	AttributeKeyReason      = "reason"
)

Variables

View Source
var (
	ErrInvalidSigner          = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
	ErrNotValidator           = errors.Register(ModuleName, 1101, "signer is not a validator")
	ErrInvalidRecordSize      = errors.Register(ModuleName, 1102, "record size is invalid")
	ErrRecordNotFound         = errors.Register(ModuleName, 1103, "record not found")
	ErrRecordAlreadyVerified  = errors.Register(ModuleName, 1104, "record already verified")
	ErrInvalidRecordStatus    = errors.Register(ModuleName, 1105, "invalid record status")
	ErrValidatorNotEligible   = errors.Register(ModuleName, 1106, "validator not eligible")
	ErrInsufficientRecords    = errors.Register(ModuleName, 1107, "insufficient verified records")
	ErrInvalidMerkleRoot      = errors.Register(ModuleName, 1108, "invalid merkle root")
	ErrDuplicateRecord        = errors.Register(ModuleName, 1109, "duplicate record submission")
	ErrEpochRecordsExceeded   = errors.Register(ModuleName, 1110, "epoch record limit exceeded")
	ErrValidatorStatsNotFound = errors.Register(ModuleName, 1111, "validator stats not found")
)

x/pos module sentinel errors

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 (
	// ParamsKey is the prefix to retrieve all Params
	ParamsKey = collections.NewPrefix("p_pos")

	// RecordsKey is the prefix for storing records
	RecordsKey = collections.NewPrefix("r_pos")

	// ValidatorStatsKey is the prefix for validator statistics
	ValidatorStatsKey = collections.NewPrefix("vs_pos")
)

Store key prefixes

View Source
var (
	ErrInvalidLengthModule        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModule          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModule = 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 (
	ErrInvalidLengthRecord        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRecord          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRecord = 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 Msg_serviceDesc = _Msg_serviceDesc
View Source
var Query_serviceDesc = _Query_serviceDesc
View Source
var RecordStatus_name = map[int32]string{
	0: "RECORD_STATUS_UNSPECIFIED",
	1: "RECORD_STATUS_PENDING",
	2: "RECORD_STATUS_VERIFIED",
	3: "RECORD_STATUS_REJECTED",
}
View Source
var RecordStatus_value = map[string]int32{
	"RECORD_STATUS_UNSPECIFIED": 0,
	"RECORD_STATUS_PENDING":     1,
	"RECORD_STATUS_VERIFIED":    2,
	"RECORD_STATUS_REJECTED":    3,
}

Functions

func RegisterInterfaces

func RegisterInterfaces(registrar codectypes.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 AuthKeeper

type AuthKeeper interface {
	AddressCodec() address.Codec
	GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation

}

AuthKeeper defines the expected interface for the Auth module.

type BankKeeper

type BankKeeper interface {
	SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface for the Bank module.

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// records is the list of all records
	Records []Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records"`
	// validator_record_stats is the list of validator record statistics
	ValidatorRecordStats []ValidatorRecordStats `protobuf:"bytes,3,rep,name=validator_record_stats,json=validatorRecordStats,proto3" json:"validator_record_stats"`
}

GenesisState defines the pos module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRecords

func (m *GenesisState) GetRecords() []Record

func (*GenesisState) GetValidatorRecordStats

func (m *GenesisState) GetValidatorRecordStats() []ValidatorRecordStats

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 Module

type Module struct {
	// authority defines the custom module authority.
	// If not set, defaults to the governance module.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
}

Module is the config object for the module.

func (*Module) Descriptor

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

func (*Module) GetAuthority

func (m *Module) GetAuthority() string

func (*Module) Marshal

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

func (*Module) MarshalTo

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

func (*Module) MarshalToSizedBuffer

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

func (*Module) ProtoMessage

func (*Module) ProtoMessage()

func (*Module) Reset

func (m *Module) Reset()

func (*Module) Size

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

func (*Module) String

func (m *Module) String() string

func (*Module) Unmarshal

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

func (*Module) XXX_DiscardUnknown

func (m *Module) XXX_DiscardUnknown()

func (*Module) XXX_Marshal

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

func (*Module) XXX_Merge

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

func (*Module) XXX_Size

func (m *Module) XXX_Size() int

func (*Module) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	// SubmitRecord allows validators to submit a proof-of-record
	SubmitRecord(ctx context.Context, in *MsgSubmitRecord, opts ...grpc.CallOption) (*MsgSubmitRecordResponse, error)
	// VerifyRecord allows verification of a submitted record
	VerifyRecord(ctx context.Context, in *MsgVerifyRecord, opts ...grpc.CallOption) (*MsgVerifyRecordResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	// SubmitRecord allows validators to submit a proof-of-record
	SubmitRecord(context.Context, *MsgSubmitRecord) (*MsgSubmitRecordResponse, error)
	// VerifyRecord allows verification of a submitted record
	VerifyRecord(context.Context, *MsgVerifyRecord) (*MsgVerifyRecordResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitRecord

type MsgSubmitRecord struct {
	ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	Data             []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	MerkleRoot       string `protobuf:"bytes,3,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
}

MsgSubmitRecord is the message for validators to submit records

func (*MsgSubmitRecord) Descriptor

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

func (*MsgSubmitRecord) GetData

func (m *MsgSubmitRecord) GetData() []byte

func (*MsgSubmitRecord) GetMerkleRoot

func (m *MsgSubmitRecord) GetMerkleRoot() string

func (*MsgSubmitRecord) GetValidatorAddress

func (m *MsgSubmitRecord) GetValidatorAddress() string

func (*MsgSubmitRecord) Marshal

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

func (*MsgSubmitRecord) MarshalTo

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

func (*MsgSubmitRecord) MarshalToSizedBuffer

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

func (*MsgSubmitRecord) ProtoMessage

func (*MsgSubmitRecord) ProtoMessage()

func (*MsgSubmitRecord) Reset

func (m *MsgSubmitRecord) Reset()

func (*MsgSubmitRecord) Size

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

func (*MsgSubmitRecord) String

func (m *MsgSubmitRecord) String() string

func (*MsgSubmitRecord) Unmarshal

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

func (*MsgSubmitRecord) XXX_DiscardUnknown

func (m *MsgSubmitRecord) XXX_DiscardUnknown()

func (*MsgSubmitRecord) XXX_Marshal

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

func (*MsgSubmitRecord) XXX_Merge

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

func (*MsgSubmitRecord) XXX_Size

func (m *MsgSubmitRecord) XXX_Size() int

func (*MsgSubmitRecord) XXX_Unmarshal

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

type MsgSubmitRecordResponse

type MsgSubmitRecordResponse struct {
	RecordId  string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
	Timestamp int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

MsgSubmitRecordResponse defines the response for MsgSubmitRecord

func (*MsgSubmitRecordResponse) Descriptor

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

func (*MsgSubmitRecordResponse) GetRecordId

func (m *MsgSubmitRecordResponse) GetRecordId() string

func (*MsgSubmitRecordResponse) GetTimestamp

func (m *MsgSubmitRecordResponse) GetTimestamp() int64

func (*MsgSubmitRecordResponse) Marshal

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

func (*MsgSubmitRecordResponse) MarshalTo

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

func (*MsgSubmitRecordResponse) MarshalToSizedBuffer

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

func (*MsgSubmitRecordResponse) ProtoMessage

func (*MsgSubmitRecordResponse) ProtoMessage()

func (*MsgSubmitRecordResponse) Reset

func (m *MsgSubmitRecordResponse) Reset()

func (*MsgSubmitRecordResponse) Size

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

func (*MsgSubmitRecordResponse) String

func (m *MsgSubmitRecordResponse) String() string

func (*MsgSubmitRecordResponse) Unmarshal

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

func (*MsgSubmitRecordResponse) XXX_DiscardUnknown

func (m *MsgSubmitRecordResponse) XXX_DiscardUnknown()

func (*MsgSubmitRecordResponse) XXX_Marshal

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

func (*MsgSubmitRecordResponse) XXX_Merge

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

func (*MsgSubmitRecordResponse) XXX_Size

func (m *MsgSubmitRecordResponse) XXX_Size() int

func (*MsgSubmitRecordResponse) XXX_Unmarshal

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

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the module parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type.

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type MsgVerifyRecord

type MsgVerifyRecord struct {
	Verifier string `protobuf:"bytes,1,opt,name=verifier,proto3" json:"verifier,omitempty"`
	RecordId string `protobuf:"bytes,2,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
	Approved bool   `protobuf:"varint,3,opt,name=approved,proto3" json:"approved,omitempty"`
}

MsgVerifyRecord is the message for verifying a submitted record

func (*MsgVerifyRecord) Descriptor

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

func (*MsgVerifyRecord) GetApproved

func (m *MsgVerifyRecord) GetApproved() bool

func (*MsgVerifyRecord) GetRecordId

func (m *MsgVerifyRecord) GetRecordId() string

func (*MsgVerifyRecord) GetVerifier

func (m *MsgVerifyRecord) GetVerifier() string

func (*MsgVerifyRecord) Marshal

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

func (*MsgVerifyRecord) MarshalTo

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

func (*MsgVerifyRecord) MarshalToSizedBuffer

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

func (*MsgVerifyRecord) ProtoMessage

func (*MsgVerifyRecord) ProtoMessage()

func (*MsgVerifyRecord) Reset

func (m *MsgVerifyRecord) Reset()

func (*MsgVerifyRecord) Size

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

func (*MsgVerifyRecord) String

func (m *MsgVerifyRecord) String() string

func (*MsgVerifyRecord) Unmarshal

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

func (*MsgVerifyRecord) XXX_DiscardUnknown

func (m *MsgVerifyRecord) XXX_DiscardUnknown()

func (*MsgVerifyRecord) XXX_Marshal

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

func (*MsgVerifyRecord) XXX_Merge

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

func (*MsgVerifyRecord) XXX_Size

func (m *MsgVerifyRecord) XXX_Size() int

func (*MsgVerifyRecord) XXX_Unmarshal

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

type MsgVerifyRecordResponse

type MsgVerifyRecordResponse struct {
}

MsgVerifyRecordResponse defines the response for MsgVerifyRecord

func (*MsgVerifyRecordResponse) Descriptor

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

func (*MsgVerifyRecordResponse) Marshal

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

func (*MsgVerifyRecordResponse) MarshalTo

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

func (*MsgVerifyRecordResponse) MarshalToSizedBuffer

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

func (*MsgVerifyRecordResponse) ProtoMessage

func (*MsgVerifyRecordResponse) ProtoMessage()

func (*MsgVerifyRecordResponse) Reset

func (m *MsgVerifyRecordResponse) Reset()

func (*MsgVerifyRecordResponse) Size

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

func (*MsgVerifyRecordResponse) String

func (m *MsgVerifyRecordResponse) String() string

func (*MsgVerifyRecordResponse) Unmarshal

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

func (*MsgVerifyRecordResponse) XXX_DiscardUnknown

func (m *MsgVerifyRecordResponse) XXX_DiscardUnknown()

func (*MsgVerifyRecordResponse) XXX_Marshal

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

func (*MsgVerifyRecordResponse) XXX_Merge

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

func (*MsgVerifyRecordResponse) XXX_Size

func (m *MsgVerifyRecordResponse) XXX_Size() int

func (*MsgVerifyRecordResponse) XXX_Unmarshal

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

type ParamSubspace

type ParamSubspace interface {
	Get(context.Context, []byte, interface{})
	Set(context.Context, []byte, interface{})
}

ParamSubspace defines the expected Subspace interface for parameters.

type Params

type Params struct {
	// Minimum record size in bytes
	MinRecordSize uint64 `protobuf:"varint,1,opt,name=min_record_size,json=minRecordSize,proto3" json:"min_record_size,omitempty"`
	// Maximum record size in bytes
	MaxRecordSize uint64 `protobuf:"varint,2,opt,name=max_record_size,json=maxRecordSize,proto3" json:"max_record_size,omitempty"`
	// Required records per epoch (number of blocks)
	RecordsPerEpoch uint64 `protobuf:"varint,3,opt,name=records_per_epoch,json=recordsPerEpoch,proto3" json:"records_per_epoch,omitempty"`
	// Epoch length in blocks
	EpochLength uint64 `protobuf:"varint,4,opt,name=epoch_length,json=epochLength,proto3" json:"epoch_length,omitempty"`
	// Slash fraction for missing records
	SlashFractionMissingRecord cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	// Slash fraction for invalid records
	SlashFractionInvalidRecord cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	// Minimum number of verified records to remain eligible
	MinVerifiedRecordsForEligibility uint64 `` /* 164-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(
	minRecordSize uint64,
	maxRecordSize uint64,
	recordsPerEpoch uint64,
	epochLength uint64,
	slashFractionMissingRecord math.LegacyDec,
	slashFractionInvalidRecord math.LegacyDec,
	minVerifiedRecordsForEligibility uint64,
) Params

NewParams creates a new Params instance.

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) GetEpochLength

func (m *Params) GetEpochLength() uint64

func (*Params) GetMaxRecordSize

func (m *Params) GetMaxRecordSize() uint64

func (*Params) GetMinRecordSize

func (m *Params) GetMinRecordSize() uint64

func (*Params) GetMinVerifiedRecordsForEligibility

func (m *Params) GetMinVerifiedRecordsForEligibility() uint64

func (*Params) GetRecordsPerEpoch

func (m *Params) GetRecordsPerEpoch() uint64

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

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

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)
	// Record queries a record by id
	Record(ctx context.Context, in *QueryRecordRequest, opts ...grpc.CallOption) (*QueryRecordResponse, error)
	// Records queries all records with optional pagination
	Records(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error)
	// ValidatorRecords queries records for a specific validator
	ValidatorRecords(ctx context.Context, in *QueryValidatorRecordsRequest, opts ...grpc.CallOption) (*QueryValidatorRecordsResponse, error)
	// ValidatorStats queries record statistics for a validator
	ValidatorStats(ctx context.Context, in *QueryValidatorStatsRequest, opts ...grpc.CallOption) (*QueryValidatorStatsResponse, 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 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 QueryRecordRequest

type QueryRecordRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryRecordRequest is request type for the Query/Record RPC method.

func (*QueryRecordRequest) Descriptor

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

func (*QueryRecordRequest) GetId

func (m *QueryRecordRequest) GetId() string

func (*QueryRecordRequest) Marshal

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

func (*QueryRecordRequest) MarshalTo

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

func (*QueryRecordRequest) MarshalToSizedBuffer

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

func (*QueryRecordRequest) ProtoMessage

func (*QueryRecordRequest) ProtoMessage()

func (*QueryRecordRequest) Reset

func (m *QueryRecordRequest) Reset()

func (*QueryRecordRequest) Size

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

func (*QueryRecordRequest) String

func (m *QueryRecordRequest) String() string

func (*QueryRecordRequest) Unmarshal

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

func (*QueryRecordRequest) XXX_DiscardUnknown

func (m *QueryRecordRequest) XXX_DiscardUnknown()

func (*QueryRecordRequest) XXX_Marshal

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

func (*QueryRecordRequest) XXX_Merge

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

func (*QueryRecordRequest) XXX_Size

func (m *QueryRecordRequest) XXX_Size() int

func (*QueryRecordRequest) XXX_Unmarshal

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

type QueryRecordResponse

type QueryRecordResponse struct {
	Record Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record"`
}

QueryRecordResponse is response type for the Query/Record RPC method.

func (*QueryRecordResponse) Descriptor

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

func (*QueryRecordResponse) GetRecord

func (m *QueryRecordResponse) GetRecord() Record

func (*QueryRecordResponse) Marshal

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

func (*QueryRecordResponse) MarshalTo

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

func (*QueryRecordResponse) MarshalToSizedBuffer

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

func (*QueryRecordResponse) ProtoMessage

func (*QueryRecordResponse) ProtoMessage()

func (*QueryRecordResponse) Reset

func (m *QueryRecordResponse) Reset()

func (*QueryRecordResponse) Size

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

func (*QueryRecordResponse) String

func (m *QueryRecordResponse) String() string

func (*QueryRecordResponse) Unmarshal

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

func (*QueryRecordResponse) XXX_DiscardUnknown

func (m *QueryRecordResponse) XXX_DiscardUnknown()

func (*QueryRecordResponse) XXX_Marshal

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

func (*QueryRecordResponse) XXX_Merge

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

func (*QueryRecordResponse) XXX_Size

func (m *QueryRecordResponse) XXX_Size() int

func (*QueryRecordResponse) XXX_Unmarshal

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

type QueryRecordsRequest

type QueryRecordsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRecordsRequest is request type for the Query/Records RPC method.

func (*QueryRecordsRequest) Descriptor

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

func (*QueryRecordsRequest) GetPagination

func (m *QueryRecordsRequest) GetPagination() *query.PageRequest

func (*QueryRecordsRequest) Marshal

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

func (*QueryRecordsRequest) MarshalTo

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

func (*QueryRecordsRequest) MarshalToSizedBuffer

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

func (*QueryRecordsRequest) ProtoMessage

func (*QueryRecordsRequest) ProtoMessage()

func (*QueryRecordsRequest) Reset

func (m *QueryRecordsRequest) Reset()

func (*QueryRecordsRequest) Size

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

func (*QueryRecordsRequest) String

func (m *QueryRecordsRequest) String() string

func (*QueryRecordsRequest) Unmarshal

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

func (*QueryRecordsRequest) XXX_DiscardUnknown

func (m *QueryRecordsRequest) XXX_DiscardUnknown()

func (*QueryRecordsRequest) XXX_Marshal

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

func (*QueryRecordsRequest) XXX_Merge

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

func (*QueryRecordsRequest) XXX_Size

func (m *QueryRecordsRequest) XXX_Size() int

func (*QueryRecordsRequest) XXX_Unmarshal

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

type QueryRecordsResponse

type QueryRecordsResponse struct {
	Records    []Record            `protobuf:"bytes,1,rep,name=records,proto3" json:"records"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRecordsResponse is response type for the Query/Records RPC method.

func (*QueryRecordsResponse) Descriptor

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

func (*QueryRecordsResponse) GetPagination

func (m *QueryRecordsResponse) GetPagination() *query.PageResponse

func (*QueryRecordsResponse) GetRecords

func (m *QueryRecordsResponse) GetRecords() []Record

func (*QueryRecordsResponse) Marshal

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

func (*QueryRecordsResponse) MarshalTo

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

func (*QueryRecordsResponse) MarshalToSizedBuffer

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

func (*QueryRecordsResponse) ProtoMessage

func (*QueryRecordsResponse) ProtoMessage()

func (*QueryRecordsResponse) Reset

func (m *QueryRecordsResponse) Reset()

func (*QueryRecordsResponse) Size

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

func (*QueryRecordsResponse) String

func (m *QueryRecordsResponse) String() string

func (*QueryRecordsResponse) Unmarshal

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

func (*QueryRecordsResponse) XXX_DiscardUnknown

func (m *QueryRecordsResponse) XXX_DiscardUnknown()

func (*QueryRecordsResponse) XXX_Marshal

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

func (*QueryRecordsResponse) XXX_Merge

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

func (*QueryRecordsResponse) XXX_Size

func (m *QueryRecordsResponse) XXX_Size() int

func (*QueryRecordsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Record queries a record by id
	Record(context.Context, *QueryRecordRequest) (*QueryRecordResponse, error)
	// Records queries all records with optional pagination
	Records(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error)
	// ValidatorRecords queries records for a specific validator
	ValidatorRecords(context.Context, *QueryValidatorRecordsRequest) (*QueryValidatorRecordsResponse, error)
	// ValidatorStats queries record statistics for a validator
	ValidatorStats(context.Context, *QueryValidatorStatsRequest) (*QueryValidatorStatsResponse, error)
}

QueryServer is the server API for Query service.

type QueryValidatorRecordsRequest

type QueryValidatorRecordsRequest struct {
	ValidatorAddress string             `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	Pagination       *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryValidatorRecordsRequest is request type for the Query/ValidatorRecords RPC method.

func (*QueryValidatorRecordsRequest) Descriptor

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

func (*QueryValidatorRecordsRequest) GetPagination

func (m *QueryValidatorRecordsRequest) GetPagination() *query.PageRequest

func (*QueryValidatorRecordsRequest) GetValidatorAddress

func (m *QueryValidatorRecordsRequest) GetValidatorAddress() string

func (*QueryValidatorRecordsRequest) Marshal

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

func (*QueryValidatorRecordsRequest) MarshalTo

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

func (*QueryValidatorRecordsRequest) MarshalToSizedBuffer

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

func (*QueryValidatorRecordsRequest) ProtoMessage

func (*QueryValidatorRecordsRequest) ProtoMessage()

func (*QueryValidatorRecordsRequest) Reset

func (m *QueryValidatorRecordsRequest) Reset()

func (*QueryValidatorRecordsRequest) Size

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

func (*QueryValidatorRecordsRequest) String

func (*QueryValidatorRecordsRequest) Unmarshal

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

func (*QueryValidatorRecordsRequest) XXX_DiscardUnknown

func (m *QueryValidatorRecordsRequest) XXX_DiscardUnknown()

func (*QueryValidatorRecordsRequest) XXX_Marshal

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

func (*QueryValidatorRecordsRequest) XXX_Merge

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

func (*QueryValidatorRecordsRequest) XXX_Size

func (m *QueryValidatorRecordsRequest) XXX_Size() int

func (*QueryValidatorRecordsRequest) XXX_Unmarshal

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

type QueryValidatorRecordsResponse

type QueryValidatorRecordsResponse struct {
	Records    []Record            `protobuf:"bytes,1,rep,name=records,proto3" json:"records"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryValidatorRecordsResponse is response type for the Query/ValidatorRecords RPC method.

func (*QueryValidatorRecordsResponse) Descriptor

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

func (*QueryValidatorRecordsResponse) GetPagination

func (m *QueryValidatorRecordsResponse) GetPagination() *query.PageResponse

func (*QueryValidatorRecordsResponse) GetRecords

func (m *QueryValidatorRecordsResponse) GetRecords() []Record

func (*QueryValidatorRecordsResponse) Marshal

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

func (*QueryValidatorRecordsResponse) MarshalTo

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

func (*QueryValidatorRecordsResponse) MarshalToSizedBuffer

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

func (*QueryValidatorRecordsResponse) ProtoMessage

func (*QueryValidatorRecordsResponse) ProtoMessage()

func (*QueryValidatorRecordsResponse) Reset

func (m *QueryValidatorRecordsResponse) Reset()

func (*QueryValidatorRecordsResponse) Size

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

func (*QueryValidatorRecordsResponse) String

func (*QueryValidatorRecordsResponse) Unmarshal

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

func (*QueryValidatorRecordsResponse) XXX_DiscardUnknown

func (m *QueryValidatorRecordsResponse) XXX_DiscardUnknown()

func (*QueryValidatorRecordsResponse) XXX_Marshal

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

func (*QueryValidatorRecordsResponse) XXX_Merge

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

func (*QueryValidatorRecordsResponse) XXX_Size

func (m *QueryValidatorRecordsResponse) XXX_Size() int

func (*QueryValidatorRecordsResponse) XXX_Unmarshal

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

type QueryValidatorStatsRequest

type QueryValidatorStatsRequest struct {
	ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
}

QueryValidatorStatsRequest is request type for the Query/ValidatorStats RPC method.

func (*QueryValidatorStatsRequest) Descriptor

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

func (*QueryValidatorStatsRequest) GetValidatorAddress

func (m *QueryValidatorStatsRequest) GetValidatorAddress() string

func (*QueryValidatorStatsRequest) Marshal

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

func (*QueryValidatorStatsRequest) MarshalTo

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

func (*QueryValidatorStatsRequest) MarshalToSizedBuffer

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

func (*QueryValidatorStatsRequest) ProtoMessage

func (*QueryValidatorStatsRequest) ProtoMessage()

func (*QueryValidatorStatsRequest) Reset

func (m *QueryValidatorStatsRequest) Reset()

func (*QueryValidatorStatsRequest) Size

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

func (*QueryValidatorStatsRequest) String

func (m *QueryValidatorStatsRequest) String() string

func (*QueryValidatorStatsRequest) Unmarshal

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

func (*QueryValidatorStatsRequest) XXX_DiscardUnknown

func (m *QueryValidatorStatsRequest) XXX_DiscardUnknown()

func (*QueryValidatorStatsRequest) XXX_Marshal

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

func (*QueryValidatorStatsRequest) XXX_Merge

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

func (*QueryValidatorStatsRequest) XXX_Size

func (m *QueryValidatorStatsRequest) XXX_Size() int

func (*QueryValidatorStatsRequest) XXX_Unmarshal

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

type QueryValidatorStatsResponse

type QueryValidatorStatsResponse struct {
	Stats ValidatorRecordStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats"`
}

QueryValidatorStatsResponse is response type for the Query/ValidatorStats RPC method.

func (*QueryValidatorStatsResponse) Descriptor

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

func (*QueryValidatorStatsResponse) GetStats

func (*QueryValidatorStatsResponse) Marshal

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

func (*QueryValidatorStatsResponse) MarshalTo

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

func (*QueryValidatorStatsResponse) MarshalToSizedBuffer

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

func (*QueryValidatorStatsResponse) ProtoMessage

func (*QueryValidatorStatsResponse) ProtoMessage()

func (*QueryValidatorStatsResponse) Reset

func (m *QueryValidatorStatsResponse) Reset()

func (*QueryValidatorStatsResponse) Size

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

func (*QueryValidatorStatsResponse) String

func (m *QueryValidatorStatsResponse) String() string

func (*QueryValidatorStatsResponse) Unmarshal

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

func (*QueryValidatorStatsResponse) XXX_DiscardUnknown

func (m *QueryValidatorStatsResponse) XXX_DiscardUnknown()

func (*QueryValidatorStatsResponse) XXX_Marshal

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

func (*QueryValidatorStatsResponse) XXX_Merge

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

func (*QueryValidatorStatsResponse) XXX_Size

func (m *QueryValidatorStatsResponse) XXX_Size() int

func (*QueryValidatorStatsResponse) XXX_Unmarshal

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

type Record

type Record struct {
	Id               string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ValidatorAddress string       `` /* 134-byte string literal not displayed */
	Data             []byte       `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp        int64        `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Status           RecordStatus `protobuf:"varint,5,opt,name=status,proto3,enum=pos.pos.v1.RecordStatus" json:"status,omitempty"`
	MerkleRoot       string       `protobuf:"bytes,6,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty" yaml:"merkle_root"`
	BlockHeight      uint64       `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

Record represents a proof-of-record submission by a validator

func (*Record) Descriptor

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

func (*Record) Equal

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

func (*Record) GetBlockHeight

func (m *Record) GetBlockHeight() uint64

func (*Record) GetData

func (m *Record) GetData() []byte

func (*Record) GetId

func (m *Record) GetId() string

func (*Record) GetMerkleRoot

func (m *Record) GetMerkleRoot() string

func (*Record) GetStatus

func (m *Record) GetStatus() RecordStatus

func (*Record) GetTimestamp

func (m *Record) GetTimestamp() int64

func (*Record) GetValidatorAddress

func (m *Record) GetValidatorAddress() string

func (*Record) Marshal

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

func (*Record) MarshalTo

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

func (*Record) MarshalToSizedBuffer

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

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) Size

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

func (*Record) String

func (m *Record) String() string

func (*Record) Unmarshal

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

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

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

func (*Record) XXX_Merge

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

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

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

type RecordStatus

type RecordStatus int32

RecordStatus defines the status of a record

const (
	RecordStatusUnspecified RecordStatus = 0
	RecordStatusPending     RecordStatus = 1
	RecordStatusVerified    RecordStatus = 2
	RecordStatusRejected    RecordStatus = 3
)

func (RecordStatus) EnumDescriptor

func (RecordStatus) EnumDescriptor() ([]byte, []int)

func (RecordStatus) String

func (x RecordStatus) String() string

type SlashingKeeper

type SlashingKeeper interface {
	IsTombstoned(context.Context, sdk.ConsAddress) bool
	JailUntil(context.Context, sdk.ConsAddress, int64) error
}

SlashingKeeper defines the expected interface for the Slashing module.

type StakingKeeper

StakingKeeper defines the expected interface for the Staking module.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SubmitRecord

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) VerifyRecord

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Record

func (*UnimplementedQueryServer) Records

func (*UnimplementedQueryServer) ValidatorRecords

func (*UnimplementedQueryServer) ValidatorStats

type ValidatorRecordStats

type ValidatorRecordStats struct {
	ValidatorAddress       string `` /* 134-byte string literal not displayed */
	TotalRecords           uint64 `protobuf:"varint,2,opt,name=total_records,json=totalRecords,proto3" json:"total_records,omitempty"`
	VerifiedRecords        uint64 `protobuf:"varint,3,opt,name=verified_records,json=verifiedRecords,proto3" json:"verified_records,omitempty"`
	RejectedRecords        uint64 `protobuf:"varint,4,opt,name=rejected_records,json=rejectedRecords,proto3" json:"rejected_records,omitempty"`
	LastRecordTime         int64  `protobuf:"varint,5,opt,name=last_record_time,json=lastRecordTime,proto3" json:"last_record_time,omitempty"`
	IsEligible             bool   `protobuf:"varint,6,opt,name=is_eligible,json=isEligible,proto3" json:"is_eligible,omitempty"`
	NextRequiredRecordTime int64  `` /* 132-byte string literal not displayed */
}

ValidatorRecordStats tracks record submission stats for a validator

func (*ValidatorRecordStats) Descriptor

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

func (*ValidatorRecordStats) Equal

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

func (*ValidatorRecordStats) GetIsEligible

func (m *ValidatorRecordStats) GetIsEligible() bool

func (*ValidatorRecordStats) GetLastRecordTime

func (m *ValidatorRecordStats) GetLastRecordTime() int64

func (*ValidatorRecordStats) GetNextRequiredRecordTime

func (m *ValidatorRecordStats) GetNextRequiredRecordTime() int64

func (*ValidatorRecordStats) GetRejectedRecords

func (m *ValidatorRecordStats) GetRejectedRecords() uint64

func (*ValidatorRecordStats) GetTotalRecords

func (m *ValidatorRecordStats) GetTotalRecords() uint64

func (*ValidatorRecordStats) GetValidatorAddress

func (m *ValidatorRecordStats) GetValidatorAddress() string

func (*ValidatorRecordStats) GetVerifiedRecords

func (m *ValidatorRecordStats) GetVerifiedRecords() uint64

func (*ValidatorRecordStats) Marshal

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

func (*ValidatorRecordStats) MarshalTo

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

func (*ValidatorRecordStats) MarshalToSizedBuffer

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

func (*ValidatorRecordStats) ProtoMessage

func (*ValidatorRecordStats) ProtoMessage()

func (*ValidatorRecordStats) Reset

func (m *ValidatorRecordStats) Reset()

func (*ValidatorRecordStats) Size

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

func (*ValidatorRecordStats) String

func (m *ValidatorRecordStats) String() string

func (*ValidatorRecordStats) Unmarshal

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

func (*ValidatorRecordStats) XXX_DiscardUnknown

func (m *ValidatorRecordStats) XXX_DiscardUnknown()

func (*ValidatorRecordStats) XXX_Marshal

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

func (*ValidatorRecordStats) XXX_Merge

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

func (*ValidatorRecordStats) XXX_Size

func (m *ValidatorRecordStats) XXX_Size() int

func (*ValidatorRecordStats) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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