types

package
v0.2.2-hf.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: AGPL-3.0 Imports: 40 Imported by: 6

Documentation

Overview

Package types is a generated GoMock package.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

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

	// TStoreKey defines transient store key
	TStoreKey = "transient_challenge"
)
View Source
const BlsSignatureLength = 96

BlsSignatureLength defines the length of bls signature

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const RedundancyIndexPrimary = int32(-1)

RedundancyIndexPrimary defines the redundancy index for primary storage provider (asked by storage provider api)

View Source
const TypeMsgAttest = "attest"
View Source
const TypeMsgSubmit = "submit"

Variables

View Source
var (
	ErrUnknownSp               = errors.Register(ModuleName, 1, "unknown storage provider")
	ErrUnknownObject           = errors.Register(ModuleName, 2, "unknown object info")
	ErrInvalidSpStatus         = errors.Register(ModuleName, 3, "invalid storage provider status")
	ErrInvalidObjectStatus     = errors.Register(ModuleName, 4, "invalid object status to challenge")
	ErrNotStoredOnSp           = errors.Register(ModuleName, 5, "the object is not stored on the storage provider")
	ErrExistsRecentSlash       = errors.Register(ModuleName, 6, "the storage provider and object info had been slashed recently")
	ErrInvalidSegmentIndex     = errors.Register(ModuleName, 7, "the segment/piece index is invalid")
	ErrInvalidChallengeId      = errors.Register(ModuleName, 8, "invalid challenge id")
	ErrInvalidVoteResult       = errors.Register(ModuleName, 9, "invalid vote result")
	ErrInvalidVoteValidatorSet = errors.Register(ModuleName, 10, "invalid validator set")
	ErrInvalidVoteAggSignature = errors.Register(ModuleName, 11, "invalid bls signature")
	ErrDuplicatedSlash         = errors.Register(ModuleName, 12, "duplicated slash in cooling-off period")
	ErrInvalidBlsPubKey        = errors.Register(ModuleName, 13, "invalid bls public key")
	ErrNotEnoughVotes          = errors.Register(ModuleName, 14, "attest votes are not enough")
	ErrNotChallenger           = errors.Register(ModuleName, 15, "not a valid challenger")
	ErrNotInturnChallenger     = errors.Register(ModuleName, 16, "challenger is not in turn")
	ErrInvalidParams           = errors.Register(ModuleName, 17, "invalid params")
)

x/challenge module sentinel errors

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
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 = []byte{0x01}

	// ChallengeIdKey is the key to retrieve the id of challenge.
	ChallengeIdKey = []byte{0x11}

	// ChallengeKeyPrefix is the prefix to retrieve Challenge.
	ChallengeKeyPrefix = []byte{0x12}

	// SlashKeyPrefix is the prefix to retrieve Slash.
	SlashKeyPrefix = []byte{0x13}

	// CurrentBlockChallengeCountKey is key to track the count of challenges in the current block.
	// The data is stored in transient store.
	CurrentBlockChallengeCountKey = []byte{0x14}

	// AttestedChallengesPrefix is the prefix to record the latest attested challenges.
	AttestedChallengesPrefix = []byte{0x15}

	// AttestedChallengesSizeKey is the key to record the size of latest attested challenges.
	AttestedChallengesSizeKey = []byte{0x16}

	// AttestedChallengesCursorKey is the key to retrieve the latest attested challenges.
	AttestedChallengesCursorKey = []byte{0x17}
)
View Source
var (
	KeyChallengeCountPerBlock            = []byte("ChallengeCountPerBlock")
	DefaultChallengeCountPerBlock uint64 = 1
)
View Source
var (
	KeyChallengeKeepAlivePeriod            = []byte("ChallengeKeepAlivePeriod")
	DefaultChallengeKeepAlivePeriod uint64 = 300
)
View Source
var (
	KeySlashCoolingOffPeriod            = []byte("SlashCoolingOffPeriod")
	DefaultSlashCoolingOffPeriod uint64 = 300
)
View Source
var (
	KeySlashAmountSizeRate     = []byte("SlashAmountSizeRate")
	DefaultSlashAmountSizeRate = sdk.NewDecWithPrec(85, 4)
)
View Source
var (
	KeySlashAmountMin     = []byte("SlashAmountMin")
	DefaultSlashAmountMin = math.NewIntFromBigInt(big.NewInt(1e16))
)
View Source
var (
	KeySlashAmountMax     = []byte("SlashAmountMax")
	DefaultSlashAmountMax = math.NewIntFromBigInt(big.NewInt(1e18))
)
View Source
var (
	KeyRewardValidatorRatio     = []byte("RewardValidatorRatio")
	DefaultRewardValidatorRatio = sdk.NewDecWithPrec(9, 1)
)
View Source
var (
	KeyRewardSubmitterRatio     = []byte("RewardSubmitterRatio")
	DefaultRewardSubmitterRatio = sdk.NewDecWithPrec(1, 3)
)
View Source
var (
	KeyRewardSubmitterThreshold     = []byte("RewardSubmitterThreshold")
	DefaultRewardSubmitterThreshold = math.NewIntFromBigInt(big.NewInt(1e15))
)
View Source
var (
	KeyHeartbeatInterval            = []byte("HeartbeatInterval")
	DefaultHeartbeatInterval uint64 = 1000
)
View Source
var (
	KeyAttestationInturnInterval            = []byte("AttestationInturnInterval")
	DefaultAttestationInturnInterval uint64 = 120 // in seconds
)
View Source
var (
	KeyAttestationKeptCount            = []byte("AttestationKeptCount")
	DefaultAttestationKeptCount uint64 = 300
)
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 (
	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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var VoteResult_name = map[int32]string{
	0: "CHALLENGE_FAILED",
	1: "CHALLENGE_SUCCEED",
}
View Source
var VoteResult_value = map[string]int32{
	"CHALLENGE_FAILED":  0,
	"CHALLENGE_SUCCEED": 1,
}

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type AttestedChallenge added in v0.2.2

type AttestedChallenge struct {
	// The id of the challenge.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The attestation result of the challenge.
	Result VoteResult `protobuf:"varint,2,opt,name=result,proto3,enum=greenfield.challenge.VoteResult" json:"result,omitempty"`
}

AttestedChallenge records the challenge which are attested.

func (*AttestedChallenge) Descriptor added in v0.2.2

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

func (*AttestedChallenge) GetId added in v0.2.2

func (m *AttestedChallenge) GetId() uint64

func (*AttestedChallenge) GetResult added in v0.2.2

func (m *AttestedChallenge) GetResult() VoteResult

func (*AttestedChallenge) Marshal added in v0.2.2

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

func (*AttestedChallenge) MarshalTo added in v0.2.2

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

func (*AttestedChallenge) MarshalToSizedBuffer added in v0.2.2

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

func (*AttestedChallenge) ProtoMessage added in v0.2.2

func (*AttestedChallenge) ProtoMessage()

func (*AttestedChallenge) Reset added in v0.2.2

func (m *AttestedChallenge) Reset()

func (*AttestedChallenge) Size added in v0.2.2

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

func (*AttestedChallenge) String added in v0.2.2

func (m *AttestedChallenge) String() string

func (*AttestedChallenge) Unmarshal added in v0.2.2

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

func (*AttestedChallenge) XXX_DiscardUnknown added in v0.2.2

func (m *AttestedChallenge) XXX_DiscardUnknown()

func (*AttestedChallenge) XXX_Marshal added in v0.2.2

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

func (*AttestedChallenge) XXX_Merge added in v0.2.2

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

func (*AttestedChallenge) XXX_Size added in v0.2.2

func (m *AttestedChallenge) XXX_Size() int

func (*AttestedChallenge) XXX_Unmarshal added in v0.2.2

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

type AttestedChallengeIds added in v0.1.2

type AttestedChallengeIds struct {
	// The fixed number of challenge ids to save.
	Size_ uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// The latest attested challenges.
	Challenges []*AttestedChallenge `protobuf:"bytes,2,rep,name=challenges,proto3" json:"challenges,omitempty"`
	// The cursor to retrieve data from the ids field.
	Cursor int64 `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
}

AttestedChallengeIds stored fixed number of the latest attested challenge ids. To use the storage more efficiently, a circular queue will be constructed using these fields.

func (*AttestedChallengeIds) Descriptor added in v0.1.2

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

func (*AttestedChallengeIds) GetChallenges added in v0.2.2

func (m *AttestedChallengeIds) GetChallenges() []*AttestedChallenge

func (*AttestedChallengeIds) GetCursor added in v0.1.2

func (m *AttestedChallengeIds) GetCursor() int64

func (*AttestedChallengeIds) GetSize_ added in v0.1.2

func (m *AttestedChallengeIds) GetSize_() uint64

func (*AttestedChallengeIds) Marshal added in v0.1.2

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

func (*AttestedChallengeIds) MarshalTo added in v0.1.2

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

func (*AttestedChallengeIds) MarshalToSizedBuffer added in v0.1.2

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

func (*AttestedChallengeIds) ProtoMessage added in v0.1.2

func (*AttestedChallengeIds) ProtoMessage()

func (*AttestedChallengeIds) Reset added in v0.1.2

func (m *AttestedChallengeIds) Reset()

func (*AttestedChallengeIds) Size added in v0.1.2

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

func (*AttestedChallengeIds) String added in v0.1.2

func (m *AttestedChallengeIds) String() string

func (*AttestedChallengeIds) Unmarshal added in v0.1.2

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

func (*AttestedChallengeIds) XXX_DiscardUnknown added in v0.1.2

func (m *AttestedChallengeIds) XXX_DiscardUnknown()

func (*AttestedChallengeIds) XXX_Marshal added in v0.1.2

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

func (*AttestedChallengeIds) XXX_Merge added in v0.1.2

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

func (*AttestedChallengeIds) XXX_Size added in v0.1.2

func (m *AttestedChallengeIds) XXX_Size() int

func (*AttestedChallengeIds) XXX_Unmarshal added in v0.1.2

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

type BankKeeper

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

BankKeeper defines the expected interface needed to retrieve account balances.

type Challenge added in v0.0.10

type Challenge struct {
	// The id of the challenge.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The height at which the challenge will be expired.
	ExpiredHeight uint64 `protobuf:"varint,2,opt,name=expired_height,json=expiredHeight,proto3" json:"expired_height,omitempty"`
}

Challenge records the challenge which are not expired yet.

func (*Challenge) Descriptor added in v0.0.10

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

func (*Challenge) GetExpiredHeight added in v0.0.10

func (m *Challenge) GetExpiredHeight() uint64

func (*Challenge) GetId added in v0.0.10

func (m *Challenge) GetId() uint64

func (*Challenge) Marshal added in v0.0.10

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

func (*Challenge) MarshalTo added in v0.0.10

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

func (*Challenge) MarshalToSizedBuffer added in v0.0.10

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

func (*Challenge) ProtoMessage added in v0.0.10

func (*Challenge) ProtoMessage()

func (*Challenge) Reset added in v0.0.10

func (m *Challenge) Reset()

func (*Challenge) Size added in v0.0.10

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

func (*Challenge) String added in v0.0.10

func (m *Challenge) String() string

func (*Challenge) Unmarshal added in v0.0.10

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

func (*Challenge) XXX_DiscardUnknown added in v0.0.10

func (m *Challenge) XXX_DiscardUnknown()

func (*Challenge) XXX_Marshal added in v0.0.10

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

func (*Challenge) XXX_Merge added in v0.0.10

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

func (*Challenge) XXX_Size added in v0.0.10

func (m *Challenge) XXX_Size() int

func (*Challenge) XXX_Unmarshal added in v0.0.10

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

type EventAttestChallenge

type EventAttestChallenge struct {
	// The id of challenge.
	ChallengeId uint64 `protobuf:"varint,1,opt,name=challenge_id,json=challengeId,proto3" json:"challenge_id,omitempty"`
	// The result of challenge.
	Result VoteResult `protobuf:"varint,2,opt,name=result,proto3,enum=greenfield.challenge.VoteResult" json:"result,omitempty"`
	// The slashed storage provider address.
	SpOperatorAddress string `protobuf:"bytes,3,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// The slashed amount from the storage provider.
	SlashAmount string `protobuf:"bytes,4,opt,name=slash_amount,json=slashAmount,proto3" json:"slash_amount,omitempty"`
	// The address of challenger.
	ChallengerAddress string `protobuf:"bytes,5,opt,name=challenger_address,json=challengerAddress,proto3" json:"challenger_address,omitempty"`
	// The reward amount to the challenger.
	ChallengerRewardAmount string `` /* 129-byte string literal not displayed */
	// The submitter of the challenge attestation.
	SubmitterAddress string `protobuf:"bytes,7,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty"`
	// The reward amount to the submitter.
	SubmitterRewardAmount string `` /* 126-byte string literal not displayed */
	// The reward amount to all current validators.
	ValidatorRewardAmount string `` /* 127-byte string literal not displayed */
}

EventAttestChallenge to indicate a challenge has been attested.

func (*EventAttestChallenge) Descriptor

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

func (*EventAttestChallenge) GetChallengeId

func (m *EventAttestChallenge) GetChallengeId() uint64

func (*EventAttestChallenge) GetChallengerAddress

func (m *EventAttestChallenge) GetChallengerAddress() string

func (*EventAttestChallenge) GetChallengerRewardAmount

func (m *EventAttestChallenge) GetChallengerRewardAmount() string

func (*EventAttestChallenge) GetResult

func (m *EventAttestChallenge) GetResult() VoteResult

func (*EventAttestChallenge) GetSlashAmount

func (m *EventAttestChallenge) GetSlashAmount() string

func (*EventAttestChallenge) GetSpOperatorAddress

func (m *EventAttestChallenge) GetSpOperatorAddress() string

func (*EventAttestChallenge) GetSubmitterAddress

func (m *EventAttestChallenge) GetSubmitterAddress() string

func (*EventAttestChallenge) GetSubmitterRewardAmount

func (m *EventAttestChallenge) GetSubmitterRewardAmount() string

func (*EventAttestChallenge) GetValidatorRewardAmount

func (m *EventAttestChallenge) GetValidatorRewardAmount() string

func (*EventAttestChallenge) Marshal

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

func (*EventAttestChallenge) MarshalTo

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

func (*EventAttestChallenge) MarshalToSizedBuffer

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

func (*EventAttestChallenge) ProtoMessage

func (*EventAttestChallenge) ProtoMessage()

func (*EventAttestChallenge) Reset

func (m *EventAttestChallenge) Reset()

func (*EventAttestChallenge) Size

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

func (*EventAttestChallenge) String

func (m *EventAttestChallenge) String() string

func (*EventAttestChallenge) Unmarshal

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

func (*EventAttestChallenge) XXX_DiscardUnknown

func (m *EventAttestChallenge) XXX_DiscardUnknown()

func (*EventAttestChallenge) XXX_Marshal

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

func (*EventAttestChallenge) XXX_Merge

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

func (*EventAttestChallenge) XXX_Size

func (m *EventAttestChallenge) XXX_Size() int

func (*EventAttestChallenge) XXX_Unmarshal

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

type EventStartChallenge

type EventStartChallenge struct {
	// The id of challenge, which is generated by blockchain.
	ChallengeId uint64 `protobuf:"varint,1,opt,name=challenge_id,json=challengeId,proto3" json:"challenge_id,omitempty"`
	// The id of object info to be challenged.
	ObjectId Uint `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3,customtype=Uint" json:"object_id"`
	// The segment/piece index of the object info.
	SegmentIndex uint32 `protobuf:"varint,3,opt,name=segment_index,json=segmentIndex,proto3" json:"segment_index,omitempty"`
	// The storage provider to be challenged.
	SpOperatorAddress string `protobuf:"bytes,4,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// The redundancy index, which comes from the index of storage providers.
	RedundancyIndex int32 `protobuf:"varint,5,opt,name=redundancy_index,json=redundancyIndex,proto3" json:"redundancy_index,omitempty"`
	// The challenger who submits the challenge.
	ChallengerAddress string `protobuf:"bytes,6,opt,name=challenger_address,json=challengerAddress,proto3" json:"challenger_address,omitempty"`
	// The challenge will be expired after this height
	ExpiredHeight uint64 `protobuf:"varint,7,opt,name=expired_height,json=expiredHeight,proto3" json:"expired_height,omitempty"`
}

EventStartChallenge to indicate a challenge has bee created.

func (*EventStartChallenge) Descriptor

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

func (*EventStartChallenge) GetChallengeId

func (m *EventStartChallenge) GetChallengeId() uint64

func (*EventStartChallenge) GetChallengerAddress

func (m *EventStartChallenge) GetChallengerAddress() string

func (*EventStartChallenge) GetExpiredHeight added in v0.0.10

func (m *EventStartChallenge) GetExpiredHeight() uint64

func (*EventStartChallenge) GetRedundancyIndex

func (m *EventStartChallenge) GetRedundancyIndex() int32

func (*EventStartChallenge) GetSegmentIndex

func (m *EventStartChallenge) GetSegmentIndex() uint32

func (*EventStartChallenge) GetSpOperatorAddress

func (m *EventStartChallenge) GetSpOperatorAddress() string

func (*EventStartChallenge) Marshal

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

func (*EventStartChallenge) MarshalTo

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

func (*EventStartChallenge) MarshalToSizedBuffer

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

func (*EventStartChallenge) ProtoMessage

func (*EventStartChallenge) ProtoMessage()

func (*EventStartChallenge) Reset

func (m *EventStartChallenge) Reset()

func (*EventStartChallenge) Size

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

func (*EventStartChallenge) String

func (m *EventStartChallenge) String() string

func (*EventStartChallenge) Unmarshal

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

func (*EventStartChallenge) XXX_DiscardUnknown

func (m *EventStartChallenge) XXX_DiscardUnknown()

func (*EventStartChallenge) XXX_Marshal

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

func (*EventStartChallenge) XXX_Merge

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

func (*EventStartChallenge) XXX_Size

func (m *EventStartChallenge) XXX_Size() int

func (*EventStartChallenge) XXX_Unmarshal

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

type GenesisState

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

GenesisState defines the challenge 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) 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 Int

type Int = sdkmath.Int

type MockAccountKeeper added in v0.2.0

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

MockAccountKeeper is a mock of AccountKeeper interface

func NewMockAccountKeeper added in v0.2.0

func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper

NewMockAccountKeeper creates a new mock instance

func (*MockAccountKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockAccountKeeper) GetAccount added in v0.2.0

func (m *MockAccountKeeper) GetAccount(arg0 types1.Context, arg1 types1.AccAddress) types2.AccountI

GetAccount mocks base method

type MockAccountKeeperMockRecorder added in v0.2.0

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

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper

func (*MockAccountKeeperMockRecorder) GetAccount added in v0.2.0

func (mr *MockAccountKeeperMockRecorder) GetAccount(arg0, arg1 interface{}) *gomock.Call

GetAccount indicates an expected call of GetAccount

type MockBankKeeper added in v0.2.0

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

MockBankKeeper is a mock of BankKeeper interface

func NewMockBankKeeper added in v0.2.0

func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper

NewMockBankKeeper creates a new mock instance

func (*MockBankKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockBankKeeper) SpendableCoins added in v0.2.0

func (m *MockBankKeeper) SpendableCoins(arg0 types1.Context, arg1 types1.AccAddress) types1.Coins

SpendableCoins mocks base method

type MockBankKeeperMockRecorder added in v0.2.0

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

MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper

func (*MockBankKeeperMockRecorder) SpendableCoins added in v0.2.0

func (mr *MockBankKeeperMockRecorder) SpendableCoins(arg0, arg1 interface{}) *gomock.Call

SpendableCoins indicates an expected call of SpendableCoins

type MockPaymentKeeper added in v0.2.0

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

MockPaymentKeeper is a mock of PaymentKeeper interface

func NewMockPaymentKeeper added in v0.2.0

func NewMockPaymentKeeper(ctrl *gomock.Controller) *MockPaymentKeeper

NewMockPaymentKeeper creates a new mock instance

func (*MockPaymentKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockPaymentKeeper) QueryDynamicBalance added in v0.2.0

func (m *MockPaymentKeeper) QueryDynamicBalance(arg0 types1.Context, arg1 types1.AccAddress) (math.Int, error)

QueryDynamicBalance mocks base method

func (*MockPaymentKeeper) Withdraw added in v0.2.0

func (m *MockPaymentKeeper) Withdraw(arg0 types1.Context, arg1, arg2 types1.AccAddress, arg3 math.Int) error

Withdraw mocks base method

type MockPaymentKeeperMockRecorder added in v0.2.0

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

MockPaymentKeeperMockRecorder is the mock recorder for MockPaymentKeeper

func (*MockPaymentKeeperMockRecorder) QueryDynamicBalance added in v0.2.0

func (mr *MockPaymentKeeperMockRecorder) QueryDynamicBalance(arg0, arg1 interface{}) *gomock.Call

QueryDynamicBalance indicates an expected call of QueryDynamicBalance

func (*MockPaymentKeeperMockRecorder) Withdraw added in v0.2.0

func (mr *MockPaymentKeeperMockRecorder) Withdraw(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Withdraw indicates an expected call of Withdraw

type MockSpKeeper added in v0.2.0

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

MockSpKeeper is a mock of SpKeeper interface

func NewMockSpKeeper added in v0.2.0

func NewMockSpKeeper(ctrl *gomock.Controller) *MockSpKeeper

NewMockSpKeeper creates a new mock instance

func (*MockSpKeeper) DepositDenomForSP added in v0.2.0

func (m *MockSpKeeper) DepositDenomForSP(arg0 types1.Context) string

DepositDenomForSP mocks base method

func (*MockSpKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockSpKeeper) GetStorageProvider added in v0.2.0

func (m *MockSpKeeper) GetStorageProvider(arg0 types1.Context, arg1 types1.AccAddress) (*types.StorageProvider, bool)

GetStorageProvider mocks base method

func (*MockSpKeeper) Slash added in v0.2.0

func (m *MockSpKeeper) Slash(arg0 types1.Context, arg1 types1.AccAddress, arg2 []types.RewardInfo) error

Slash mocks base method

type MockSpKeeperMockRecorder added in v0.2.0

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

MockSpKeeperMockRecorder is the mock recorder for MockSpKeeper

func (*MockSpKeeperMockRecorder) DepositDenomForSP added in v0.2.0

func (mr *MockSpKeeperMockRecorder) DepositDenomForSP(arg0 interface{}) *gomock.Call

DepositDenomForSP indicates an expected call of DepositDenomForSP

func (*MockSpKeeperMockRecorder) GetStorageProvider added in v0.2.0

func (mr *MockSpKeeperMockRecorder) GetStorageProvider(arg0, arg1 interface{}) *gomock.Call

GetStorageProvider indicates an expected call of GetStorageProvider

func (*MockSpKeeperMockRecorder) Slash added in v0.2.0

func (mr *MockSpKeeperMockRecorder) Slash(arg0, arg1, arg2 interface{}) *gomock.Call

Slash indicates an expected call of Slash

type MockStakingKeeper added in v0.2.0

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

MockStakingKeeper is a mock of StakingKeeper interface

func NewMockStakingKeeper added in v0.2.0

func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper

NewMockStakingKeeper creates a new mock instance

func (*MockStakingKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStakingKeeper) GetHistoricalInfo added in v0.2.0

func (m *MockStakingKeeper) GetHistoricalInfo(arg0 types1.Context, arg1 int64) (types3.HistoricalInfo, bool)

GetHistoricalInfo mocks base method

func (*MockStakingKeeper) GetLastValidators added in v0.2.0

func (m *MockStakingKeeper) GetLastValidators(arg0 types1.Context) []types3.Validator

GetLastValidators mocks base method

type MockStakingKeeperMockRecorder added in v0.2.0

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

MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper

func (*MockStakingKeeperMockRecorder) GetHistoricalInfo added in v0.2.0

func (mr *MockStakingKeeperMockRecorder) GetHistoricalInfo(arg0, arg1 interface{}) *gomock.Call

GetHistoricalInfo indicates an expected call of GetHistoricalInfo

func (*MockStakingKeeperMockRecorder) GetLastValidators added in v0.2.0

func (mr *MockStakingKeeperMockRecorder) GetLastValidators(arg0 interface{}) *gomock.Call

GetLastValidators indicates an expected call of GetLastValidators

type MockStorageKeeper added in v0.2.0

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

MockStorageKeeper is a mock of StorageKeeper interface

func NewMockStorageKeeper added in v0.2.0

func NewMockStorageKeeper(ctrl *gomock.Controller) *MockStorageKeeper

NewMockStorageKeeper creates a new mock instance

func (*MockStorageKeeper) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStorageKeeper) GetBucketInfo added in v0.2.0

func (m *MockStorageKeeper) GetBucketInfo(arg0 types1.Context, arg1 string) (*types0.BucketInfo, bool)

GetBucketInfo mocks base method

func (*MockStorageKeeper) GetObjectInfo added in v0.2.0

func (m *MockStorageKeeper) GetObjectInfo(arg0 types1.Context, arg1, arg2 string) (*types0.ObjectInfo, bool)

GetObjectInfo mocks base method

func (*MockStorageKeeper) GetObjectInfoById added in v0.2.0

func (m *MockStorageKeeper) GetObjectInfoById(arg0 types1.Context, arg1 math.Uint) (*types0.ObjectInfo, bool)

GetObjectInfoById mocks base method

func (*MockStorageKeeper) GetObjectInfoCount added in v0.2.0

func (m *MockStorageKeeper) GetObjectInfoCount(arg0 types1.Context) math.Uint

GetObjectInfoCount mocks base method

func (*MockStorageKeeper) MaxSegmentSize added in v0.2.0

func (m *MockStorageKeeper) MaxSegmentSize(arg0 types1.Context) uint64

MaxSegmentSize mocks base method

type MockStorageKeeperMockRecorder added in v0.2.0

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

MockStorageKeeperMockRecorder is the mock recorder for MockStorageKeeper

func (*MockStorageKeeperMockRecorder) GetBucketInfo added in v0.2.0

func (mr *MockStorageKeeperMockRecorder) GetBucketInfo(arg0, arg1 interface{}) *gomock.Call

GetBucketInfo indicates an expected call of GetBucketInfo

func (*MockStorageKeeperMockRecorder) GetObjectInfo added in v0.2.0

func (mr *MockStorageKeeperMockRecorder) GetObjectInfo(arg0, arg1, arg2 interface{}) *gomock.Call

GetObjectInfo indicates an expected call of GetObjectInfo

func (*MockStorageKeeperMockRecorder) GetObjectInfoById added in v0.2.0

func (mr *MockStorageKeeperMockRecorder) GetObjectInfoById(arg0, arg1 interface{}) *gomock.Call

GetObjectInfoById indicates an expected call of GetObjectInfoById

func (*MockStorageKeeperMockRecorder) GetObjectInfoCount added in v0.2.0

func (mr *MockStorageKeeperMockRecorder) GetObjectInfoCount(arg0 interface{}) *gomock.Call

GetObjectInfoCount indicates an expected call of GetObjectInfoCount

func (*MockStorageKeeperMockRecorder) MaxSegmentSize added in v0.2.0

func (mr *MockStorageKeeperMockRecorder) MaxSegmentSize(arg0 interface{}) *gomock.Call

MaxSegmentSize indicates an expected call of MaxSegmentSize

type MsgAttest

type MsgAttest struct {
	// The submitter address.
	Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"`
	// The id of the challenge.
	ChallengeId uint64 `protobuf:"varint,2,opt,name=challenge_id,json=challengeId,proto3" json:"challenge_id,omitempty"`
	// The id of the object info.
	ObjectId Uint `protobuf:"bytes,3,opt,name=object_id,json=objectId,proto3,customtype=Uint" json:"object_id"`
	// The storage provider to be challenged.
	SpOperatorAddress string `protobuf:"bytes,4,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// Vote result of the attestation.
	VoteResult VoteResult `` /* 129-byte string literal not displayed */
	// The challenger who submits the challenge, which can be empty.
	ChallengerAddress string `protobuf:"bytes,6,opt,name=challenger_address,json=challengerAddress,proto3" json:"challenger_address,omitempty"`
	// The validators participated in the attestation.
	VoteValidatorSet []uint64 `protobuf:"fixed64,7,rep,packed,name=vote_validator_set,json=voteValidatorSet,proto3" json:"vote_validator_set,omitempty"`
	// The aggregated BLS signature from the validators.
	VoteAggSignature []byte `protobuf:"bytes,8,opt,name=vote_agg_signature,json=voteAggSignature,proto3" json:"vote_agg_signature,omitempty"`
}

MsgSubmit defines the message for attesting challenges.

func NewMsgAttest

func NewMsgAttest(submitter sdk.AccAddress, challengeId uint64, objectId Uint, spOperatorAddress string,
	voteResult VoteResult, challenger string, voteValidatorSet []uint64, voteAggSignature []byte) *MsgAttest

func (*MsgAttest) Descriptor

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

func (*MsgAttest) GetBlsSignBytes

func (msg *MsgAttest) GetBlsSignBytes() [32]byte

func (*MsgAttest) GetChallengeId

func (m *MsgAttest) GetChallengeId() uint64

func (*MsgAttest) GetChallengerAddress

func (m *MsgAttest) GetChallengerAddress() string

func (*MsgAttest) GetSignBytes

func (msg *MsgAttest) GetSignBytes() []byte

func (*MsgAttest) GetSigners

func (msg *MsgAttest) GetSigners() []sdk.AccAddress

func (*MsgAttest) GetSpOperatorAddress

func (m *MsgAttest) GetSpOperatorAddress() string

func (*MsgAttest) GetSubmitter

func (m *MsgAttest) GetSubmitter() string

func (*MsgAttest) GetVoteAggSignature

func (m *MsgAttest) GetVoteAggSignature() []byte

func (*MsgAttest) GetVoteResult

func (m *MsgAttest) GetVoteResult() VoteResult

func (*MsgAttest) GetVoteValidatorSet

func (m *MsgAttest) GetVoteValidatorSet() []uint64

func (*MsgAttest) Marshal

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

func (*MsgAttest) MarshalTo

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

func (*MsgAttest) MarshalToSizedBuffer

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

func (*MsgAttest) ProtoMessage

func (*MsgAttest) ProtoMessage()

func (*MsgAttest) Reset

func (m *MsgAttest) Reset()

func (*MsgAttest) Route

func (msg *MsgAttest) Route() string

func (*MsgAttest) Size

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

func (*MsgAttest) String

func (m *MsgAttest) String() string

func (*MsgAttest) Type

func (msg *MsgAttest) Type() string

func (*MsgAttest) Unmarshal

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

func (*MsgAttest) ValidateBasic

func (msg *MsgAttest) ValidateBasic() error

func (*MsgAttest) XXX_DiscardUnknown

func (m *MsgAttest) XXX_DiscardUnknown()

func (*MsgAttest) XXX_Marshal

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

func (*MsgAttest) XXX_Merge

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

func (*MsgAttest) XXX_Size

func (m *MsgAttest) XXX_Size() int

func (*MsgAttest) XXX_Unmarshal

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

type MsgAttestResponse

type MsgAttestResponse struct {
}

MsgAttest defines the response of MsgAttestResponse.

func (*MsgAttestResponse) Descriptor

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

func (*MsgAttestResponse) Marshal

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

func (*MsgAttestResponse) MarshalTo

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

func (*MsgAttestResponse) MarshalToSizedBuffer

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

func (*MsgAttestResponse) ProtoMessage

func (*MsgAttestResponse) ProtoMessage()

func (*MsgAttestResponse) Reset

func (m *MsgAttestResponse) Reset()

func (*MsgAttestResponse) Size

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

func (*MsgAttestResponse) String

func (m *MsgAttestResponse) String() string

func (*MsgAttestResponse) Unmarshal

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

func (*MsgAttestResponse) XXX_DiscardUnknown

func (m *MsgAttestResponse) XXX_DiscardUnknown()

func (*MsgAttestResponse) XXX_Marshal

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

func (*MsgAttestResponse) XXX_Merge

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

func (*MsgAttestResponse) XXX_Size

func (m *MsgAttestResponse) XXX_Size() int

func (*MsgAttestResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	Submit(ctx context.Context, in *MsgSubmit, opts ...grpc.CallOption) (*MsgSubmitResponse, error)
	Attest(ctx context.Context, in *MsgAttest, opts ...grpc.CallOption) (*MsgAttestResponse, error)
	// UpdateParams defines a governance operation for updating the x/challenge module parameters.
	// The authority is defined in the keeper.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 {
	Submit(context.Context, *MsgSubmit) (*MsgSubmitResponse, error)
	Attest(context.Context, *MsgAttest) (*MsgAttestResponse, error)
	// UpdateParams defines a governance operation for updating the x/challenge module parameters.
	// The authority is defined in the keeper.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmit

type MsgSubmit struct {
	// The challenger address.
	Challenger string `protobuf:"bytes,1,opt,name=challenger,proto3" json:"challenger,omitempty"`
	// The storage provider to be challenged.
	SpOperatorAddress string `protobuf:"bytes,2,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// The bucket of the object info to be challenged.
	BucketName string `protobuf:"bytes,3,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"`
	// The name of the object info to be challenged.
	ObjectName string `protobuf:"bytes,4,opt,name=object_name,json=objectName,proto3" json:"object_name,omitempty"`
	// The index of segment/piece to challenge, start from zero.
	SegmentIndex uint32 `protobuf:"varint,5,opt,name=segment_index,json=segmentIndex,proto3" json:"segment_index,omitempty"`
	// Randomly pick a segment/piece to challenge or not.
	RandomIndex bool `protobuf:"varint,6,opt,name=random_index,json=randomIndex,proto3" json:"random_index,omitempty"`
}

MsgSubmit defines the message for submitting challenges.

func NewMsgSubmit

func NewMsgSubmit(challenger sdk.AccAddress, spOperatorAddress sdk.AccAddress, bucketName, objectName string, randomIndex bool, segmentIndex uint32) *MsgSubmit

func (*MsgSubmit) Descriptor

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

func (*MsgSubmit) GetBucketName

func (m *MsgSubmit) GetBucketName() string

func (*MsgSubmit) GetChallenger

func (m *MsgSubmit) GetChallenger() string

func (*MsgSubmit) GetObjectName

func (m *MsgSubmit) GetObjectName() string

func (*MsgSubmit) GetRandomIndex

func (m *MsgSubmit) GetRandomIndex() bool

func (*MsgSubmit) GetSegmentIndex

func (m *MsgSubmit) GetSegmentIndex() uint32

func (*MsgSubmit) GetSignBytes

func (msg *MsgSubmit) GetSignBytes() []byte

func (*MsgSubmit) GetSigners

func (msg *MsgSubmit) GetSigners() []sdk.AccAddress

func (*MsgSubmit) GetSpOperatorAddress

func (m *MsgSubmit) GetSpOperatorAddress() string

func (*MsgSubmit) Marshal

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

func (*MsgSubmit) MarshalTo

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

func (*MsgSubmit) MarshalToSizedBuffer

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

func (*MsgSubmit) ProtoMessage

func (*MsgSubmit) ProtoMessage()

func (*MsgSubmit) Reset

func (m *MsgSubmit) Reset()

func (*MsgSubmit) Route

func (msg *MsgSubmit) Route() string

func (*MsgSubmit) Size

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

func (*MsgSubmit) String

func (m *MsgSubmit) String() string

func (*MsgSubmit) Type

func (msg *MsgSubmit) Type() string

func (*MsgSubmit) Unmarshal

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

func (*MsgSubmit) ValidateBasic

func (msg *MsgSubmit) ValidateBasic() error

func (*MsgSubmit) XXX_DiscardUnknown

func (m *MsgSubmit) XXX_DiscardUnknown()

func (*MsgSubmit) XXX_Marshal

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

func (*MsgSubmit) XXX_Merge

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

func (*MsgSubmit) XXX_Size

func (m *MsgSubmit) XXX_Size() int

func (*MsgSubmit) XXX_Unmarshal

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

type MsgSubmitResponse

type MsgSubmitResponse struct {
}

MsgSubmitResponse defines the response of MsgSubmit.

func (*MsgSubmitResponse) Descriptor

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

func (*MsgSubmitResponse) Marshal

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

func (*MsgSubmitResponse) MarshalTo

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

func (*MsgSubmitResponse) MarshalToSizedBuffer

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

func (*MsgSubmitResponse) ProtoMessage

func (*MsgSubmitResponse) ProtoMessage()

func (*MsgSubmitResponse) Reset

func (m *MsgSubmitResponse) Reset()

func (*MsgSubmitResponse) Size

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

func (*MsgSubmitResponse) String

func (m *MsgSubmitResponse) String() string

func (*MsgSubmitResponse) Unmarshal

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

func (*MsgSubmitResponse) XXX_DiscardUnknown

func (m *MsgSubmitResponse) XXX_DiscardUnknown()

func (*MsgSubmitResponse) XXX_Marshal

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

func (*MsgSubmitResponse) XXX_Merge

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

func (*MsgSubmitResponse) XXX_Size

func (m *MsgSubmitResponse) XXX_Size() int

func (*MsgSubmitResponse) XXX_Unmarshal

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

type MsgUpdateParams added in v0.2.0

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 x/challenge 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 added in v0.2.0

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

func (*MsgUpdateParams) GetAuthority added in v0.2.0

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams added in v0.2.0

func (m *MsgUpdateParams) GetParams() Params

func (MsgUpdateParams) GetSignBytes added in v0.2.0

func (m MsgUpdateParams) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg interface.

func (*MsgUpdateParams) GetSigners added in v0.2.0

func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateParams message.

func (*MsgUpdateParams) Marshal added in v0.2.0

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

func (*MsgUpdateParams) MarshalTo added in v0.2.0

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

func (*MsgUpdateParams) MarshalToSizedBuffer added in v0.2.0

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

func (*MsgUpdateParams) ProtoMessage added in v0.2.0

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset added in v0.2.0

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size added in v0.2.0

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

func (*MsgUpdateParams) String added in v0.2.0

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal added in v0.2.0

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

func (*MsgUpdateParams) ValidateBasic added in v0.2.0

func (m *MsgUpdateParams) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

func (*MsgUpdateParams) XXX_DiscardUnknown added in v0.2.0

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal added in v0.2.0

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

func (*MsgUpdateParams) XXX_Merge added in v0.2.0

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

func (*MsgUpdateParams) XXX_Size added in v0.2.0

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal added in v0.2.0

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

type MsgUpdateParamsResponse added in v0.2.0

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor added in v0.2.0

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

func (*MsgUpdateParamsResponse) Marshal added in v0.2.0

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

func (*MsgUpdateParamsResponse) MarshalTo added in v0.2.0

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer added in v0.2.0

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

func (*MsgUpdateParamsResponse) ProtoMessage added in v0.2.0

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset added in v0.2.0

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size added in v0.2.0

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

func (*MsgUpdateParamsResponse) String added in v0.2.0

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal added in v0.2.0

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown added in v0.2.0

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal added in v0.2.0

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

func (*MsgUpdateParamsResponse) XXX_Merge added in v0.2.0

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

func (*MsgUpdateParamsResponse) XXX_Size added in v0.2.0

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal added in v0.2.0

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

type Params

type Params struct {
	// Challenges which will be emitted in each block, including user submitted or randomly triggered.
	ChallengeCountPerBlock uint64 `` /* 165-byte string literal not displayed */
	// Challenges will be expired after the period, including user submitted or randomly triggered.
	ChallengeKeepAlivePeriod uint64 `` /* 173-byte string literal not displayed */
	// The count of blocks to stand for the period in which the same storage and object info cannot be slashed again.
	SlashCoolingOffPeriod uint64 `` /* 161-byte string literal not displayed */
	// The slash coin amount will be calculated from the size of object info, and adjusted by this rate.
	SlashAmountSizeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 192-byte string literal not displayed */
	// The minimal slash amount.
	SlashAmountMin github_com_cosmos_cosmos_sdk_types.Int `` /* 145-byte string literal not displayed */
	// The maximum slash amount.
	SlashAmountMax github_com_cosmos_cosmos_sdk_types.Int `` /* 145-byte string literal not displayed */
	// The ratio of slash amount to reward all current validators.
	RewardValidatorRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 193-byte string literal not displayed */
	// The ratio of reward amount to reward attestation submitter.
	RewardSubmitterRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 194-byte string literal not displayed */
	// The reward amount to submitter will be adjusted by the threshold.
	RewardSubmitterThreshold github_com_cosmos_cosmos_sdk_types.Int `` /* 175-byte string literal not displayed */
	// Heartbeat interval, based on challenge id, defines the frequency of heartbeat attestation.
	HeartbeatInterval uint64 `` /* 140-byte string literal not displayed */
	// The time duration for each submitter to submit attestations in turn.
	AttestationInturnInterval uint64 `` /* 175-byte string literal not displayed */
	// The number of kept attested challenge ids, which can be queried by clients.
	AttestationKeptCount uint64 `` /* 155-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(
	challengeCountPerBlock uint64,
	challengeKeepAlivePeriod uint64,
	slashCoolingOffPeriod uint64,
	slashAmountSizeRate sdk.Dec,
	slashAmountMin math.Int,
	slashAmountMax math.Int,
	rewardValidatorRatio sdk.Dec,
	rewardSubmitterRatio sdk.Dec,
	rewardSubmitterThreshold math.Int,
	heartbeatInterval uint64,
	attestationInturnInterval uint64,
	attestationKeptCount uint64,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetAttestationInturnInterval added in v0.1.2

func (m *Params) GetAttestationInturnInterval() uint64

func (*Params) GetAttestationKeptCount added in v0.1.2

func (m *Params) GetAttestationKeptCount() uint64

func (*Params) GetChallengeCountPerBlock

func (m *Params) GetChallengeCountPerBlock() uint64

func (*Params) GetChallengeKeepAlivePeriod added in v0.0.10

func (m *Params) GetChallengeKeepAlivePeriod() uint64

func (*Params) GetHeartbeatInterval

func (m *Params) GetHeartbeatInterval() uint64

func (*Params) GetSlashCoolingOffPeriod

func (m *Params) GetSlashCoolingOffPeriod() 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) ParamSetPairs

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

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PaymentKeeper

type PaymentKeeper interface {
	QueryDynamicBalance(ctx sdk.Context, addr sdk.AccAddress) (amount sdkmath.Int, err error)
	Withdraw(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amount sdkmath.Int) error
}

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries the latest attested challenges.
	LatestAttestedChallenges(ctx context.Context, in *QueryLatestAttestedChallengesRequest, opts ...grpc.CallOption) (*QueryLatestAttestedChallengesResponse, error)
	// Queries the inturn challenger.
	InturnAttestationSubmitter(ctx context.Context, in *QueryInturnAttestationSubmitterRequest, opts ...grpc.CallOption) (*QueryInturnAttestationSubmitterResponse, 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 QueryInturnAttestationSubmitterRequest added in v0.1.2

type QueryInturnAttestationSubmitterRequest struct {
}

QueryInturnAttestationSubmitterRequest is request type for the Query/InturnAttestationSubmitter RPC method.

func (*QueryInturnAttestationSubmitterRequest) Descriptor added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) Marshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) MarshalTo added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) MarshalToSizedBuffer added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) ProtoMessage added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) Reset added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) Size added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) String added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) Unmarshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) XXX_DiscardUnknown added in v0.1.2

func (m *QueryInturnAttestationSubmitterRequest) XXX_DiscardUnknown()

func (*QueryInturnAttestationSubmitterRequest) XXX_Marshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterRequest) XXX_Merge added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) XXX_Size added in v0.1.2

func (*QueryInturnAttestationSubmitterRequest) XXX_Unmarshal added in v0.1.2

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

type QueryInturnAttestationSubmitterResponse added in v0.1.2

type QueryInturnAttestationSubmitterResponse struct {
	BlsPubKey      string          `protobuf:"bytes,1,opt,name=bls_pub_key,json=blsPubKey,proto3" json:"bls_pub_key,omitempty"`
	SubmitInterval *SubmitInterval `protobuf:"bytes,2,opt,name=submit_interval,json=submitInterval,proto3" json:"submit_interval,omitempty"`
}

QueryInturnAttestationSubmitterResponse is response type for the Query/InturnAttestationSubmitter RPC method.

func (*QueryInturnAttestationSubmitterResponse) Descriptor added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) GetBlsPubKey added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) GetSubmitInterval added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) Marshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) MarshalTo added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) MarshalToSizedBuffer added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) ProtoMessage added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) Reset added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) Size added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) String added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) Unmarshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) XXX_DiscardUnknown added in v0.1.2

func (m *QueryInturnAttestationSubmitterResponse) XXX_DiscardUnknown()

func (*QueryInturnAttestationSubmitterResponse) XXX_Marshal added in v0.1.2

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

func (*QueryInturnAttestationSubmitterResponse) XXX_Merge added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) XXX_Size added in v0.1.2

func (*QueryInturnAttestationSubmitterResponse) XXX_Unmarshal added in v0.1.2

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

type QueryLatestAttestedChallengesRequest added in v0.1.2

type QueryLatestAttestedChallengesRequest struct {
}

QueryLatestAttestedChallengesRequest is request type for the Query/LatestAttestedChallenges RPC method.

func (*QueryLatestAttestedChallengesRequest) Descriptor added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) Marshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) MarshalTo added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) MarshalToSizedBuffer added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) ProtoMessage added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) ProtoMessage()

func (*QueryLatestAttestedChallengesRequest) Reset added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) Size added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) String added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) Unmarshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) XXX_DiscardUnknown added in v0.1.2

func (m *QueryLatestAttestedChallengesRequest) XXX_DiscardUnknown()

func (*QueryLatestAttestedChallengesRequest) XXX_Marshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesRequest) XXX_Merge added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) XXX_Size added in v0.1.2

func (*QueryLatestAttestedChallengesRequest) XXX_Unmarshal added in v0.1.2

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

type QueryLatestAttestedChallengesResponse added in v0.1.2

type QueryLatestAttestedChallengesResponse struct {
	Challenges []*AttestedChallenge `protobuf:"bytes,1,rep,name=challenges,proto3" json:"challenges,omitempty"`
}

QueryLatestAttestedChallengesResponse is response type for the Query/LatestAttestedChallenges RPC method.

func (*QueryLatestAttestedChallengesResponse) Descriptor added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) GetChallenges added in v0.2.2

func (*QueryLatestAttestedChallengesResponse) Marshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) MarshalTo added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) MarshalToSizedBuffer added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) ProtoMessage added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) ProtoMessage()

func (*QueryLatestAttestedChallengesResponse) Reset added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) Size added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) String added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) Unmarshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) XXX_DiscardUnknown added in v0.1.2

func (m *QueryLatestAttestedChallengesResponse) XXX_DiscardUnknown()

func (*QueryLatestAttestedChallengesResponse) XXX_Marshal added in v0.1.2

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

func (*QueryLatestAttestedChallengesResponse) XXX_Merge added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) XXX_Size added in v0.1.2

func (*QueryLatestAttestedChallengesResponse) XXX_Unmarshal added in v0.1.2

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

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

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries the latest attested challenges.
	LatestAttestedChallenges(context.Context, *QueryLatestAttestedChallengesRequest) (*QueryLatestAttestedChallengesResponse, error)
	// Queries the inturn challenger.
	InturnAttestationSubmitter(context.Context, *QueryInturnAttestationSubmitterRequest) (*QueryInturnAttestationSubmitterResponse, error)
}

QueryServer is the server API for Query service.

type Slash

type Slash struct {
	// The slashed storage provider.
	SpOperatorAddress []byte `protobuf:"bytes,1,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// The slashed object info.
	ObjectId Uint `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3,customtype=Uint" json:"object_id"`
	// The height when the slash happened, which is used for prune purpose.
	Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
}

Slash records the storage provider slashes, which will be pruned periodically.

func (*Slash) Descriptor

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

func (*Slash) GetHeight

func (m *Slash) GetHeight() uint64

func (*Slash) GetSpOperatorAddress

func (m *Slash) GetSpOperatorAddress() []byte

func (*Slash) Marshal

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

func (*Slash) MarshalTo

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

func (*Slash) MarshalToSizedBuffer

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

func (*Slash) ProtoMessage

func (*Slash) ProtoMessage()

func (*Slash) Reset

func (m *Slash) Reset()

func (*Slash) Size

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

func (*Slash) String

func (m *Slash) String() string

func (*Slash) Unmarshal

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

func (*Slash) XXX_DiscardUnknown

func (m *Slash) XXX_DiscardUnknown()

func (*Slash) XXX_Marshal

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

func (*Slash) XXX_Merge

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

func (*Slash) XXX_Size

func (m *Slash) XXX_Size() int

func (*Slash) XXX_Unmarshal

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

type SpKeeper

type SpKeeper interface {
	GetStorageProvider(ctx sdk.Context, addr sdk.AccAddress) (sp *sp.StorageProvider, found bool)
	DepositDenomForSP(ctx sdk.Context) (res string)
	Slash(ctx sdk.Context, spAcc sdk.AccAddress, rewardInfos []sp.RewardInfo) error
}

type StakingKeeper

type StakingKeeper interface {
	GetLastValidators(ctx sdk.Context) (validators []staking.Validator)
	GetHistoricalInfo(ctx sdk.Context, height int64) (staking.HistoricalInfo, bool)
}

type StorageKeeper

type StorageKeeper interface {
	GetObjectInfo(ctx sdk.Context, bucketName string, objectName string) (*storage.ObjectInfo, bool)
	GetObjectInfoById(ctx sdk.Context, objectId sdkmath.Uint) (*storage.ObjectInfo, bool)
	GetObjectInfoCount(ctx sdk.Context) sdkmath.Uint
	GetBucketInfo(ctx sdk.Context, bucketName string) (*storage.BucketInfo, bool)
	MaxSegmentSize(ctx sdk.Context) (res uint64)
}

type SubmitInterval added in v0.1.2

type SubmitInterval struct {
	Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	End   uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
}

SubmitInterval holds start and end (exclusive) (i.e., [start, end)) time of in turn attestation.

func (*SubmitInterval) Descriptor added in v0.1.2

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

func (*SubmitInterval) GetEnd added in v0.1.2

func (m *SubmitInterval) GetEnd() uint64

func (*SubmitInterval) GetStart added in v0.1.2

func (m *SubmitInterval) GetStart() uint64

func (*SubmitInterval) Marshal added in v0.1.2

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

func (*SubmitInterval) MarshalTo added in v0.1.2

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

func (*SubmitInterval) MarshalToSizedBuffer added in v0.1.2

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

func (*SubmitInterval) ProtoMessage added in v0.1.2

func (*SubmitInterval) ProtoMessage()

func (*SubmitInterval) Reset added in v0.1.2

func (m *SubmitInterval) Reset()

func (*SubmitInterval) Size added in v0.1.2

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

func (*SubmitInterval) String added in v0.1.2

func (m *SubmitInterval) String() string

func (*SubmitInterval) Unmarshal added in v0.1.2

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

func (*SubmitInterval) XXX_DiscardUnknown added in v0.1.2

func (m *SubmitInterval) XXX_DiscardUnknown()

func (*SubmitInterval) XXX_Marshal added in v0.1.2

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

func (*SubmitInterval) XXX_Merge added in v0.1.2

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

func (*SubmitInterval) XXX_Size added in v0.1.2

func (m *SubmitInterval) XXX_Size() int

func (*SubmitInterval) XXX_Unmarshal added in v0.1.2

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

type Uint

type Uint = sdkmath.Uint

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Attest

func (*UnimplementedMsgServer) Submit

func (*UnimplementedMsgServer) UpdateParams added in v0.2.0

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) InturnAttestationSubmitter added in v0.1.2

func (*UnimplementedQueryServer) LatestAttestedChallenges added in v0.1.2

func (*UnimplementedQueryServer) Params

type VoteResult

type VoteResult int32

VoteResult defines the result attestation for a challenge.

const (
	// The challenge failed.
	CHALLENGE_FAILED VoteResult = 0
	// The challenge succeed.
	CHALLENGE_SUCCEED VoteResult = 1
)

func (VoteResult) EnumDescriptor

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

func (VoteResult) String

func (x VoteResult) String() string

Jump to

Keyboard shortcuts

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